Electronic – Automatic Power Selection with MOSFET

analogdcmosfetswitchesvoltage

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

Best Answer

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

schematic

simulate this circuit – Schematic created using CircuitLab

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

Their state is determined by the relative voltage on their emitters. When "Line" is higher than "Load", Q1 is conducting and Q2 is off, which means that M2 is off and M1 is on. When "Line" drops below "Load", Q1 cuts off, turning Q2 on, which in turn switches M1 off and M2 on.