Arduino Temperature Monitor

Standard

The semester is finally coming to a close which means I might finally get a chance to breathe deeply again and write about all the projects I’ve been working on this semester. This past week I’ve been finishing up a few smaller projects for my Electronic Design Lab course. I’ve really enjoyed getting to build stuff this semester and apply some theory in real life. (Who knew!) One of these projects I have been working on is a module which senses the ambient temperature using an Arduino and some output LEDs (eventually an LCD when I get around to buying one) to display this information. I’m hoping to be able to continue this design and make a more permanent version for some other ideas I have.

I used some CAT5 ethernet cable as an extension for the temperature sensor so as to allow for the actual sensor to be placed a distance from the Arduino unit. For the display unit, I used a 10 LED bar graph module and hooked the LEDs up to the digital output pins using 330 ohm resistors. I also connected a piezo buzzer to one of the PWM pins so as to allow for an alarm.

The physical layout for the device is below:

The schematic:

The code for the Arduino is pretty simple, taking the input temperature from the LM35 sensor in the form of an analog voltage value and converting it to a digital value and finally to a temperature using the equation for the LM35: 

Then, this value is converted to degrees fahrenheit and the result printed to the serial monitor. Following this, the value is mapped to the number of LEDs using the baselineTempF and maxTempF values declared as global variables at the beginning of the sketch. Using this value, a for loop is entered in which the appropriate LEDs are turned on and all others turned off. A piezo buzzer is also connected on pin 3 as an alarm if the temperature rises above a user-configured value, or if the temperature is above or below the set range of detection.

The complete code is attached here.

The prototyped version of the device looks like this:

The Arduino with Bar Graph LED and LM35 Sensor
Arduino and LED Bar Graph Close Up
LM35 Sensor Cable Close Up

Future plans for this include creating a more permanent module with the Arduino integrated onto a PCB or protoboard, extending the sensing functionality and precision of the device, and adding additional methods to output the data. Please leave your questions or comments!

Leave a comment