3
\$\begingroup\$

I have a circuit which uses a battery boost converter to power the MCU. I use the ADC on the MCU to measure the actual battery voltage to display how much charge is left in the battery.

The power side is protected from reverse polarity since the boost converter won't power up if the batteries are inserted backwards.

The ADC PIN of the un-powered MCU, however, will see negative -3 Volts between VBAT and GND. MCU pins handle -0.3V max, not -3V.

Adding additional components either mess up the measuring of the battery voltage or in the case of a reverse protection diode possibly short the batteries (not user friendly).

What's the solution here? Pretty sure I'm not the first person with this issue. How is this commonly dealt with?

thanks!

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
5
  • 1
    \$\begingroup\$ Moderate series resistor and diode clamps to the rails? The MCU may already have those, if you're lucky they have a published injection current limit you can compare to the resistor. \$\endgroup\$ Commented Sep 11, 2020 at 19:17
  • \$\begingroup\$ Put a resistor R between battery and MCU's ADC PIN and make it as large as you can get away with: not so large that the input current of the MCU pin causes a significant voltage drop across R, but big enough to limit battery current drain when off (current through R and the clamp diode of the MCU). If current drain when off is still unacceptably high then put in an active switch to enable reading of battery. \$\endgroup\$
    – td127
    Commented Sep 13, 2020 at 23:14
  • \$\begingroup\$ @ChrisStratton could you turn the comment into an answer? I'm curious what the diode clamps will look like. \$\endgroup\$
    – MandoMando
    Commented Sep 14, 2020 at 12:57
  • \$\begingroup\$ @td127 wouldn't an active switch have a voltage drop? and in that case, why not just use a diode and adjust for the voltage drop? \$\endgroup\$
    – MandoMando
    Commented Sep 14, 2020 at 13:08
  • \$\begingroup\$ How about an ideal diode? \$\endgroup\$ Commented Sep 14, 2020 at 19:56

1 Answer 1

1
\$\begingroup\$

The MCU input pin has (presumably) protection diodes to both ground and VCC. It’s the diode to VCC that can become a problem when unpowered because the 3V at the MCU pin now has a path through that diode to the VCC net which almost assuredly has a residual path to ground (through the MCU, other unpowered chips, passive networks from VCC to ground, etc.)

If that residual resistance is small it might destroy the MCU pin by exceeding its current rating. If it’s large enough it won’t hurt the MCU but will still be a load on the battery when off, which is not desirable.

Putting a series diode between battery and MCU would protect the MCU against a battery plugged in backwards but do nothing to protect again unwanted current flow during power off (path now being through two diodes instead of one).

An active switch from battery to MCU is probably best bet to solve these problems. The most straightforward approach may be a MOSFET in series:

schematic

simulate this circuit – Schematic created using CircuitLab

The gate needs to be asserted high (by a GPIO from the MCU for example) to turn on the FET so the battery can be read. With power off, gate is low, Vgs = 0 and the FET is off.

If the battery can be inserted backwards, a series diode from the battery to the FET may be a good idea.

OOPS - As Chris Stratton pointed out, the single MOSFET won't work. You need two. The pulldown transistor could be a simple NPN:

schematic

simulate this circuit

But if all you really care about is protecting against a reversed battery (as your original post indicates) then a simple diode would work. With a Schottky diode (e.g. BAT54) and such a tiny current draw you would only lose a few tenths of a volt in the measurement:

schematic

simulate this circuit

\$\endgroup\$
13
  • \$\begingroup\$ How are you going to get a positive VGS (eg, a voltage above the supply input) to turn the gate of an enhancement-mode NFET on? Typically this would be an application for a PFET, possibly enabled in turn by an NFET \$\endgroup\$ Commented Sep 14, 2020 at 18:40
  • \$\begingroup\$ Thanks Chris - I've edited the schematic to use two FETs. Look good now? \$\endgroup\$
    – td127
    Commented Sep 14, 2020 at 19:55
  • \$\begingroup\$ Much better in concept, but you need FET's with a lower threshold voltage such that they'll be "really" and not just "barely" on at 3 volts drive. \$\endgroup\$ Commented Sep 14, 2020 at 19:57
  • \$\begingroup\$ Thanks again. Replacing M1 with a standard NPN (resistor to base) will get rid of one of the fussy FETs. The P-chan MOSFET is unavoidable and will need to have a low Vgs. \$\endgroup\$
    – td127
    Commented Sep 14, 2020 at 20:10
  • \$\begingroup\$ @ChrisStratton to your point, this is what I had initially, but as the batteries ware down, 3V can get as low as 1.6V, barely ON and effectively change RdsOn. \$\endgroup\$
    – MandoMando
    Commented Sep 15, 2020 at 12:47

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.