Wiring relays for 2 voltage sources.

Thread Starter


Joined Dec 16, 2015
I have a 12v battery (lithium ion pack) and a 12v wall wart. I want the battery to give me a 12v output when the wallwart is not plugged in and the wallwart to give me a 12v output while charging my battery. I dont want to use normal toggles/push buttons to do this, i want it to be automatic. The best i could come up with is relays. Here is my wiring diagram. Will this work? Can you suggest another way of accomplishing this? Thanks in advance

Mod edit: reduced image filesize


Last edited by a moderator:


Joined Dec 2, 2013
Mcgyvr, You are correct. However: as stated by you the Vf is affecting the output.
Pfet could be used as a diode for this application gate to gnd (use a Vg>=20V I=10A int Rsd > 15mOhm ).
10A @ 15mOhm=> 150mV and 100*15*10^-3 =1.5Watt
Diode .6V approx 10*.6=6Watt ( agree som diodes do better)



Joined Oct 15, 2009
I'd love to see a 10A @12V wallwart
But yes a fet might be a better solution depending on the specifics of the OP's needs..

Maybe the OP should just use a change over power jack (not sure if thats the right term) but a power jack that can disconnect another source upon insertion..


Joined Jun 22, 2012
One relay will do, you need a diode in series with the coil to the NC contact, to prevent the relay from being powered by the battery, the wallwart powers the coil only.