ADC0831 and the math behind it
Jason Miller
Posts: 3
I am a novice when it comes to the basic stamp and analog to digital conversion so please bear with me:
I am using a LM34 to measure temperature and it is connected to a ADC0831. I currently have the Vref on the 0831 set to 5 volts thus I am using the following scaling math:
5/255 = 19.6mV
Since the LM34 outputs 10mV per degree and 100 reads 51 on the 0831 I use the scaling factor of 100/51.
My question is if I changed the Vref to 2.5 volts so 2.5/255 = 10mV do I need a scaling factor?? But I must need to change something since when I use a Vref of 2.5 the output of the 0831 is not correct.
Any insight or help would be greatly appreciated,
Jason
I am using a LM34 to measure temperature and it is connected to a ADC0831. I currently have the Vref on the 0831 set to 5 volts thus I am using the following scaling math:
5/255 = 19.6mV
Since the LM34 outputs 10mV per degree and 100 reads 51 on the 0831 I use the scaling factor of 100/51.
My question is if I changed the Vref to 2.5 volts so 2.5/255 = 10mV do I need a scaling factor?? But I must need to change something since when I use a Vref of 2.5 the output of the 0831 is not correct.
Any insight or help would be greatly appreciated,
Jason
Comments
What do you mean the output of the ADC0831 is not correct? With a VREF of 2.5V when your input signal is 2.5V you should get 255 from the ADC0831. Is this not what you’re getting?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
Post Edited (Chris Savage (Parallax)) : 1/20/2009 6:15:05 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
I had a wiring problem which when corrected fixed the problem I was seeing. I have another question though - can I get an accuracy to tenths of a degree with the ADC0831 and if so how do I go about it.
Thanks
Jason
Since the LM34 outputs 10mV per degree, then 1/10 degree resolution would require 1mV resolution on the ADC. While you could do this on the ADC0831, your measurable range would be very small. You would be better off going with a 12-bit ADC in this case and adjusting the VREF to 4.095 which would give you 1mV/step resolution on the ADC. Each value would be equal to 1/10 degree (1mV). I hope this helps. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering