Advertisement
arduino temperature monitor

Arduino Room Temperature Monitor

Now you can build your own room temperature monitor using an Arduino board. The circuit is a combination of an Arduino UNO board, LM35 temperature sensor, and a 16×2 Hitachi compatible LCD. It will display the temperature on the LCD screen in degree F & in degree C. It can be powered from any standard Arduino AC mains adaptor (9VDC), or from a suitable battery. First of all note that this circuit can not measure the temperature of the whole city or province.
It can only measure the temperature of the surroundings!

Schematic of the Arduino Temperature Monitor Circuit

arduino temperature monitor

LM35DZ (TO-92 Package) is a precision integrated-circuit temperature sensor, whose output voltage is linearly proportional to the Celsius (Centigrade) temperature (Linear + 10.0 mV/°C scale factor). As it draws only 60 μA from its supply, it has very low self-heating, less than 0.1°C in still air. The LM35 is rated to operate over a −55°C to +150°C temperature range. In this circuit LM35’s output is connected to the Arduino’s A0 pin, which converts the available output voltage value to a float value of temperature, and then, displays it on the LCD screen. The 10K potentiometer (P1) adjusts the contrast of the LCD readout, and the 100R (R1) fixed resistor limits the operating current of the LCD backlight unit.

Photos

Arduino Sketch

//Room Temperature Monitor
//T.K.Hareendran
#include <LiquidCrystal.h> // Include the library to use a LCD display
#define tempSensor 0 // Define the A0 pin as “sensor”
int Vin; // Variable to read the value from the Arduino’s pin A0
float TC; // Variable that receives the converted voltage value to ºCtemperature
float TF; // Variable to receive the converted value from ºC to ºF
LiquidCrystal lcd (7, 8, 9, 10, 11, 12);
/* The function above declares which Arduino’s pins will be used for controlling the LCD */
void setup()
{
   lcd.begin(16, 2); // It tells the Arduino that the display is a 16x2 type
   lcd.print("-Temperature-"); // Send the text to the screen of the display.
}
void loop()
{
   Vin = analogRead (tempSensor); /* Tells the Arduino to read A0 and stores the value in “Vin” */
   TC=(500.0*Vin)/1023.0; /* Converts the voltage value into temperature and stores it into the “TC” variable (in ºC)*/
   TF = ((9.0*TC)/5.0)+32.0; // Converts ºC to ºF
   lcd.setCursor(0, 1); // Moves the cursor of the display to the next line
   lcd.print(TF); // Exhibits the value of the temperature on the display
   lcd.print((char)223); //degree symbol
   lcd.print("F "); // Writes “F” to indicate that it is in Fahrenheit scale.
   lcd.print (TC);
   lcd.print((char)223);// degree symbol
   lcd.print("C"); // Writes “C” to indicate that it is in Centigrade scale.
   delay(1000); // Waits for one second to read the sensor pin again
}

12 Comments

Join the conversation!

Error! Please fill all fields.
Looking for the latest from TI?