IoT Thermometer
By
For my ENGR 103 final project, I created an internet-connected thermometer using a ESP32 microcontroller. To make the device more robust and create a finished product, I also 3D printed a box to hold all of the electrical components. I couldn't use breadboards while minimizing the box's size, so I transitioned to using female DuPont connectors with some header pins I soldered together to provide enough power and ground pins. The thermometer records the temperature and displays it on an LCD screen every second. It also sends the current temperature reading to a server every 30 seconds and a list of the average temperature during each 10-minute interval in the past 24 hours. The server then stores this information, in addition to some details about when the data was last updated. I also created a simple webpage that uses the stored data to display the current temperature, some summary statistics about all readings since the thermometer was plugged in, and a graph of the average temperature in each 10-minute interval in the past 24 hours. All of this data updates every 30 seconds and is synced with when the thermometer sends new data. Finally, recognizing that the thermometer may occasionally lose power, I designed it to request data stored on the server if that data was updated in the past 5 minutes. Additionally, if the server's data has not been recently updated, the webpage will stop displaying it as well.
Artifacts
Name | Description | |
---|---|---|
output.php | Source code for the webpage that displays the information uploaded by the thermometer | Download |
getJSON.php | Source code for the file output.php requests updated data from | Download |
input.php | Source code for saving data sent from the ESP32 and sending saved data on reboot | Download |
body.stl | 3D model for thermometer's container | Download |
top.stl | 3D model for the thermometer container's lid | Download |
thermometer.ino | Source code for all thermometer/ESP32 functionality | Download |