Hello, I'm currently occupied in project that puzzles me a little bit. I have a 12v wall adaptor that enables a relay so that the arduino can sense power outages. In order for it to be easy to use, it is necessary that the arduino is supplied by the same wall adaptor. The problem is that when the power goes off, the arduino will stop working. So, is it feasible to place a battery in parallel with the adaptor so that when the adaptor stops supplying electricity, the battery takes over.
In know that by placing 2 batteries in parallel we incerease the capacity. But what happens if we place 1 battery and an adaptor in parallel.
If you have a suitable battery charger and battery (so that it is safe to leave the battery on charge continuously) if you put a diode between the charger and the battery so that the battery cannot feed power back to the charger you can use the Arduino to detect the voltage upstream of the diode as a way of knowing when the mains power fails. The Arduino will continue running from the battery.
You perhaps need to describe in more detail the scale of your project - what is it you need to do in the event of a power outage and what else will the system do. This will determine what sort of battery backup is in order.
If for example you do not need to do anything during the power outage, then you can use an inexpensive RTC (Real Time Clock) module with a battery backup in the form of a lithium coin cell to record the time and duration of the outage to be dealt with once power is restored and the Arduino restarts.
A set of normally closed contacts on the same relay could provide battery power to the Arduino. I believe a large capacitor on the Arduino's supply pins is necessary to maintain power to the the Arduino during the power transfer. - Scotty
scottyjr:
I believe a large capacitor on the Arduino's supply pins is necessary to maintain power to the the Arduino during the power transfer. - Scotty
With the system I suggested there is no transfer of power and no interruption in the Arduino power supply.
Thank you for your advice. ROBIN2. While your suggestion is closer to what I'd been thinking, you troubled me a little bit for the fact that the battery should be charging all the time. So I'll try using a relay to alternate from the two power sources and a capacitor to fill in the gap. Thank you all again and I'll inform you for the result.
Look for an emergency light fixture that turns on when the power goes off. They have a 6 volt storage battery that could power the Arduino for days. Remove the light and connect your Arduino in place of the light and you are good to go!
Mikos_Mikekos:
you troubled me a little bit for the fact that the battery should be charging all the time
That is quite common - especially with lead-acid batteries. The important thing is to ensure the charger and battery combination are suitable - mainly to ensure that almost no current flows when the battery is fully charged by matching the charge voltage to the battery voltage.
IIRC, lead acid batteries prefer being stored at full charge and don't mind trickle charging at all. Lithium Ion batteries you need to be more careful with.
Also - have you considered a supercapacitor? Depending on how much power you need, and for how long, maybe a supercapacitor could hold it for long enough?
ok I got it robin2. And since the relay solution didn't proved to be effective for me I'll try that.
DrAzzy: how about nickel batteries. I use one simple nickel battery from an old rc car. Also, I currently live in RD Congo :o where even transistors are hard to find. All the electronics I have are the ones I have taken with me from Greece.