I saw this module as a "battery emergency switch module" for $2 on aliexpress:

battery emergency switch module

which is just a relay energized by the external power supply, and when the external supply is gone, connects the battery to output. despite a relay could switch higher currents than a same priced diode, it is slow and the chances that the circuit resets are high. also, the relay may stay energized with lower voltages than the nominal supply, while the circuit has turned off because of low voltage.

what could be the problems with a simple circuit like this ?


simulate this circuit – Schematic created using CircuitLab

it is cheaper (for some applications at least) and much faster than the relay. it doesn't have the problem of low voltage mentioned above.

  • 2
    \$\begingroup\$ If you can tolerate the diode voltage drops, their current rating is adequate, and their reverse leakage current isn't too high : nothing at all. \$\endgroup\$ – user_1818839 Oct 7 '20 at 17:35
  • \$\begingroup\$ @BrianDrummond I was wondering why they don't make a module of this kind. \$\endgroup\$ – Tirdad Sadri Nejad Oct 7 '20 at 18:06

The two diode arrangement is used a lot, not only for battery backup but also for other similar purposes (e.g. redundant power supply units).

Simple diodes have a voltage drop that may or may not be acceptable in your use case. The mitigation measures for the voltage drop include:

  1. Using higher supply voltage (voltage drop of ~1V is bad in 5V circuit and becomes way less of a concern in 24V circuit)
  2. Using Shottky diodes or germanium diodes (they have less voltage drop, like 0.2-0.5V vs 0.7-1.2v for silicon ones)
  3. Using MOSFET-based "ideal diode" circuits that are more complex and expensive but can go as low as 0.02V drop.

I fully understand your concerns that you have about resets etc that may result from slow operation of the relay.

A simple suggestion would be an improvement to the diode solution.

A single pole changeover relay could short out 1 or other diode depending whether the power supply or battery was providing the load. It'll introduce a small change in voltage but overcome the lost power.


There are two problems with the two-diode circuit. The first is the voltage drop over the diodes. With standard silicon diodes, there is a typical 0.7 volt drop. So if you use 5 volt power, you’d better be sure your device will function properly on 4.3 volts. You can also use Shockley diodes to reduce the drop.

The second problem, or better, disadvantage is that the 2-diode circuit has no priority. It will pass power from whichever source is higher voltage. If you have a 6 volt battery but a 5 volt external power source, your battery will continue to drain until it drops to less than 5 volts. The relay module has priority. While the external power is applied, the battery is disconnected.

  • \$\begingroup\$ but as I mentioned, a 12V relay may stay energized with 10v or less while the 12v circut has turned off. and in the picture I mentioned that the battery would be guranteed to be less than the external power supply. so it would be ok if I address the problems you mentioned. \$\endgroup\$ – Tirdad Sadri Nejad Oct 8 '20 at 7:18
  • 1
    \$\begingroup\$ At rated current most silicon rectifiers have around 1V of Vf. A Schottky (not Shockley) diode will probably exhibit a Vf of 0.4V. \$\endgroup\$ – Graham Stevenson Oct 8 '20 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.