Just starting out, fiddling with an Uno. I would like to use the ADC with EXTERNAL reference voltage but I also would like to be able to swith back to 5V if needed (default).
The reference voltage I produce (1V) is coming from a voltage divider with resistors. Intuitively, I'd say I'm all set up but electronics tend to prove me wrong.
Q: Do I need another resistor before the pin and the output of the voltage divider?
Don't use anything less than 0V or more than 5V for external reference voltage on the AREF pin! If you're using an external reference on the AREF pin, you must set the analog reference to EXTERNAL before calling analogRead(). Otherwise, you will short together the active reference voltage (internally generated) and the AREF pin, possibly damaging the microcontroller on your Arduino board.
Alternatively, you can connect the external reference voltage to the AREF pin through a 5K resistor, allowing you to switch between external and internal reference voltages. Note that the resistor will alter the voltage that gets used as the reference because there is an internal 32K resistor on the AREF pin. The two act as a voltage divider, so, for example, 2.5V applied through the resistor will yield 2.5 * 32 / (32 + 5) = ~2.2V at the AREF pin.”
There is no mention of "an internal 32K resistor on the AREF pin" in the 328P data sheet.
I am searched what I believe is the latest from Microchip, DS40002061B, from 2020.
Nor do I recall ever having seen a 32K resistor on any 328P or 2560 based Arduino board.
-39C! We had a couple of days around 10F, (-12C), but they didn't last long.
A few years ago we had a couple weeks of 5F (-15C), that was pretty cold, froze our washing machine water pipes.
They are wrapped in heat tape now, turns on when temp gets cold enough.
Hooking that 1V onto AREF pin and setting analogReference to EXTERNAL resulted in no voltage drop on the pin. I guess that 32kOhm resistor really doesn't exist.
CrossRoads:
There is no mention of "an internal 32K resistor on the AREF pin" in the 328P data sheet.
I am searched what I believe is the latest from Microchip, DS40002061B, from 2020.
Nor do I recall ever having seen a 32K resistor on any 328P or 2560 based Arduino board.
It's second from the bottom in the characteristics table. Took me 15 seconds to find.
Also note that min/max values are not specified, so this value is not controlled. Do not rely on it for any calculations, it's just meant to be a ballpark figure so you know about how much it's loading your reference voltage.
CrossRoads:
Hmm, ok. I was searching for 32K, didn't think to look for just 32 and units elsewhere.
It also depends on which revision of the datasheet you're looking at. The one I have saved to my computer from years ago has a 50k typical value in the table, which just goes to show you how much they just don't care about controlling that particular value.