I have been playing around with a thermistor, comparing it to a DS18B20. After letting it run overnight, I only saw my analog readings change by 4 or 5 on the scale of 0-1023. That wasn't very useful, so I figured I would change the analog reference value to get more resolution.
To do this, I need to set AREF to a lower value. The thermistor is typically at 10k ohms. Normal temperature I would hope to see correspond to 7.5k ohms - 15k ohms. The maximum voltage it should see is then 3.3*15/(15+100) = 0.43v. So I created an identical voltage divider with the same 100k ohm leg, and 20k ohms to be on the safe side (0.55v) and fed this into AREF.
But when I run this, I am getting a saturated reading of 1023 on A2. This implies the voltage is higher than or equal to AREF. But how is that possible when I've explicitly chose AREF to be higher than the max possible on the thermistor?
I've double checked each component with the multimeter, and I've checked the voltages at AREF (0.55v) and A2 (0.36v) respectively. I even resoldered the AREF pin, and finally tried a completely different Arduino (the uno), but no dice. The exact same behavior.
Any ideas or hints as to what I am missing? I learned after I ran into this that you can use software to change AREF from 5v to something lower. While good to know for next time, I would rather understand why this isn't working as I would hope.
Thanks in advance for any help!
Rick
Here is the schematic:
The following is my code, but I don't think that's it (since it works fine without AREF).
#define THERMISTORPIN A2
void setup(void) {
Serial.begin(9600);
analogReference(EXTERNAL);
}
void loop(void) {
float reading = reading = analogRead(THERMISTORPIN);
Serial.println(reading);
delay(1000);
}