The circuit I propose to you in this article is extremely practical to use in the home. I do not know anyone who has not ever suffered a power outage, and find himself in the dark of finding in the drawers some lost candle or a flashlight, which just when we need it always has the batteries discharged.
This problem we will try to solve with a circuit that not only acts instantaneously lighting a lamp when the power supply fails, but also always keeping the battery charged while there is a mains voltage.
The circuit is suitable for both 6V and 12V batteries. I propose to use 12V for being more standardized. The battery may consist of a set of rechargeable batteries, or the classic lead plate accumulator. The difference in volume between one and the other is remarkable, and obviously also the autonomy. For example, with a lead-gel battery 7A will give us a range of many hours, which drops significantly using AA rechargeable batteries. On the other hand, the biggest advantage of using batteries instead of an accumulator is that we can introduce all the elements inside a small assembly box, from which a cable with the male plug will appear, and install it where we are most interested in lighting , For example in the upper part of a wall. If there is no mains outlet nearby, you must carry an electrical cord to the area and install a plug there.
How the circuit works;
When closing SW1 we first transform the voltage of the network by T1, then rectify it with the bridge BR1 and filter it slightly with the capacitor C1. The bridge rectifier BR1 can be any of at least 40V and 2A. The transformer must supply at least 1A of current, and 15V if we are going to use a 12V battery.
Assuming that there is present mains voltage, the transistor Q3 receives a positive voltage at its base, which causes it to drive in saturation, that is, to all effects it has a short between emitter and collector (there is a very low resistance between both of them). That short makes the negative (mass) present at the base of Q2, and since its emitter is also at low potential it will not drive. Since Q2 is set to Darlington with Q3, it will not drive either, and the lamp will remain off.
So far we have seen the part of the circuit of the lamp, but now we will focus on the charge of the battery. If we look at the upper branch of the circuit, there is a diode and a resistance; The diode prevents the battery from discharging through the other components, since the cathode is in opposition to the positive of the battery, preventing it from driving in that direction. The only way this diode can lead is to the positive pole during charging, which will occur as long as there is at least a sufficient potential difference between the mains supply voltage and the load itself; Has to be at least 20% higher for the load to occur. That means that, as I explained before, the chosen tansformer must supply at least about 15V in the secondary if the battery is 12V; If it is 6V then we would need a transformer of at least 7.5V.
For its part, the resistance allows to reduce the load current to about 30 mA. If the battery used is 6V, then we have to replace that resistance with another half of the value.
When a power failure occurs, the base of transistor Q3 fails to receive a positive voltage, so the short that occurred between emitter and collector disappears, allowing the positive of the battery to reach the base of Q2 through The resistance R1. Consequently, the base of Q2 remains at potential collector and will lead. Since Q2 and Q1 are configured in Darlington, it will also lead in saturation by supplying the L1 lamp, which will illuminate. The lamp will remain on as long as the battery is not fully discharged, or the power is restored, which will recharge the battery.
VERY IMPORTANT.- Do not use cadmium nickel batteries in the circuit or the same as those used for mobile phones, as these batteries require a constant charge regime that does not provide this circuit and could damage them in a very short time. You should use lead-acid batteries like cars; There are even maintenance-free gels, with very manageable sizes and amperes of 10A, 15A, etc., which are usually sufficient for this project.