Introduction: Arduino Thermometer Using LM35 Temperature Sensor

Picture of Arduino Thermometer Using LM35 Temperature Sensor

Arduino Thermometer using LM35 Temperature Sensor is a very simple to implement Arduino based project. Its a perfect project if you are a beginner and have just started practically testing Arduino projects.

In this project we will be displaying temperature in degree Centigrade and Fahrenheit as well. The ambient temperature is sensed using LM35 Temperature sensor which is a linear sensor. LM35 gives linear output of 10mv/°C this output of the sensor is then given to Analog input of Arduino UNO. Which then measures the temperature and displays it on 16x2 Alphanumeric Display in real time.

Step 1: Components Used

Very Easily available components are used over here. Also there is no soldering involved so much simpler and faster to implement.

Step 2: Circuit Diagram

Picture of Circuit Diagram

The output of the LM35 Temperature sensor is analog so it is given to A0 if the Arduino. LM35 is an integrated analog temperature sensor whose electrical output is proportional to Degree Centigrade. LM35 Sensor does not require any external calibration or trimming to provide typical accuracies also it is a very low cost and easily available Sensor. Main advantage of LM35 is that it is linear i.e. 10mv/°C scare factor which means for every degree rise in temperature the output of LM35 will rise by 10mv. Want to Learn more basics of LM35 Temperature Sensor?

Arduino measures output of the sensor and then displays the reading on Alphanumeric Display. As said earlier LM35 sensors gives output in Degree Centigrade the arduino then calculates the temperature in Fahrenheit as well and displays both reading on LCD.

This calculation is quite simple

°F =°C x 9/5 + 32

So30°C to Fahrenheit will be 30°C x 9/5 + 32 = 86.0°F

Step 3: Coding

/*

Arduino Thermometer using LM35

To wire your LCD screen to your Arduino, connect the following pins:

LCD Pin 6 to digital pin 12

LCD Pin 4 to digital pin 11

LCD Pin 11 to digital pin 5

LCD Pin 12 to digital pin 4

LCD Pin 13 to digital pin 3

LCD Pin 14 to digital pin 2

*/

#include LiquidCrystal lcd(12,11,5,4,3,2);

const int inPin = 0;

void setup()

{

lcd.begin(16,2);

lcd.setCursor(0,0);

lcd.print(" Thermometer");

}

void loop()

{

int value = analogRead(inPin);

float millivolts = (value / 1024.0) * 5000;

float celsius = millivolts / 10;

lcd.setCursor(0,1);

lcd.print(celsius);

lcd.write(0xdf); lcd.print("C ");

lcd.print((celsius * 9)/5 + 32);

lcd.write(0xdf); lcd.print("F");

delay(1000); //Updating Temperature reading after every 1 second

}

You can Download the complete Code from HERE

Comments

StevenV24 (author)2016-03-09

I do not know how it happens, but measurements that vary completely randomly of an entire degree are useless.

How do I avoid this noise.

marc.deloor.5 (author)StevenV242016-10-03

You can try out my latest instructable, where I solve those errors:

https://www.instructables.com/id/Arduino-and-Floati...

ams31 (author)StevenV242016-03-18

You can connect a 1uf capacitor on LM35's output pin. The positive pin of the capacitor should be on the LM35's output pin & the other negative terminal of capacitor should be connected to ground.

StevenV24 (author)ams312016-03-19

Ofcourse this was the first thing I did. It was rather effortless. And this sensor was completely a disaster when I placed a relais in the neighbourhood.

I buyed two DS18B20 and they are perfect!

About This Instructable

10,145views

34favorites

Bio: An Electronic freak loves designing Embedded circuits.
More by ams31:DIY USB to TTL ConverterSilent AlarmArduino Thermometer using LM35 Temperature Sensor
Add instructable to: