I need a circuit which will automatically disconnect the battery from LOAD when ext. DC power is connected so that the battery won't get damaged.

Theoretically a pair of diodes can solve this but since voltage drop is not a good thing for a portable device, so after reading few topics about an "ideal" diode (first and second) I came up with simply rotating MOSFETs (connecting SOURCE to actual drain and DRAIN to actual source) so body-diode will block unwanted reverse current flow: automatic power source switching schematic

Q1 Is preventing battery from discharging to DC IN when e.g. 5V source is connected and isolating DC IN positive wire from battery, so we can detect a ext. power supply is connected.

Q2 Is preventing DC IN 9-24V from going to battery and damaging it.

But probably a small amount of current will flow thru Q1's body-diode to battery at first moments after ext. power is connected (or contact bouncing) before Q2's gate has triggered, but I'm not sure if it's something to worry about.

Anyway I have a strong feeling I'm reinventing the wheel here, so I need other standard solutions/ideas please. Requirements are:

  1. Automatic and fast switching. Actually a 2-position toggle switch can be a good solution here but it will require manually selecting the source:

manual input selection

  1. Loads up to 6A, voltage range: 4-30V
  2. Small, but as simple and cheap as possible (so two relays/SSRs @6A is too big and expensive)
  3. No diodes at load current flow please, since 0.4V@6A is 2.4W of heat and ~5-6% loss in efficiency (which is bad for a battery-powered device).

Or, if first circuit seems to work just fine and there's no significant errors I made, maybe I can use it? Thanks for help!

Oh, it seems like I found a problem – Q1 won't open after external power supply is disconnected, because current from Q2's body-diode can flow thru Q1's SOURCE-DRAIN to Q3 BASE, keeping Q2 from closing and Q1 from opening. Adding a diode can fix this. Yes, it will drop some voltage, but since it's true just for external power source, we won't lose any portable efficiency :)

fixed schematic

  • \$\begingroup\$ You may want to take look at existing ic designed specially for this purpose. Search "Battery Management Protect w/ Pwr Down protection IC" (one of these keyword or all keywords together) on your favorite online vendor. and "Supervisory Circuits, Voltage Detector". It costs 30ct/pc if you buy by lot of 10... \$\endgroup\$ – Fredled Jan 26 at 19:35

Actually the dual-PNP circuit can be used to control the second PFET directly:


simulate this circuit – Schematic created using CircuitLab

Q1 and Q2 function as a differential pair — when one is conducting, the other is cut off.


Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.