Introduction: 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.
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.
11 Comments
2 years ago
Shouldn't there be a special charge management circuit for charging the battery? You cannot have the battery always directly connected to the power supply..
Question 2 years ago on Step 1
Can i put 9 volt adabtor and 9 volt adabtor ?
6 years ago on Introduction
simple but effecive :)
7 years ago on Introduction
Can you tell me why you use the 7805IC? Doesn't the arduino work fine on 12v?
Reply 6 years ago on Introduction
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 6 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 7 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.
7 years ago on Introduction
What's the value of R1???
7 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?
7 years ago
Smart idea! Thanks for shearig :)
7 years ago
thank u