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.