0

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.)

JRE
  • 67,678
  • 8
  • 104
  • 179
chuackt
  • 609
  • 3
  • 9
  • 4
    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? – brhans Jul 13 '22 at 12:53
  • 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. – Justme Jul 13 '22 at 12:56
  • 2
    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. – chuackt Jul 13 '22 at 13:02
  • This technique is used to make measurements more stable versus supply voltage variations. It's quite useful. – Arsenal Jul 13 '22 at 13:36
  • 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. – TimWescott Jul 13 '22 at 14:48
  • You really shouldn't read out in volts when your reference varies that much -- just read out in ADC counts, or give your ADC an accurate reference voltage (and, in this case, run your sensor off of a voltage derived from that accurate reference). – TimWescott Jul 13 '22 at 14:49

1 Answers1

7

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.

Justme
  • 127,425
  • 3
  • 97
  • 261