The given project illustrates interfacing of temperature sensor LM35 with Arduino and displaying current temperature on LCD. The LM35 sensor generates analog voltage corresponding to sensed temperature. Its output varies from 0 to 1 V as 10 mV / oC. So it can be easily interfaced with Arduino by connecting its output to Arduino's analog input pin. So change in temperature i.e. a change in analog voltage input that is recorded as the change in analog value in Arduino. The value is further converted into actual and accurate temperature and then it is displayed on LCD. The accuracy of temperature is upto 2 digits after decimal point. So we can measure very accurate temperature using this application.
1. The output of LM35 sensor is connected to analog input pin A0 of Arduino board. Its Vcc pin is connected to +5 V and Gnd pin to ground.
2. Data pins D4, D5, D6 and D7 of LCD are connected to digital pins D5, D4, D3, and D2 respectively. En pin of LCD is connected to pin 11 and Rs pin is connected to pin 12.
3. RW pin is connected to ground.
4. A 10K pot is connected to 3rd pin VEE of LCD to vary its brightness.
5. LED+ terminal and LED- terminal are connected to 5V and ground to turn on LED back light for LCD.
• The LM35 sensor give 0 to 1 V output as 10 mV/oC – means as temperature varies by 1 oC the output voltage from sensor increases by 10 mV and vice versa.
• Because the output of sensor is connected to analog input of arduino it will convert this into digital value from 0 to 1023.
• Because LM35 sensor output is limited to 0 – 1 V only, internal reference voltage of 1.1 V is selected for internal ADC operation.
• So as temperature increases, the analog output from sensor increases from 0 to 1 V and arduino generates corresponding digital value from 0 to 1023.
• So 0 to 1 V range is divided in 1024 steps – means each step has 1/1024 = 0.00097 = 0.97 mV resolution.
• Because LM35 sensor output changes by 10 mV on each 1 oC change in temperature, so when analog reading changes by 10 / 0.97 = 10.31, it indicates temperature changes by 1 oC.
• So Arduino reads analog voltage output from sensor, gets analog value between 0 to 1023 divide it by factor 10.31 and displays this value on LCD as current temperature.
• As the temperature increases or decreases the analog output voltage from sensor increases or decreases, Arduino reads this voltage, convert it into corresponding temperature value and displays it on LCD.
For complete above circuit operation, the program is downloaded into Arduino microcontroller ATMega328. The program is edited and compiled in Arduino IDE. And then it is uploaded to Arduino board.