Digital Temperature and LCD Arduino
In this project we are going to use a temperature sensor in order to read its value and displaying on a LCD screen.
We connected two potentiometer in order to adjust LCD backlight and contrast as well.
After sketch loading completed, your board will display current temperature, but only after computing an average of 100 samples read from temperature sensor. This to avoid crazy reading data every cycle.
Requirements:
Hardware components required:
- Arduino UNO R3
- LM35 temperature sensor
- LCD Display – JHD162A 16×2
- I2C adapter for LCD (optional)
- Green LED light
- Red LED light
- 2 X 100 ohm resistors.
- Connecting wires.
Software requirements:
LM35 Temperature sensor
The LM35 is a good performance temperature sensor at a low price. It has a working range from -55ºC to 150ªC. Its output is analog and linear type with a slope of 10mV / ºC. The sensor is factory calibrated to an accuracy of 0.5ºC.
It is a very popular sensor for its easy use and varied applications. It does not need any additional circuit to be used. It is powered directly from a 5V source and delivers an analog output between 0V to 1.5V. This analog voltage can be read by the ADC from a microcontroller like PIC or Arduino. Among its applications we can find thermometers, thermostats, monitoring systems and more.
Features of LM35
- Operating Voltage: 4V – 30V (5V recommended)
- Working Range: -55 ℃ to + 150 ℃
- Accuracy in the range from -10 ° C to + 85 ° C: ± 0.5 ° C
- Slope: 10mV / ºC
- Low energy consumption: 60uA
- No need for additional components
- Pins: + VCC, V output, GND
- Low output impedance
In above picture we connected lm35 temperature sensor to Arduino as first pin for power source is connected to 5V on the Arduino and the second pin is connected to A2 of Arduino analogue pin and the third one is connected to GND of Arduino UNO.
We connected 16 X 2 LCD display with the help of I2C adapter, all the connection pins are given in the image which has two pins for power and ground and another two for SDA and SCL.
We connected two small Red and Green 5mm LED light to digital pins 6 and 7 and we connected 100 ohms resistors along the ground of LED lights.
Working of Digital thermometer using Arduino:
After uploading the code you will notice the live temperature for the sensor is displayed on the 16 X 2 LCD display. If the temperature raised above 60 the red LED will light up and if the temperature is below 60 Green LED will light up. You can adjust the threshold temperature in the above code to make the lights change at what temperature you want.
Arduino Code : Click Here
Advantages and Applications:
- Monitor the components temperature but putting sensor beside them
- Sensor is small so it can be used in wide variety of application.
- It gives nearly accurate results with only ±0.5 C error .
- Can be used to measure skin temperature
- Can be used to measure liquids temperature but we need to cover the pins with water proof material.