I'm trying to build thermostat with Arduino. I want to power it using mobile phone battery/charger which makes system voltage quite variable. Right now I use Arduino Uno, but once it is complete I will port it to Lilypad.
First I tried to use TMP36 temperature sensor. So far it was complete failure. While the sensor itself appears to be very stable, I can't figure a way to accurately measure its voltage.
Using built-in 5v reference for analog sensors isn't working at all -- even powered from USB arduino's +5V are actually +4.8V (which shifts measured temperature by few degrees). When the board is powered from the battery, voltage drops to about 4V and measured temperature sky-rockets. I also tried to use +3.3V from the board as a reference. It seems to be more stable when the board is powered from USB, but its voltage drops when running off the battery.
Is there any other way to reliably measure sensor output voltage?
For the second stage I'm planning to use thermistors. Just ordered a couple of these 20K thermistors.
From what I understand, these should be easier to measure accurately if I build voltage divider and use V_in as reference voltage for ADC.
A couple of questions about them:
- Does it make sense to use few voltage dividers with different fixed resistor to increase accuracy?
- I can use programmable pin as V_in, and measure temperature using few different voltage levels. Though its not clear to me whether this will actually increase accuracy.
Answer
It seems you are aware of the problem with the reference voltage changing and if you use a device like the TMP36 (fixed 10mV/degC) there is nothing you can do other than use a voltage reference from a chip to stabilize things.
However, if you are using an RTD or a thermistor then the problem won't arise. You ADC is making a ratiometric measurement - it compares the ADC input to its reference voltage BUT, if you power the RTD or thermistor (via a suitable resistor) from the same ref voltage it won't affect readings. If the ref goes up 10% then so does the voltage into the ADC.
No comments:
Post a Comment