Least expensive circuit to cause one power supply to take precedence over another?

Thread Starter

Involute

Joined Mar 23, 2008
106
I'm planning a device that can run off of AC mains or a battery. The AC will feed a power supply outputting 12VDC at up to 5A. The battery will supply 12VDC - 16.8VDC. I'd like a circuit that will cause the power supply to power the device when the AC is plugged in, and the battery otherwise. A DPDT relay solves the problem nicely (with the coil driven by the power supply), except that an appropriate relay and socket are nearly $30 (qty. 1). Plus, I'm generally inclined toward solid state solutions for size and cost. I initially thought I could use a couple of MOSFETs, but I'm not coming up with anything. Suggestions? Thanks for any tips.
 

Thread Starter

Involute

Joined Mar 23, 2008
106
I thought about those, too, and, at least the way I see it, they'd work great if I wanted the battery to block the power supply, but I don't see how to use the power supply to block the battery. The battery's usually going to be at a higher voltage than the power supply, so just feeding the 12V rail from both with a forward biased diode between the power supply and the battery won't block the latter. There's probably something embarassingly obvious I'm missing. Go ahead, shame me. ;-)
 

Papabravo

Joined Feb 24, 2006
21,158
Assuming you can adjust the output of the supply over some range and that you don't need precisely 12 volts out to whatever goes downstream I don't see the problem.
 

crutschow

Joined Mar 14, 2008
34,280
Assuming you can adjust the output of the supply over some range and that you don't need precisely 12 volts out to whatever goes downstream I don't see the problem.
If the supply can be adjusted to slightly above the maximum battery voltage.

If not, below is the LTspice simulation of a circuit using a diode, a P-MOSFET, and an NPN transistor that I believe does what you want:
The simulation is shown for the battery voltage limits, 12V (green traces) and 16.8V (yellow traces).

The supply voltage shuts off Q1 and thus the MOSFET, which disconnects the battery whenever the power supply voltage is available.
The battery then powers the load through the Schottky diode (for minimum diode forward voltage drop).

For no power supply voltage, Q1 and the MOSFET are on and the battery supplies the load.

1602913400075.png
 
Last edited:

Thread Starter

Involute

Joined Mar 23, 2008
106
Thanks, crutschow. I really appreciate the effort you put in. This definitely behaves the way I want. The rest of the circuit might work with a power supply as high as 20V (I'll have to check), but I was hoping to use something off-the-shelf, so anything between 12V and 24V significantly reduces the choices.
 

Ian0

Joined Aug 7, 2020
9,667
Does the power supply remain connected even when it isn't powered up? If so, its output capacitance may result in a rather slow switch over, which would be good for anything connected (won't be bothered by transients) but not so good for power dissipation in the MOSFET.
I think you could delete R1 and R3, and replace Q1 by a 5.6V zener.
 

Thread Starter

Involute

Joined Mar 23, 2008
106
It looks like there are enough 18V supplies in my price range that I think I’ll just go with one of those and a Schottky diode soldered in-line with the battery lead. Saves me a PCB (and associated design and assembly).
 

Ian0

Joined Aug 7, 2020
9,667
Wise move! But this might be of interest. MCP1402 has a repeatable threshold voltage and 300mV of hysteresis.F170A760-CD6F-43C3-AB70-5C635CF7FBA7.jpeg
 
Top