The circuit shown below was requested by one of the readers, it is a power supply circuit which trickle charges a battery when AC mains is available, and also feeds the output with the required DC power via D1. Now, the moment AC mains fails, the battery instantly backs up and the compensates the output failure with its power via D2.
All Diodes = 1N5402 for battery up to 20 AH, 1N4007, two in parallel for 10-20 AH battery, and 1N4007 for below 10 AH.
R1 = volt/charging current (Ohms)
Transformer Current/Charging current = 1/10 * batt AH
C1 = 100uF/25