Go Down

Topic: Automatic switching to battery on mains failure? (Read 7 times) previous topic - next topic


Hello all,

I'd like to design a circuit such that my Arduino can automatically switch to a backup battery if the standard power supply (a wall wart) fails, due to a power outage or circuit breaker tripping, etc.

Any thoughts on this? I know the Duemilanove reference design has circuitry onboard to automatically switch between USB and external power. Can I reliably copy that to switch between "external" and "battery" power?

Bonus points if the solution has some capacity to charge the battery and is cheap. I'd like to use rechargeable batteries and include some form of battery maintenance (trickle charging?) so I don't have to worry about a 9v battery going flat. This is a custom "embedded" Arduino so I'm starting from scratch - there's no onboard USB and the default power switching circuit in the Duemilanove design isn't there (right now at least).

I'm sure this has been done before but I'm not finding much.


Oh, and more bonus points if the solution includes an obvious way for the Arduino to determine which power source it's running on (so it can sound an alarm when it switches to the battery).

I guess what I'm looking for is a small-capacity DC UPS.

Dan Steingart

The easiest way to do this use something off the shelf like this:


Attach a battery (any small lithium ion will do), and apply mains power through a standard AC adapter.  When power is cut to mains the battery is both charged and ready to go.  


Hi there,
If you are looking to embed something in your application, I would think that starting with a supervisory circuit IC like this: http://www.myermountain.com/node/24  would be a good place to start.  

Disclaimer: This is listed on my website with other surplus components that I have for sale. (I have a $5.00 minimum order and ship as much as possible in a single USPS flat rate box)

I cannot advise on the exact circuitry that you need to use but I am sure a copy of the data sheet would guide you well.

HTH- Jeff


Linear Technology and Maxim make a number of ICs that will work in your
application. Search for "power path controller" and "battery charger".
Some of the newer ICs will integrate both functions. Some ICs also integrate
switching regulator and LDO functions too.

For a very simple switchover two diodes will work. The issue is the forward
voltage drop. The powerpath controller uses a FET which has a much
lower drop. TI makes an "Ideal Diode" IC. The higher the voltage drop
the less margin you have for the linear regulator.

I have used the LT4412 for powerpath control and the MAX1555 for Li-ion

(* jcl *)

www: http://www.wiblocks.com
twitter: http://twitter.com/wiblocks
blog: http://luciani.org

Go Up