The input from the transformer is rectified by BR1 and smooth by C1. There is generally a limit on the size of smoothing capacitor that may be connected across a rectifier. However, they all seem to be able to cope with 2200uF. Depending on the transformer, the output from the rectifier could be as much as 20-volts DC. Therefore, C1 should be at least 35-volts.
The output from the rectifier is fed to pin 1 of the 7805 regulator. Its output - at pin 3 - is always 5-volts above whatever voltage is on pin 2. Since pin 2 is generally connected to ground - the 7805 is usually referred to as a 5-volt regulator. However, R1, C1 & Z1 hold pin 2 at 9v1. Therefore the output at pin 3 will be ( 9v1 + 5 = 14v1 ). Additional smoothing is provided by C3. Current through R2 lights the red LED. This gives visual conformation that the mains supply is present - or not, as the case may be.
D1 provides a one-way path that allows the incoming current to pass; while - during periods of mains failure - it prevents current from the battery finding its way back to the red LED and the regulator output pin. There is a forward voltage-drop of about 0v6 across D1 and this reduces the incoming voltage to 13v5. Alarm back-up batteries are designed to be charged at a constant 13v5 to 13v8.
The terminal voltage of a fully-charged 12-volt battery is between 13v5 and 13v8. When the terminal voltage of the battery reaches 13v5, it is then equal to the charging voltage coming from D1. Since there is now no difference in potential between the battery voltage and the charging voltage - no more current will flow into the battery. In other words, once it's fully-charged the energy flow into the battery stops. This is sometimes referred to as a "Float" or "Trickle" charge.
Alarm back-up batteries are designed to be charged like this; and their terminals can be held at 13v5 to 13v8 for many years with no apparent ill-effects. They are maintenance-free and have a life expectancy of 5 years. However, they tend not to recover from a very deep discharge.
If the mains fails, the battery will automatically take over; and the output from the power supply will not be interrupted. When the mains returns, the battery will be recharged automatically.
Batteries of this size hold a lot of charge and can supply a very heavy current. If they are short-circuited they can cause personal injury and/or a fire. Under normal circumstances - if the output from the supply is shorted - FS2 will blow. If for some reason there is a short in the supply itself, FS1 will blow. If the battery is accidentally connected the wrong way round, D2 will cause a deliberate short and FS1 will blow, instantly isolating the battery.
After a long period of mains failure, when the battery terminal voltage is low, the initial charge current can be high. The 2-amp version of the 7805 will limit the maximum current to 2-amps. If you can't find a 2-amp 7805 then the 1-amp version will work just as well. In either case, 3-amps should be a sufficient rating for FS1.
The voltage drop across the 7812 reduces the 13v5 to about 12-volts. Current through R3 lights the green LED and gives a visual indication that the PSU output is working.
The regulators also have built-in thermal cut-outs. To prevent them from overheating, they need to be bolted to heatsinks. The power each regulator must dissipate is determined by the current through it and the voltage-drop across it. In the worst possible case, the 7805 could have ( 20 - 14 = 6-volts ) across it and a current of 2-amps flowing through it. Therefore it may need to dissipate ( 6 x 2 = 12-watts ). On the other hand, the 7812 can only have about 2-volts across it; and 1-amp flowing through it. So it should never need to dissipate more than ( 2 x 1 = 2-watts ).
The metal part of the regulator body is connected to pin 2. Therefore, the heatsink will be at the same potential as pin 2. In the case of the 7805 this means that its heatsink will be at 9v1. So it must NOT be connected to ground.
The Modular Burglar Alarm
will work at up to 15-volts. So the 7812 is not strictly necessary. However, because the PSU will have other applications - where an output of 13v5 may be too high - the 7812 is included in the circuit.
The 7812 is not working as a regulator. The output voltage is in fact regulated by the back-up battery. Instead, the circuit makes use of the voltage drop across the 7812 - typically 2-volts - as a convenient way of lowering the output voltage. It's a simple, cheap and effective solution; with the added bonus that it also provides thermal-overload protection and a short-circuit current-limit.
The two 2k2 resistors and the red and green LEDs are just indicators. They are not necessary to the operation of the circuit. You may leave them out if you wish.