This is a 9V power supply which will work even on power failure. It uses a rechargeable battery and regulators. A transformer with 15-0-15 AC volts output is required.
From my Power Electronic Circuits
In the first regulator U1 the output is lifted up by 1.4V and in the second regulator U2 by a resistor divider. In the second regulator the voltage across resistor R3 is 5V, so the current is 5V / 1K = 5mA this adds to the quiescent current of 5mA from the regulators ground terminal and flows into the resistors R1 and R2 in parallel which form 404 ohms, 10mA thru 404 ohms is 4V. So the output will be 5 + 4 = 9V. Note that the charge and discharge paths of the battery are separated with diodes.
This is a a circuit from my Power Supplies Section. There may be some documentation errors in my circuits. If you are used to building and troubleshooting circuits then it is ok.
This circuit is derived from an application note of L296, It is a Power Switching Regulator from ST Micro. U1A is wired as a differential amplifier and U1B a High Gain Comparator. C4 and C5 are parallel for lower ESR. Equivalent series resistanc Fast switching diode used is BYW80.
L296 is a switch mode power controller here. In this NTE327 or 2N5038 is used to boost the current output. This transistor is both high current and fast switching. U1A, LM358 measures the load current by reading the voltage across shunt R6 and compared to a current limit setting at R14 using U1B to give a load current control. R7-R8 give a voltage feedback for voltage limit.
Use MFR 1% for all Resistors, 33E means 33 ohms, 22K means 22 kilo ohms, 1M is 1 megohm. 10T tp means ten turn trimpot. “Analog Ground” and “Digital Ground” must be linked at power supply only, avoid loops, let grounds radiate from a ground plane. Unused inputs of logic and opamps pull up or down to avoid oscillations and noise.
This is an incomplete version of the power supply used for the Alertness Monitor with hourly LED Display. This circuit used a Dual Color LED. Green meant Alert and Red meant No Alert or acknowledge press.
I can write here only in “Electronic English”. Focus on the tech not grimmer. It may be like Pascal with a touch of Acronyms, codes and circuit axioms.
The top part is a 5V regulator with 0.7 Diode boost, means 5.7 V DC. The battery was floating on this point above the zener Z4, that connection comes from outside. A protection fuse maybe needed in case Zener draws more current. The Zeners were test selected to get above 6V along with the diode.
The second supply is to drive the LED array and Relay. This second battery supply was needed to prevent the RAM from losing data and also the CMOS logic getting reset, when the relay solenoid operates. Even when the Display Now switch is pushed, the current is large and the pulse could reset digital circuit.
The battery was used very less, it worked during the power failures for short duration between mains and generator switching. This circuit is not meant for in situations when battery drains are high.
I will just explain part of this circuit. D9 and D10 provide a low cost -1.4 from -5 V. This is needed to reach near 0.00 for LM317 Min. setting. An LED also can be used with proper bias. Note that there is a Temperature Coefficient in ppm, see The Unusual Diode FAQ. but it may not matter upto 8 bits accuracy.
TIP2955, TIP3055 (NPN), TIP2955 (PNP) Complementary Silicon Power Transistors. It is a Darlington, that means good current gain. See Darlington transistor – Wikipedia. When current in R1 10E goes more than 50mA a voltage of 50mA X 10E = 500mV is applied across Emmiter-Base junction. So lower than 500mV no bias the tap is turned off, 500mV-700mV the tap starts turning on depending on type of transistor. The transistor is like a water Tap. So TIP2955 carries the major current burden thru the load allowing LM317 to do the decision making when to turn-on or off. It is analog control, it is not On-Off but linear-proportional. The LM317 is very cool as the burden is passed off to TIP2955 who will need a heatsink to keep going and deliver the power you want.
Put the filter caps appropriately. The Hum-Noise will be filtered. The cap after the regulator should be a small guy. The main filter cap after the Bridge can be as big as your cabinet or budget.
If you build it and wire it without designing a PCB, then make all wiring and connection very sound. The test of this ability you can know easily, If your project stops working after the last screw of the cabinet is tightened, Then we need to improve.