# Dual power supply switch-over LED circuit

I need a simple circuit that work with two LEDs to do the following:

• When a 12VDC power supply is on, LED1 must be on and the LED for the battery LED2 must be off.
• When the power supply is of LED1 is off and then LED2 of the battery must come on.
• When the 12V supply is returned, the battery LED must be off and the 12V supply LED is back on. Bottom circuit was given by someone but I don't know how to incorporate it to the one above.
• So, what have you tried and where did you get stuck? Aug 18, 2021 at 10:34
• @Justme Comment only: Point understood, and/but "I need" constitutes a question in the context. Instruction in question consruction may be appropriate but may feel a bit pointed on a first post. Aug 18, 2021 at 11:30
• Is there already cicuitry to switch between the power supply and the battery? Aug 18, 2021 at 11:58
• Where does power for LED2 come from, if the battery is disconnected? Aug 18, 2021 at 12:34
• Connect a SPDT relay to the 12 V supply, and use it to switch between the 12 V supply and the battery. Aug 18, 2021 at 12:41

As simple as it is it could be done with one P-channel MOSFET rated for your current & voltages and a small pull-down resistor as long as your battery voltage less than DC source (+12V). And the battery voltage also should be high enough for the rated current/gate voltage.

simulate this circuit – Schematic created using CircuitLab

Once V1 source are connected, gate voltage becomes higher than source the M1 are closed and aren't conducting. So LED2 are off. And LED1 are directly powered from V1.

If V1 are disconnected LED1 are powered off. And M1 gate are pulled down to ground via R1 it opens and starts conducting current from BAT1 to LED2.

Note that I didn't put LED current limiting resistors on the schematic, providing you have some sort of integrated LED modules which you can power from DC source and battery already directly.

Connect a SPDT relay to the 12 V supply, and use the contacts to switch between the 12 V supply and the battery.

• Doesn't answer how the LEDs will indicate the state of the relay. I'd use a DPDT relay instead. Use the other pair of contacts to select which LED is lit. Aug 18, 2021 at 16:33