Battery Backup
This is not a battery charging circuit, just a basic circuit for brief interruptions in mains power. This circuit monitors the battery level and will indicate if the batteries are good with a green LED, and when they should be replaced with a red LED. With Schottky diodes, there is no interruption in power when mains power supply removed (power outage) or simply unplugged so you can move your project without a power drop.
For where I live, brief power outages are common and I needed something for a binary clock I built as well as a digital clock I am working on. I came across this circuit on a digital clock schematic, redrew it to correct some errors, and it works great. I have this operational in 3 projects I have made.
Downloads
Supplies
Full size breadboard or solderable breadboard, x1
3 cell AA battery holder, x1
AA battery, x3
IC TL072, x1
8 pin socket, x1
header pins, x4
diode 1N5819, x2
LED, green, 5mm, x1
LED, red, 5mm, x1
resistor, 100K trim pot (104, 3296W), x1
resistor, 100K, x2
resistor, 470K, x1
resistor, 270K, x1
resistor, 4.7K, x2
10 μF 25 volt electrolyte capacitor, x1
100 nF (104) monolithic capacitor, x2
If making this on a solderable breadboard, I used the following parts for mounting the battery holder and the PCB:
hex nylon standoff, M3x6, x6
nylon pan head screw, M3x4, x4
nylon countersunk screw, M3x10, x2
Assembly
Assemble circuit as shown in the schematic. I use colored header pins, red for +5 and black for ground.
Testing
Once the circuit is assembled, test the operation. Insert 3 fresh AA batteries into the battery holder, the green LED will light.
Then connect your 5 volt power supply to the correct header pins as shown in the photo.
Now remove 1 battery and the red LED will light, green LED will go out, adjust the trim pot as needed to get these indications. When all 3 batteries are installed and the red LED lights, that indicates you need to replace the batteries.
Now there will be no interruption in power when the mains power supply is removed.
Usage
I have used this circuit as described here, as a separate PCB, and have used this built onto the PCBs of other projects. Feel free to incorporate this as you desire into your projects.