Primary and Secondary Power Supply

Hello,

I would like a circuit where I have 2 12V power inputs. It needs to use one as a primary source and if that is not present use the other. If the primary comes back on use that one again.

Any help appreciated!

Why not use the secondary all the time? Just make them 12.7 Volts and use diodes to connect them.

Run them both through diodes, preferably shottky so there's less voltage drop but that may not matter if the 12v is further regulated.

If you can get a 12V relay with contacts rated for the desired load current , you can simply wire the relay coil across your primary supply and connect your load to the COM of the contacts, and the primary supply to the N.O. contacts and the secondary supply to the N.C. contacts. The result will be , when the primary supply turns on , the relay will energize connecting the primary supply to the load through the N.O. contacts. If the primary supply shuts down, the relay will deenergize, connecting the secondary supply through the N.C. contacts. Remember to connect all three GNDs together, and to the arduino GND if you are using an arduino. The PRI/SEC switching is obviously a hardware setup that requires no other components or uP.

Well, again we have the "XY Problem".

The answer depends on everything. :roll_eyes: What power supplies, what is the "circuit", under what conditions will these supplies function or not function?

Raschemmel's relay for example, may break the circuit briefly, and may (presumably will) only drop out when the "primary" supply drops to 6 V.

But does this matter?

We do not know, as the OP has not told us what (s?)he is talking about.

Raschemmel's relay for example, may break the circuit briefly, and may (presumably will) only drop out when the "primary" supply drops to 6 V.

TRUE, but if it were necessary, a circuit could be designed to make it more "robust" using a comparator and maybe an ATtiny85, and possibly some electrolytic caps.

Diodes may be fine, depending on the current.
For example, this schottky diode will handle 2A from the supply and only have 0.36V across it, leaving 11.64V for the circuit.
http://www.digikey.com/product-detail/en/sanken/RA-13V1/RA-13V1CT-ND/4572566
Plenty to choose from:
http://www.digikey.com/product-search/en/discrete-semiconductor-products/diodes-rectifiers-single/1376383?k=diode

blues1143:
Hello,

I would like a circuit where I have 2 12V power inputs. It needs to use one as a primary source and if that is not present use the other. If the primary comes back on use that one again.

Any help appreciated!

Your secondary source wouldn't happen to be a battery, would it?