[SOLVED] Aref 1.1V INTERNAL and potentiometer

Using a 5.1V PSU powering my set-up, I have set Aref to 1.1V INTERNAL to measure some low voltages with the ADC, which works well. But I also need potentiometers in my set-up. So from the 5.1V PSU input, I made a voltage divider with a 100kOhm and 27kOhm resistor, and with a DMM, I measure 1.08V, which is close enough. However, when putting a 10kOhm linear potentiometer in, using that voltage, the voltage drops to 0.326V and the ADC returns a maximum value of 308. What am I doing wrong here?

1 Like

I don't know what you are doing wrong without knowing your code and schematic.
Remember: A picture speaks more than a thousand (or million) words.

Also tell us which Arduino you are using. This is right.

Are you putting the 10k pot parallel to the 27k lower leg of the voltage divider? In that case, you can indeed expect the kind of output you're getting. Google "resistors parallel value".

Do you mean across the 27K resistor?

@rsmls @jim-p Uh, parallel.

Skärmbild

There's your problem.

Why not make the 10k pot the lower leg of the voltage divider and make the upper leg a suitable value. Something like 47k.

Yeah, you're right. Thanks. Drawing a schematic helps. With 39kOhm and the 10kOhm, I should get 1.02V which is close enough.

1 Like

Bad design, unless stability isn't a requirement.

A pot is a ratiometric source, and needs to be measured with a ratiometric A/D (default Aref).
The pot needs to be powered from the same source of Aref, to be stable.
1.1Aref (stable) and 5volt (maybe not so stable) makes the returned A/D value depend on the position of the pot and the 5volt supply for the pot.

A better way is to power the pot from the 5volt pin, and switch Aref between default and 1.1volt Aref dynamically. No resistors, just code.
Leo..

1 Like

Trouble is that switching (in code) from INTERNAL to DEFAULT is quick, but switching from DEFAULT to INTERNAL is slow. It takes about 6 milliseconds for ADC readings to settle for an ADC prescaler of 32, which is what I'm using to read analog sensor data.

If the potentiometer reading is a wee bit unstable (have not seen it happening just yet), I won't mind. It's just there for users to adjust the brightness of a display any time they wish.

What is the required voltage range ( dim to full bright)?

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