Electronic – How to wire a potentiometer to an ADC for low power

adclow-powerpotentiometer

I'm designing a microcontroller based device which spends most of the time in deep sleep.
Every 10 seconds it wakes up, reads a potentiometer connected on an ADC line then goes back to sleep. My aim is to achieve a long battery life.

How should I wire the potentiometer up to the microcontroller in order to minimise power use?

For my first attempt, I wired a 1K pot to 3V3 and GND with the wiper attached to the ADC. No matter what resistance is set on the pot, this seems to consume 3-5mA continuously.

Should one or more of the pot pins be connected to GPIOs and driven only when needed?
If so, should the pins be driven low or tristated when not in use?

Best Answer

I would suggest wiring both ends of the pot to port pins that can be configured not to burn quiescent current while sitting at half-rail (many processors have pins that can be configured to be either digital outputs or analog inputs) and float both ends of the pot while not taking readings. Connect the midpoint of the pot to an ADC input, with a significant-value cap to ground. If you have multiple pots and can't afford to use three processor pins for each one, you could e.g. use external chips to connect and disconnect the ends of the pots. Note that the ends of the various pots should not be tied together; when a pot is disconnected, it should not connect to anything else.

If you do things this way, the ADC input voltage, with its cap to ground, should remain roughly constant when the pot is connected and disconnected. When powering up the cap, take readings repeatedly until either they stabilize or it becomes clear they won't (because they go up and down, rather than asymptotically approaching some value). If there isn't too much leakage in the circuit, you shouldn't have to have the pot powered up very long if it isn't being moved, since the cap should start out at, and remain at, the proper voltage.