This circuit is a simple form of the commercial UPS, the circuit provides a constant regulated 5 Volt output and an unregulated 12 Volt supply. In the event of electrical supply line failure the battery takes over, with no spikes on the regulated supply.
The secondary winding should be rated at least 12 Volts at 2 amp, but can be higher.
LED 1 will light ONLY when the electricity supply is present, with a power failure the LED will go out and output voltage is maintained by the battery.