You are on page 1of 2

LM 35 Temperature Sensor

LM35
LM35 by National Semiconductor is a popular and low cost temperature sensor.
It is also easily available. It has three pins as follows.
The Vcc can be from V to !"V as specified by the
datasheet. To use the sensor
simply connect the Vcc to 5V #$N% to $round and the
&ut to one of the '%( )analo*
to di*ital converter channel+. The output linearly varies
with temperature.
The output is
10MilliVolts per degree centigrade.
So if the output is 3," mV then temperature is 3, de*ree
(. To ma-e this pro.ect
you should be familiar with the '%( of 'V/s and also
usin* seven se*ment displays.
0lease refer to followin* articles.
The resolution of 'V/s '%( is ,"bit and for reference
volta*e we are usin*
5V so the resolution in terms of volta*e is
51,"! 2 5mV appro3imatly
So if '%(4s result corresponds to 5mV i.e. if '%( readin* is ," it means
," 3 5mV 2 5"mV
5ou can *et read the value of any '%( channel usin* the function
/ead'%()ch+6
Fig LM35 Pin
Configuration


7here ch is channel number )"85+ in case of 'Tme*a9. If you have connected
the LM35:s out put to '%( channel " then call
adc;value 2 /ead'%()"+
this will store the current '%( readin* in variable adc;value. The data type
of adc;value should be int as '%( value can ran*e from "8,"!3.
's we saw '%( results are in factor of 5mV and for , de*ree ( the output of
LM35 is ,"mV# So ! units of '%( 2 , de*ree.
So to *et the temperature we divide the adc;value by two
temperature 2 adc;value1!6

You might also like