Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

LM 35

TEMPERATURE SENSOR
Pin configuration
• LM35 is a basic temperature
sensor that can be used for
experimental purpose .
• It give the readings in centigrade
since its output voltage is linearly
proportional to temperature.
• For 10mv there will be 1 degree
change in temperature.
Principle of working
• A temperature sensor measures the
hotness or coolness of an object.
• The sensor's working base is the voltage
that's read across the diode.
• The temperature rises whenever the
voltage increases.
• The operating temperature range is from -
55°C to 150°C.
Connecting to arduino
code
int val;
int tempPin = 1;

void setup()
{
Serial.begin(9600);
}
void loop()
{
val = analogRead(tempPin);
float mv = ( val/1024.0)*5000;
float cel = mv/10;
Serial.print("TEMPRATURE = ");
Serial.print(cel);
Serial.print("*C");
Serial.println();
delay(1000);
}
• 10 bit resolution=>2^10 divisions

5000mv=1024steps
?(x mv)=reading
x mv=5000*reading/1024

10mv=1 degree C change in temp


Temp=x mv/10
Serial monitor output
Queries?

You might also like