Last time on Minimal MQTT, we used a Raspberry Pi to set up an MQTT broker — the central hub of a home data network. Now it’s time to add some sensor and display nodes and get this thing running. So pull out your ESP-8266 module of choice, and let’s get going.
For hardware, we’re using a WeMos D1 Mini because they’re really cute, and absolutely dirt cheap, but basically any ESP module will do. For instance, you can do the same on the simplest ESP-01 module if you’ve got your own USB-serial adapter and are willing to jumper some pins to get it into bootloader mode. If you insist on a deluxe development board that bears the Jolly Wrencher, we know some people.
NodeMCU: Getting the Firmware
We’re using the NodeMCU firmware because it’s quick and easy to get running. But you’re not stuck with NodeMCU if you want to go it alone: MQTT has broad support. [TuanPM] ported over an MQTT library to the native ESP8266 SDK and of course there’s espduino, a port for an Arduino-plus-ESP combo. He also ported the MQTT module to NodeMCU that we’ll be using today. Thanks, [TuanPM]!
Continue reading “Minimal MQTT: Networked Nodes”
Here’s a question that will rack your brain: does your clothes dryer stop when the clothes are dry? It seems if you have a machine that guzzles power for one single purpose, you’d like it to stop when its job is done, or for the sake of convenience, keep going until the clothes are dry. Temperature and humidity sensors are cheap, and if you don’t have an auto sensing clothes dryer, a DIY smart clothes dryer seems both efficient and convenient.
[Andy] figured when clothes are dry, they stop emitting moisture. Based on that premise, he could monitor the operation of a clothes dryer and either shut off the machine or send a message that it’s time to take the clothes out. It’s a simple enough idea, and with an Arduino and a DHT11 temperature and humidity sensor, it was pretty easy to put together.
The clothes dryer used for this experiment was a self-ventilating model that doesn’t vent to the outside. Instead, it condenses the water in your towels and jeans into a tub to be emptied by hand later. This might introduce a little error into tests, but [Andy] did come up with a way to mount the temperature sensor without modifying his dryer in any way. From the initial data, the ventless dryer might be introducing a little experimental error, but it’s still too good of an idea to not try out with a traditional dryer that vents to the outside. Here’s the code should you want to try this yourself.
Temperature and humidity measurements are a nice addition to many hobby projects. But [Rajendra Bhatt] makes the point that many of these sensors have a price tag that is well above what most hobbiests are willing to spend. He decided to take an in-depth look at the DHT11 sensor; which you can get your hands on for under $3 if you know where to look.
The four-pin device uses a 1-wire protocol. [Rajendra] discusses the ins and outs of the communications, demonstrating the part using a PIC 16F628. It’s a snap to connect to your project, requiring VCC, GND, and a pull-up resistor on the single data line. We’ve already seen it used on at least one project, and hope to see more of this little guy in your own hacks.
Now we found this part listed on eBay for less than $3 (buy it now price including shipping… how can they do that?). But Octopart didn’t come up with any options. If you know how to get this through traditional parts suppliers let us know in the comments.
We love the extra touches that [Andrianakis Haris] added to his two-zone electronic thermometer. It includes features that you just wouldn’t find on a mass-market commercial product because of issues like added cost. For example, you can see that the PCB juts up above the LCD display, allowing the module to be mounted on a pair of screws thanks to the keyhole shape that was drilled in the substrate. I increases the board size greatly, but on a small hobby run this won’t usually affect the price of the board depending on the fab house pricing model.
The design uses an ATmega8 microcontroller to monitor sensors in two different places. There is an onboard LM35 temperature sensor for monitoring the space where the unit resides. A remote sensor module uses a DHT-11 chip to gather data about temperature and humidity. That sensor is wired, but there is one wireless option for the device. Data can be pulled down from it via an optional Bluetooth module which can be soldered to a footprint on the back of the board.
Check out the video after the break to see temperature readings pulled down wirelessly. Continue reading “Over-engineering a two-zone thermometer”