Switching between two power sources


I’m working on a low-power project that requieres to switch between a standard and a emergency power source. I’ve seen few complex circuit designs to accomplish this task, therefore I wonder what’s would be wrong with the following simple approach:

1.- Use the Arduino to control two MOSFET transistors as switches to turn ON-OFF either power source
2.- Add a capacitor on the Arduino side of the switches to keep the MCU running during the few milliseconds that the transition takes.

Would that work?

If yes. Any suggestion on the ideal capacitor type and size to use (to minimize power losses)?


These days there are many chips designed to do just this with minimal external components.

For example the LTC4415 or LTC4412.

You can find some inspiration in the datasheet of the Arduino boards. They have to switch between USB power and power from the barrel jack / Vin pin. Small Arduino’s, like the Nano (datasheet), simply use a (schottky) diode in series with the 5V USB. You have to be careful not to have current flow backwards into one of the two power supplies, though. A second diode could solve this. (The LTC4415 Graynomad proposed is essentially a pair of diodes with some extra features.)
The Uno (datasheet) uses a comparator (or op-amp) to check the Vin voltage: when it’s higher than 6.6V, it turns off the USB power. (You still have the issue that current could flow backwards through the voltage regulator though.)

Since you are looking for a low-power solution, two schottky diodes might be the easiest way. (One in series with each power supply: the supply with the highest voltage will be used.)

The problem with the 2-MOSFET+capacitor approach is that both MOSFETs could open at the same time, or that they are both closed during transition, like you said. Also, you’d need some way of ‘bootstrapping’, to turn on one of the MOSFETs when power is applied. (The Arduino cannot turn on the MOSFET to power itself.)


Thanks Graynomad and Pieter,

The LTC4415 is indeed a pretty good solution, but I like the schottky diodes solution due to simplicity and cost.
Thanks a lot for pointing out the problems of my original idea, that was very helpful.

I'll add a thought in case it comes handy to others: As my emergency power source is a non-rechargeable low self-discharge battery, I was worried about leakage current trough the diod that could discharge the emergency battery over few years, but it looks like it is easy to find schottky diodes with leakage in the range of the nA, so that's not something to worry about.


Diodes are by far the easiest method, but you lose power across them, that doesn't matter much with the primary source (usually) but knocking ~300mV off a battery is sometimes an issue.

In this case you can use an LTC4411 (perfect diode) in place of the diode on the battery, no external components required and (almost) zero voltage drop.