# AREF not behaving as I expect

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);
}
``````

I have no idea, but the thermistor divider seems a bit lopsided…. 100K / 10K ?

If I remeber it correctly, the AREF has an internal resistor from AREF to GND of 16k and AREF may not be lower than 1V.
Others have successfully used a lower AREF, but to use it below the specified limit is gambling.

Did you measure the AREF while running the sketch ?
I think the analog reference is not used until the first analogRead() call. See wiring_analog.c

Can you take a step back ? Is your NTC 10kΩ at 25°C ? Then it is a 10k NTC. You should use a 10k resistor with that instead of a 100k resistor.

The thermistor typical value is some 10 kOhm. What made You match it with 100 kOhm? I would have used 10 kOhm as a guess.
Look for application notes for that sensor.

Thanks! I honestly do not remember why I used a 100k there, likely I copied some example on the internet.

I swapped both 100ks out for 10ks, and it works as expected now, though likely I don't need to worry about AREF now.

Aref and power for the thermistor must come from the same source to keep ratiometric behaviour.
If you don't, then you have dependency both from temperature and supply voltage.

Pull-up/down resistor for the thermistor must have the same value as the thermistor around the temperature of interest. For max number of A/D values per degree.
Leo..

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.