5
\$\begingroup\$

I'm building a battery powered device and I want to make sure, that no current is drawn from the battery, if USB is plugged in (while charging). I know that I could solve this with two diodes, but every 100mV counts in this project, so 0,3V voltage drop would be too much. Current draw is +-1A.

Is it a good approach to do this?:

circuit

The switch simulates the USB Plug-In

I'm asking because I think the P-Channel MOSFET then passes current to the battery, due to the body diode. If it's true, I need another MOSFET to block the other direction, but is it worth it then? Or would 2 MOSFETs in series end up in the same voltage drop as a shottky diode?

\$\endgroup\$
2
  • \$\begingroup\$ Are you not charging the battery when it’s plugged in? As long as your charging controller (and USB connection) can provide more current than you are using, no current will be drawn from the battery. Even if: Wouldn’t it be better to draw some current from the battery instead of running into a brown-out? \$\endgroup\$
    – Michael
    Oct 3, 2020 at 10:27
  • \$\begingroup\$ Yeah the Problem is, I use a TP4056 and the load is an LED strip with MCU where one of the LEDs indicates charging or fully charged by color. But the one LED draws so much current, that the TP4056 never ends charging, if it uses the battery. \$\endgroup\$
    – Helyon
    Oct 3, 2020 at 11:26

1 Answer 1

7
\$\begingroup\$

With the drain and the source connected as you show, it will do what you want — the body diode is pointed in the correct direction, as shown below. But you do need a diode in the USB path, so that the gate can be pulled to ground when the USB is disconnected.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
4
  • \$\begingroup\$ Damn, thank you very much for this perfect answer! The missing diode is so obvious, don't know why falstad simulator worked without it... \$\endgroup\$
    – Helyon
    Oct 3, 2020 at 1:20
  • \$\begingroup\$ I would remove the switch and place the diode there instead. The diode will then protect against the USB supply beeing "dead", ie output less than about 3.7 V. \$\endgroup\$
    – ghellquist
    Oct 3, 2020 at 8:19
  • 1
    \$\begingroup\$ @ghellquist: As the OP said, "The switch simulates the USB Plug-In." It isn't part of the actual design. And the diode needs to be exactly where it is. Otherwise, the gate is shorted to the source and the MOSFET never turns on -- the only conduction is through the body diode. \$\endgroup\$
    – Dave Tweed
    Oct 3, 2020 at 10:48
  • \$\begingroup\$ @DaveTweed Thank you. Learn things every day. I want to add that an unpowered USB supply might short its output to ground or output any voltage between zero and 5V. It is not supposed to, but you never know. \$\endgroup\$
    – ghellquist
    Oct 3, 2020 at 11:06

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.