Internet of things: Temperature Monitor Updated
2016-10-06 | By Mahesh Venkitachalam
License: None Arduino
Keep track of your temperature whenever, wherever with the miniature-size Arduino-based IoT temperature monitor. The device uses an LM35 sensor and the ESP8266 WiFi module housed inside a sleek laser-cut casing.
In a previous post, various impressions on the ESP8266 WiFi Module were discussed. The discussion included the affordability of the device, the basics on how to set it up, and the instructions on how to connect the device to your WiFi network. There is also no need to worry about shifting the voltage level from 5 to 3.3 Volts because ESP8266 operates at 3.3 V, making it very compatible to the 3.3 V version of the Arduino Pro Mini. The LM35 sensor is read through the Arduino analog pin (ADC) and outputs 10 mV/degree Celsius (1 Volt => 100 degrees C).
The SoftwareSerial library is used to allow communication between the Arduino and the ESP8266 module. The SSID and password are stored on the ESP8266, so we will exclude such information in our Arduino code.
Everything is powered by a 9 V battery connected to the ESP8266 via LD33 3.3 V regulator. Since the Arduino has a built-in regulator, we will supply the 9V directly to its RAW pin. The battery lasts approximately 4 days given the following power-consumption arrangements specified below:
- Take a temperature reading every 10 minutes.
- Use Narcoleptic library to put Arduino in deep sleep mode.
- Using a digitalWrite on the Arduino and use the CH_PD pin of the ESP8266 for disabling the WiFI chip when not needed.
The entire setup is mounted on a general purpose PCB. For the enclosure, you can use a T-slot based acrylic box designed with Inkscape T-Slot Boxmaker plugin. It uses M2x10 hex screws and has compartments available for the LM35 and PCB space. The acrylic thickness is at 3 mm and also has a feature that allows you to hang the box on a nail.
Codes and necessary files for this project: