[HH] low battery indicator: reducing voltage divider current

Tom Metro tmetro+hhacking at gmail.com
Fri May 25 06:10:43 EDT 2012


Greg London wrote:
> The mosfet idea puts the battery voltage on the Gate, the Source
> tied to ground, and a resistor from the Drain to a programmable
> pin on the microcontroller.

Huh? The circuit I expected was:

             B+
             |
             R1
MCU ADC|-----|
       |     R2
       |     |
       |    .|D
    OUT|--G|_   Q1
       |     |S
             |
            GND

Where the MOSFET (Q1) is in series with the voltage divider (R1, R1),
and an output pin from the MCU drives its gate.

I guess your concern is that the ADC will see 12 V when the divider
floats, and tying a small signal diode from that pin to 5 V will again
provide a path for the voltage divider (or at least R1) to continue to
needlessly leak current when in sleep mode.

Is this the challenge you are trying to work around and why you had the
MOSFET turned around and operating in the linear mode?

Do you have any open collector outputs? If so, use that output to drive
a PNP transistor placed at the top of the voltage divider. If not, use
an NPN transistor as a driver.

I guess this is effectively what you were getting at with the
optocoupler approach. (I'd be more inclined to use transistors than an
optocoupler.)

 -Tom




More information about the Hardwarehacking mailing list