PDA

View Full Version : Measuring value of pot with varying supply voltage



robertbat
- 11th August 2012, 19:35
Hello,

I need to measure the value of two pots with PicBasicPro, but the supply voltage is not constant. It varies between 2.5 and 3 vdc. The chip I'm using does have a voltage reference pin, but I don't think it can handle much current. I am very limited as to space and current consumption, so any help would really be appreciated.

Thanks in advance.

HenrikOlsson
- 11th August 2012, 21:43
Hi,
The Vref pins (if you're talking about the PIC your using) are reference inputs to the ADC - they can't supply any current.

The most common way to use the ADC is to set it up to use Vdd and Vss (ie the PICs supply voltage) as the positive and negative references. That way the ADC full range result is equal to the powersupply voltage, it doesn't matter if the supply isn't stable as long as your pots are connected across the same supply.

If the ADC is set to 10bits and the pot is at 50% the ADC will gice you ~512 no matter what the power supply voltage is - as long as it's within the limits of the ADC of course.

/Henrik.