2019/07/27

ESP8266 fridge/freezer monitor

I haven't posted anything for a while but I've continued to explore new technology and some of my recent interests have involved the Arduino ecosystem and the ESP8266 chip. My intro to Arduino was a few years back when I built a "Koala ambulance" for my preschooler's car show day. It was pretty basic and just flashed the LED lights but it was a big hit with that age group.

Later on I heard about the low cost ESP8266 boards with WiFi that are compatible with the Arduino platform. As I learned more about these boards I found them in all sorts of cheap IoT devices like light bulbs and IR blasters. There are better boards available now using the ESP32 chip and others that support encryption and can be used securely with cloud IoT services.

I decided that the older refrigerator in my garage needed some temperature monitoring and this was the perfect job for something like the tiny ESP-01 board. This project used the ESP-01 board, the onewire DS18B20 temp sensor, an I2C 1620 LCD display, a MQTT message bus, Node-RED, Node-RED dashboard, and IFTTT.

At a high level the system operates like this. When the ESP-01 is turned on it joins the WiFi network and connects to the MQTT message broker. Then it starts sending temperature sensor readings to the MQTT channel and updating the LCD display. If the temperature is outside the desired range the piezo buzzer beeps a warning tone. Elsewhere on the network a Raspberry Pi is running Node-RED and is subscribed to the MQTT channel to receive the temperature sensor messages. Node-RED records and graphs the temperatures and is also connected to IFTTT for sending alerts to a smartphone. You can see the Arduino source code for my temperature sensor on GitHub.




Some future improvements will be 3D printing a nice case so it doesn't look like the cardboard and duct tape mess it is now. Also adding a backup battery power supply would keep it showing and reporting the temperature when the power is out. Showing the max/min temps over the last few weeks would be useful too.

Some of the excellent resources I found along the way were:

No comments: