0
\$\begingroup\$

I am using a 10 bit ADC and 5V supply, so resolution is \$\frac{5}{1023}\$. I decreased my voltage supply to 4V, the resolution now is \$\frac{4}{1023}\$

For both cases, I am reading a constant value of 2.5V from the potentiometer. Shouldn't my LCD screen show a significant increase in voltage value because while the using 5V supply, the number of bit using to represent 2.5V is roughly 511 bits, when voltage decrease to 4V, the same voltage level will be represent by roughly 640 bits. In my original code, I am using (5/1023)*number of bits, hence the reading should increase when the voltage supply decreases but I have not seen significant increase in voltage reading (theoretically, it will be 3.125V.)

\$\endgroup\$
6
  • 4
    \$\begingroup\$ What supplies your potentiometer ... is it the same supply to your ADC? Did you measure the alleged 2.5V coming from the pot using a multimeter? \$\endgroup\$
    – brhans
    Jul 13, 2022 at 12:53
  • \$\begingroup\$ It may should do so, but if your system reads 2.5V even when it should read 5V, it may have a problem in software or hardware and without seeing schematics or code or photo of your breaboard we can't find where your problem is. \$\endgroup\$
    – Justme
    Jul 13, 2022 at 12:56
  • 2
    \$\begingroup\$ I see, I have overlook the issue of potentiometer voltage will drop as well since it is feeding from the same 5V supply as the effect almost nullified each other(lower voltage level, thus number of bits almost the same). Thank for pointing that out. \$\endgroup\$
    – chuackt
    Jul 13, 2022 at 13:02
  • \$\begingroup\$ This technique is used to make measurements more stable versus supply voltage variations. It's quite useful. \$\endgroup\$
    – Arsenal
    Jul 13, 2022 at 13:36
  • \$\begingroup\$ The method that @Arsenal refers to is called "ratiometric measurements" (or drive, in the case of PWM). If you have a ratiometric sensor and a ratiometric readout (like your ADC) then whatever the sensor measures will be accurate even in the face of reference voltage variations. \$\endgroup\$
    – TimWescott
    Jul 13, 2022 at 14:48

1 Answer 1

7
\$\begingroup\$

If you are using VCC as the ADC reference, and using the same VCC as potentiometer reference, then pot output and ADC measurements are both proportional to VCC so the ADC reading stays exactly the same.

\$\endgroup\$
1
  • \$\begingroup\$ Yup, and this is also called a ratiometric measurement. It is a feature, not a bug! :) \$\endgroup\$ Jul 13, 2022 at 18:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.