# Electronic – How to Use Diode Oring to Switch between Two Power Sources?

batteriesdiodesswitching

I want to switch Power Between a AC/DC adapter which is supplying power to the circuit when AC power is On and when power loss power the circuit using 12V 7Ah Battery. AC/DC adapter is rated 12V 1Ah.

First I thought switch power with a Relay and Arduino with a sensor to monitor AC power loss. but I Came to know there is a better way using a Diode Oring.

Please explain how to use diodes to switch between power Supplies and what diodes to use for this?

I saw that in a article, to Diode ORing to work main supply should greater than backup. so in my case both the main supply and backup supply is 12V.

so Diode ORing option will not work as expected?

You can do this, and EM Fields answer is correct as far as it goes.

But be aware that whichever source has the higher voltage will supply most of the current. This means that the battery cannot be charged to a higher voltage than the adapter. This will prevent giving it a full charge. This site indicates that the minimum voltage for charging should be more than 12 volts, although something near 12 will probably work to give a partial charge at a very slow rate. Even if you use an externally charged battery, a lead-acid maintained at 12 volts will not have anywhere near full charge. Here, for instance is a chart which suggests that if your battery is only allowed 12 volts it will only have about 50% charge.

That's not to say you can't do it and get something that sort of works (and may even be adequate to your needs), it's just that you'll need to do some experimenting and may be disappointed with the results.

Diode steering is much better used when the primary voltage is somewhat higher than the backup voltage. If possible, something like a 15 volt supply and a 12 volt battery would be a better match.

EDIT - The idea of using an Arduino to detect a power dropout and switch in a battery is certainly possible, but you can do it automatically.

simulate this circuit – Schematic created using CircuitLab

Here, if the supply is active the relay is pulled in and the output is about 11 volts. If the supply is interrupted the relay opens and selects the battery.

This has a number of features. Most importantly, the relay is not a 12 volt relay. The problem with a 12 volt relay is that it will not release until the voltage across the coil gets quite low - sometimes as low as 15% of the nominal voltage. With a 5 volt relay and 7 volt zener, the relay will drop out at a much higher voltage, decreasing the period of low voltage associated with the switchover.

The capacitor is quite large and depends on both the load current and the relay speed. The higher the current and the slower the relay, the larger the capacitor should be.

The diode allows for the possibility of a fast turnoff of the supply by preventing the cap from discharging back to the supply before the relay releases.

The biggest problem with this setup is the current surge associated with changing states. This can damage the relay contacts, so use a relay with considerably larger current rating than your load current.