LM34 and ADC0831 conversion
Jason M
Posts: 3
I am using a·BS2 with a LM34 connected to an ADC0831. I have to modify the input from the ADC0831·by multipying it by 50/26 to get the correct temp reading. Can someone explain why this is so?
Thanks
Jason
Thanks
Jason
Comments
That means· the 831 gives one count for each 19.6mv in.··· (5·/ 255)
Your LM34outputs 10mv per degree, so 100 degrees is 1V output.
Obviously,· you want 100 degrees to read 100 on the screen, but 1V is only 51 counts on the 831, so you need to implement some scaling for the readout to be useful.
100/51 = 1.9, .....· 50/26 = 1.9 .......
The LM34 works up to about 200 degrees, so to get the most accurate scaling, you'd divide 2000mv (200degrees X10mv)···by 19.6mv getting 102. ... The scaling math would then multiply by 200 and then divide by 102
That's why you do it.
If you want easy, use a 12 bit adc (which divides the reference voltage·into 4096 increments)·with a 4.096V reference voltage, and you'll have 1 count equals 1mv, so the readout will be direct to tenths of a degree.
Darlene
That is exactly what I do. I have a hot tub setup that uses an LM34. Since I never want the tub hotter than 110 (actually 106 but I wanted some headroom), I used a variable reference set to 1.1V. This way I can get 10ths of a degree easily, could actually get hundreths. I mean, what if the tub is 104.1, not 104.0! :-0
Jonathan
Nice sig. pic BTW, PJ.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
Jason