I took the plunge and decided to “design” and create a small PCB intended to keep together neatly the bits I want on a couple of sensors.
Writing a book was, for me, a lot more work than designing a small printed circuit board (PCB), but even so, the design took a few hours to create, particularly since I wanted to squeeze everything as closely together as possible to save cost on the manufacturing. The book-writing gave me a lot more satisfaction, but I’ll admit to being tickled when I received a thin envelope with two very small PCBs in it.
I suppose most of you will snort at seeing that, as it’s basically just a holder for a few integrated parts and not a real board design, but that doesn’t bother me at all; snort as much as you like.
I created these using Fritzing and used their (not inexpensive) Fritzing Fab PCB factory to produce them. They’re located near Berlin, so I was hoping for quick turnaround which I got. The PCB has a Wemos-D1 ESP8266 on it with a DS18B20 digital temperature sensor and a digital Lux meter thing which flips when luminosity goes under or above a threshhold which is set on it. And the PCB works.
The firmware running on the Wemos-D1 mini is based on Homie because I’ve had very good experiences with it, and it’s rock stable.
There will probably be a second iteration of the
Homie/LT PCB. For one, the big fat red LED will go away (yes, I was told it’d be idiotic, but I wanted blinkenlights!), and we’ll probably add a simple LDR instead of the digital light sensor as the latter is very tall and gives the whole thing a rather ungainly look.
Apropos Homie: I decided to create a small Python utility called homie-ota which comes with a really retro-style looking, vintage Web interface upon which you can see an inventory of Homie devices in your network, upload new firmware binary files and issue an OTA (Over the Air) request via MQTT to a device for it to come and get a new firmware. I’ve been laughed at for the look-and-feel of the Web pages, but Ben has nevertheless been very supportive and has provided a ton of features and patches.
Nathan Chantrell wrote an in-depth review about this and a second module while the Electrodragons were en-route to me. To cut a long story short, I don’t regret this purchase, and the devices appear to be safe enough for the load I’m running them on (a lightbulb or two).
The small relay board I described above is well suited to be integrated into my OpenHAB installation which I do via MQTT of course. This
items file picks up one of the relays and allows me to switch it:
As it’s all MQTT-controlled, I can switch a relay either by pressing the switch in the OpenHAB UI or with an MQTT publish:
It’s a huge bit of fun to play with these ESP8266 modules, and at their extremely low cost, there’s not much you can do wrong.
See also: Homie for Python.