The above diagram is a basic Uninterupted Power Supply (UPS) circuit. This basic UPS circuit is a very simple and inexpensive.
This circuit can be adapted/modified for other regulated and unregulated voltages by using different regulators and batteries. For a 15 Volt regulated supply, you may apply two 12V batteries connected in series (it will become 24V) including a 7815 regulator (will be 15V stabilized voltage output). There is a lot of flexibility in this circuit.
TR1 has a primary matched to the local electrical supply which is 240V in the UK (it might be various for other countries, 110/120V or 220/240V). The secondary winding should be rated at least 12 Volts at 2 Amperes, but can be higher, for example 15 Volts. FS1 is a slow blow type and protects against short circuits on the output, or indeed a faulty cell in a rechargeable battery. LED 1 will light ONLY when the electricity supply is present, with a power failure the LED will go out and output voltage is supplied by the battery.
The capacity to keep up the regulated supply with no electrical supply relies on the load taken from the UPS and also the Ampere hour capacity of the battery. In the event that you were utilizing a 7A/h 12V battery and load from the 5V regulator was 0.5 Amp (and no load from the unregulated supply) then the regulated supply would be maintained for around 14 hours. Greater A/h capacity batterieswould give a more drawn out standby time, and the other way around.
The complete explanation about this basic UPS circuit, please go to this page.