Arduino Mains Failure Battery Backup Circuit

The article explains a simple mains failure backup circuit for providing Arduino boards an uninterruptible supply during such situations. The idea was requested by Mr. Fredrik.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: the Design

The simplest way to implement the proposed application is by using two diodes as shown in the above diagram.

The design shows two diodes with their cathodes connected together and anodes terminated to a 14 V source and anodes to the positive of a 12 V battery source respectively. The common cathodes of the diodes are further connected to a IC 7805 IC whose output is finally applied to the Arduino board.

When mains is present the 14 V supply ensures s constant trickle charge supply to the attached battery via R1 and also feeds the Arduino borad through D1 and the 7805 IC.

In this situation D1 cathode experiences a much higher potential than the cathode of D2 due a relatively lower battery potential at D2 cathode.

The above situation keeps D2 reverse biased allowing the battery charge to stay blocked and pass only the adapter voltage to the Arduino board.

But as soon as the mains supply fails, D1 instantly stops conducting and enables D2 to get forward biased so that now the battery instantly takes over and begins supplying the Arduino via the 7805 IC.

Step 2:

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    9 Discussions

    Arduino (atmega328) works work on 5V. Arduino board has a inbuilt regulator to regulate voltage. 7805 here is present not to overload the regulator on the board.


    Reply 4 years ago

    Let me clarify one very important thing, voltage regulators have a voltage drop of around 1.2v so you cannot just put them in series to "avoid overloading". Besides the one on the board should work fine for many applications, in case you need more, you can take the output of your regulator to feed you power consuming devices and leave your arduino with the built-in one. But belive me, what you said is going to give lots of trouble if it works, the atmega ic needs 5v to work and should be as clean as possible. Talking about clean, dont forget the in and out capacitors for the regulator, they are needed for stability.


    Reply 4 years ago on Introduction

    I would assume because a 12v battery could be well above 12v when fully charged, upwards to the 14.4v range and it needs to be regulated. Could be wrong though.


    4 years ago

    Would this work with multiple Arduino's? I also have a Beaglebone Black that I would like to incorporate into this kind of setup. Or would I have to build one per MCU?


    5 years ago

    Smart idea! Thanks for shearig :)