C5 · Lesson 55 · Project
From the wall transformer to a steady 5 volts
A bench supply for a small circuit takes 60 Hz AC from a transformer, rectifies it, smooths it, and then regulates it so the output stays put as the load and the line voltage change. Every block is something you've built in this course: the bridge and reservoir capacitor of lesson 8, the Zener reference of lesson 11, and an emitter follower (lesson 43) to supply the current the Zener can't. In this project you'll design one for 5 V at half an amp, simulate its ripple in Python, and set its Zener bias by simulating the real circuit.
- The whole supply: a bridge from a 10.4 V peak source, a 2200 µF reservoir, and a Zener-referenced emitter follower feeding a 10 Ω load (about half an amp).
- The upper trace is the raw rectified voltage, rippling by about 1.5 V. The lower trace is the regulated output, nearly flat.
- Shrink the reservoir capacitor until the valleys of the raw voltage dip toward the output: the regulator runs out of headroom and the ripple comes through.
Predict
The regulator's output is about 4.9 V and its transistor needs at least 2 V across it. The raw voltage peaks at 9 V. How much ripple can the reservoir be allowed?
About 2 V. The regulator removes ripple only while it has headroom: the raw voltage, even at the bottom of each valley, must stay at least 2 V above the output. Below that the pass transistor saturates and the ripple passes straight through.
Name it
The design, block by block
For an output at up to , with a pass transistor of minimum β, from a supply at frequency f:
- Reference: the follower's output sits a below its base, so V.
- Headroom: the raw voltage's valley must stay at least (about 2 V) above : valley .
- Reservoir: choose the ripple ; the raw peak is valley + , and (lesson 8).
- Transformer: the secondary's peak is the raw peak plus two diode drops, so , plus margin for low line voltage.
- Zener bias: at the valley, must still deliver the most base current, , plus the Zener's minimum current: .
- Heat: the pass transistor drops the average raw voltage minus the output: , often watts, so it goes on a heat sink (lesson 34).
Ripple, simulated
With ideal diodes and a regulator drawing a steady , the reservoir voltage follows the rectified input when that's higher, and otherwise falls at . In code, one line per time step does both:
Run it for a few cycles and read the minimum and maximum of the last one.
What the regulator buys
Between the reservoir and the load, ripple and load changes appear across the Zener divided by roughly , with the Zener's small-signal resistance, and the follower adds its low output resistance. Integrated regulators replace the Zener with a bandgap reference and the follower with an error amplifier, and reject ripple a thousand times better; C6 builds one.
Worked example
Design the supply for 5 V at 0.5 A with β ≥ 50, 60 Hz, 2 V of ripple and 2 V of headroom.
Show the solution
- Zener voltage. = 5.7 V (a 5.6 V part gives 4.9 V).
- Raw supply levels. Valley 7 V, peak 9 V.
- Capacitor. Use 2200 µF.
- Transformer. The secondary needs so use an 8 V transformer.
- Zener resistor.
- Pass transistor. It dissipates
Answer a 5.7 V Zener fed through 87 Ω, 2200 µF, an 8 V RMS transformer, and a pass transistor that dissipates 1.5 W.
Worked example
With 2200 µF from a 12 V peak source at 0.5 A, how low does the raw voltage dip?
Show the solution
- Estimate.
- Simulation. Simulated, it bottoms at 9.03 V.
- Why it's higher. The input catches the capacitor well before the next peak, so less charge is lost than the estimate assumes.
Answer it dips to about 9.03 V, a little above the estimate of 8.71 V.
Check
A 5 V linear supply needs 1.5 V of headroom and allows 2 V of ripple. What raw peak voltage must it have?
Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.
Check
A bridge supply's raw peak is 9 V. What RMS secondary voltage does its transformer need, before margin?
Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.
Check
A Zener-follower regulator ( = 5.6 V) must deliver 1 A with β ≥ 80, keeping 2 mA in the Zener when the raw voltage dips to 7 V. What ?
Write units the way you normally would: 1.5 Ω, 1500 mΩ and 0.0015 kΩ are the same answer.
Check
A pass transistor feeds 1.5 A at 9 V from a raw supply peaking at 9 V with 1 V of ripple. What does it dissipate?
Write units the way you normally would: 1.5 W, 1500 mW and 0.0015 kW are the same answer.
Check
Write design_supply(Vout, IL, beta, f=60, Vr=2.0, head=2.0, IZmin=5e-3) returning a dict with keys VZ, valley, peak, C, Vrms, RS and Ppass, following the six steps.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Write simulate_supply(Vs, f, C, IL, dt=2e-6, cycles=6): step the reservoir voltage from 0 with the update rule above (input ), and return (vmin, vmax) over the last cycle.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
The regulator alone, fed from the 7 V valley, drives a 10 Ω load through a pass transistor with β = 50. Choose so the Zener keeps 5 mA. (The meter's Zener current is negative: it flows in reverse.)
Type values the way you would write them on a schematic: 4.7k, 100n, 10m. Then try them: the circuit runs with your values and is measured.
Explain why
Why does a linear regulator need headroom, and what does that cost?
The pass transistor is the regulator's control element: it absorbs the difference between the raw voltage and the output, adjusting its own voltage drop as the raw voltage ripples. That only works while it stays in its active region, which needs a volt or two across it at the lowest point of the ripple. So the raw supply has to sit well above the output, and the transistor dissipates that difference times the load current all the time, as heat. A 5 V supply from a 9 V peak wastes about a third of its input power, which is why switching regulators replace linear ones wherever efficiency matters.
Practice
Keep practicing
7 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.