Had some time this weekend and a desire to create something new and interesting, so went ahead and created an Arduino/NodeMCU based indoor dial thermometer. This device displays the temperature in degree centigrade on a D-Shaped Gauge as well as on a 7-Segment display.
In addition to that, it also saves the temperature and humidity readings in a MySQL DataBase hosted on a home based Raspberry Pi Server. The data is then displayed using the "Our Smart Home" app.
Project Design and Aesthetics
This project combines high-precision sensing with retro-style analog aesthetics. The Indoor Dial Thermometer features a 3D-printed D-shaped gauge housing that uses a physical pointer to indicate temperature, alongside a precise digital readout on a TM1637 7-Segment Display.
Core Technologies
- Sensing: The DHT22 (AM2302) sensor provides highly accurate temperature and humidity readings. Unlike the cheaper DHT11, the DHT22 offers a wide measurement range and higher resolution.
- Mechanical Output: A small 28BYJ-48 Stepper Motor (with a ULN2003 driver) is used to position the analog dial's needle. Stepper motors are ideal here because they allow for precise, repeatable movements across the gauge range.
- WiFi Connectivity: The ESP8266 (NodeMCU) connects to the local network to transmit environmental data to a central database.
Data Logging Infrastructure
Beyond the physical display, the system functions as an IoT node.
- The Server: A Raspberry Pi running a LAMP stack (Linux, Apache, MySQL, PHP) acts as the local home automation hub.
- The Database: The NodeMCU sends HTTP POST requests containing JSON data to a PHP script, which then inserts the values into a MySQL table.
- The App: Data can be viewed remotely through a custom "Our Smart Home" application, which visualizes historical trends of temperature and humidity.
Assembly and Printing
The gauge face and housing are 3D printed to provide a professional finish. The internal components are mounted on a custom PCB or secured within the 3D-printed chassis. Calibration of the stepper motor is required in the setup() function to ensure the needle points correctly at 0°C on power-up.
Development Resources
- Source Code & STL Files: GitHub - Indoor Dial Thermometer
- Video Tutorial: Project Walkthrough