Page 1 of 1

ADC Basics (LM35)

PostPosted: Thu Oct 24, 2013 10:28 am
by Danial
Hi,

i am using an LM35 for sensing temperature. I have a problem to display the right temperature on the LCD. I am using an 8 bit ADC. Therefore, the range is from 0-255 for ADC value. For ADC value of 1, it is equivalent to 0.01953V. If my ADC value is currently 103, then 103 x 0.01953V = 2.0116V. For the LM35, it states that it can read -55C up to 150C and for 10mV/C. If my voltage is 2.0116V, how to display the temperature? Anyone out there that can enlighten me? Thank you very much in advance.

Re: ADC Basics (LM35)

PostPosted: Thu Oct 24, 2013 11:58 am
by robosang

Re: ADC Basics (LM35)

PostPosted: Thu Oct 24, 2013 12:11 pm
by Danial
Thanks Robosang.

the programs that you referred is to take the average of 10 adc readings and then just divide by 2. I'll try it.

Re: ADC Basics (LM35)

PostPosted: Thu Oct 24, 2013 5:50 pm
by ober
LM35 datasheet stated 0mV + 10mV/degree Celsius. at 0 degree C, the voltage is 0V.

The tutorial that robosang shared is base on 10-bit ADC, you are using 8-bit, you cannot apply that formula.

Find out what is the relationship between degree Celsius and Voltage, replace the Voltage with ADC you get.