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:
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:
- Automatic and fast switching. Actually a 2-position toggle switch can be a good solution here but it will require manually selecting the source:
- Loads up to 6A, voltage range: 4-30V
- Small, but as simple and cheap as possible (so two relays/SSRs @6A is too big and expensive)
- 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 :)