Scherz & Monk, Chapter 11

Voltage Regulators & Power Supplies

Every circuit you ever build needs steady DC, but the wall gives you 120 V of writhing AC. This chapter is one pipeline — transformer, rectifier, filter, regulator — and one deep tension: a linear regulator burns the excess voltage as heat, while a switching regulator chops the input on and off to waste almost nothing. That single design choice is why one wall-wart is a brick and the other fits on your fingertip.

Prerequisites: AC vs DC & RMS + diodes & rectifiers (Ch 4) + capacitor charge I=C·dV/dt + Ohm's law
17
Chapters
5
Simulations
0
Assumed Knowledge

Chapter 0: The "DC" That Fries Logic

You build a small digital project — a microcontroller, a few logic chips, an LED display. They need a clean, steady +5 V. So you do the obvious thing: grab a transformer to step the wall voltage down, a bridge rectifier to flip the negative swings up, and a big fat capacitor to smooth it out. You wire it up, power on… and your chips behave like they are haunted. The display flickers. The microcontroller resets at random. A counter skips numbers. Eventually a chip gets hot and dies.

You put a scope on the "5 V" rail and the truth appears: it is not 5 V at all. It is a sawtooth, sliding from about 5.25 V down to 4.74 V and back, 120 times a second. That up-and-down wobble — ripple — measures about 510 mV peak-to-peak. Your logic family tolerates only ±0.25 V (5%) on its supply. You are riding two-times over the cliff edge, continuously.

The instinct is to fight ripple with a bigger capacitor. But ripple shrinks only linearly with capacitance: to get from 510 mV down to a safe 5 mV you would need a capacitor a hundred times larger — a soda-can-sized 470,000 µF monster that costs more than the rest of the project. The real fix is a 50-cent chip called a voltage regulator, and it knocks ripple down by a factor of a thousand while holding the output rock-steady. That chip is the hero of this chapter.

Ripple is the enemy, the regulator is the cure. A raw rectifier-plus-capacitor supply produces DC with a big sawtooth riding on it. The capacitor alone can only get you so far — halving the ripple means doubling the capacitor, forever. A regulator IC instead actively corrects the output thousands of times a second, flattening 510 mV of ripple to under 1 mV. The whole chapter is the journey from "raw lumpy DC" to "laboratory-clean DC."
The 5 V Rail That Isn't — Ripple vs Tolerance

This is the scope trace of the haunted supply. The orange band is what your logic chips tolerate (±0.25 V). Drag the capacitor up and watch the sawtooth shrink — notice you need an enormous cap to get inside the band. The regulator (next tabs) does it for pennies.

Filter capacitor C 4700 µF
Load current IL 1.00 A
Your "5 V" rail wobbles by 510 mV peak-to-peak but your chips need ±0.25 V. What is the practical fix the chapter argues for?

Chapter 1: The Power-Supply Pipeline

Almost every linear DC supply ever built is the same four-stage assembly line, each stage cleaning up the mess from the last. Once you see the pipeline, every power supply on Earth becomes legible.

1. Transformer — step down
120 Vrms AC from the wall is far too high. A transformer's turns ratio scales it down — say to 12.6 Vrms — while providing galvanic isolation from the lethal mains. Output is still AC, still swinging positive and negative.
2. Rectifier — flip the negatives
Diodes only conduct one way. A bridge rectifier flips every negative half-cycle up to positive, turning the sine wave into a train of humps that all point up. Now it is pulsating DC — positive, but violently lumpy.
3. Filter capacitor — smooth
A big capacitor charges to each hump's peak, then dribbles its stored charge into the load during the valleys. This fills in the gaps, converting lumpy pulses into nearly-flat DC with a small residual sawtooth: the ripple.
4. Regulator — flatten the last wobble
A regulator IC watches its output and continuously adjusts a pass element to hold the voltage dead-steady, rejecting ripple by ~60 dB (÷1000) and ignoring changes in load. The output is finally clean, calibrated DC.

Each stage trades one problem for a smaller one. The transformer makes the voltage safe and manageable but leaves it AC. The rectifier makes it unidirectional but leaves it lumpy. The capacitor makes it mostly flat but leaves a small ripple. The regulator makes it clean and constant — the last and most important stage, and the one with the most interesting physics, because it is where the waste-versus-complexity tension lives.

Worked Example: Sizing the Pipeline for +5 V

Suppose we want a regulated +5 V at up to 1 A using a common 7805 regulator. Work backward through the pipeline:

This is why a "5 V supply" famously starts with a transformer labelled 9 V or 12 V — the headroom is eaten by the rectifier drop, the ripple valley, and the regulator dropout. Every volt above 5 V at the regulator input is volts the regulator must eventually burn off, which becomes Chapter 7's heat problem.

The pipeline is also a budget. Read it as a voltage ledger: the transformer hands you a peak, the rectifier subtracts ~1.4 V, the ripple subtracts a valley, and the regulator demands a dropout cushion on top of its 5 V output. Everything left over is "slack" the regulator throws away as heat. Design is the art of leaving just enough slack to survive the worst case, and not a volt more.

Pipeline Signal Tracer

The same signal at four points along the pipeline. Watch the AC sine become rectified humps, then smoothed DC-with-ripple, then a flat regulated line. This is the whole chapter in one picture.

In the standard linear power-supply pipeline, what is the job of the filter capacitor?

Chapter 2: Rectification

A diode is a one-way valve for current. That single fact is the whole trick behind turning AC into DC: arrange diodes so that current can only ever flow toward the load in one direction, and the negative swings either vanish or get folded upward. There are three classic arrangements, each better than the last.

Half-Wave: the lazy way

One diode in series with the load. It conducts during the positive half-cycle and blocks during the negative one. The result is a train of humps with big gaps between them — you throw away half the input. The output pulses at the line frequency (60 Hz), and because half the time there is nothing at all, the capacitor must work hard and the ripple is large. Simple, but wasteful.

Full-Wave Center-Tapped: use both halves

With a center-tapped transformer and two diodes, the negative half-cycle is rerouted so it too comes out positive. Now there are no gaps — a hump for every half-cycle. The output pulses at twice the line frequency: 120 Hz for 60 Hz mains. Twice as many humps means the capacitor refills twice as often, so ripple is roughly halved for the same capacitor.

Full-Wave Bridge: four diodes, no center tap

The bridge rectifier uses four diodes to achieve full-wave rectification from an ordinary (non-center-tapped) secondary. It is the workhorse of nearly every supply. The cost: current always flows through two diodes in series, so the voltage drop is ~1.4 V instead of ~0.7 V. In exchange you get full-wave 120 Hz output and you can use the whole transformer winding.

Why 120 Hz matters more than it looks. Full-wave rectification doubles the ripple frequency, not just halves its amplitude. Higher ripple frequency is a gift everywhere downstream: the filter capacitor has half the time to droop between refills, and any regulator after it finds ripple easier to reject at higher frequencies. A 60 Hz half-wave supply and a 120 Hz full-wave supply with the same cap are not close — the full-wave version is dramatically cleaner. This is why almost nobody uses half-wave for anything that matters.

Worked Example: the 120 Hz fact

The wall delivers 60 Hz, so one full AC cycle takes 1/60 s = 16.7 ms, with a positive hump and a negative hump each lasting 8.3 ms. Half-wave keeps only the positive hump, leaving a pulse every 16.7 ms → 60 Hz ripple. Full-wave folds the negative hump up to positive, producing a pulse every 8.3 ms → 120 Hz ripple. The period between refills for full-wave is therefore 8.3 ms, and the capacitor actually discharges for roughly 5 ms of that (the diodes conduct only near each peak). We will use that ~5 ms discharge window in the ripple math.

Rectifier Waveform Comparison

The transformer's AC sine (dashed) and the rectified output (solid) for each topology. Click to switch. Notice half-wave leaves gaps at 60 Hz, while both full-wave versions fill every half-cycle at 120 Hz.

Bridge selected
A full-wave rectifier is driven from a 60 Hz wall supply. At what frequency does its output ripple appear?

Chapter 3: The Filter Capacitor

After the rectifier we have a train of humps — positive, but pulsing all the way down to zero between peaks. The fix is a single component that acts like a tiny reservoir: the filter capacitor, placed in parallel with the load. Think of it as a water tank fed by a pump that only pulses on at the peaks. The tank fills quickly at each peak, then feeds the load steadily during the dry spells, keeping the output high even when the pump is off.

Mechanically, here is the cycle: as each rectified hump rises, the capacitor charges almost up to the peak voltage Vpk. Then the hump falls away faster than the capacitor can follow, so the diode stops conducting (it reverse-biases) and the capacitor is left alone to supply the load by itself. The load drains the capacitor — its voltage sags — until the next hump rises high enough to take over and recharge it. The amount of sag during that lonely stretch is exactly the ripple voltage.

The governing equation

A capacitor obeys I = C·dV/dt. While the capacitor is supplying the load alone, the load draws current IL, and the capacitor voltage falls. Rearranging gives the change in voltage over the discharge interval Δt:

I = C · (ΔV / Δt)  →  ΔV = IL · Δt / C

That ΔV is the ripple. Read the equation as a story: more load current drains the tank faster (bigger ripple), a longer gap Δt between refills means more time to droop (bigger ripple), and a bigger capacitor holds more charge so it droops less (smaller ripple). The capacitor's only job is to make ΔV small.

The capacitor fights time, not voltage. Notice the equation has no Vpeak in it. The ripple does not care how high the supply is — it cares only how much current you pull, for how long, out of how big a reservoir. This is why a 5 V supply and a 50 V supply at the same current and capacitor have the same ripple amplitude. It is also why doubling the capacitor exactly halves the ripple: it is a pure 1/C relationship, with no diminishing returns and no shortcuts.

Worked Example: ripple from first principles

Take IL = 1.0 A, C = 4700 µF, and a full-wave discharge window of about Δt = 5 ms (the ~5 ms the capacitor spends alone between 120 Hz peaks). Then:

ΔV = IL · Δt / C = (1.0 A · 0.005 s) / 0.0047 F ≈ 1.06 V peak-to-peak

So the raw supply sags by roughly a volt between refills. That is the lumpy "DC" from Chapter 0. To halve it to ~0.5 V you would double the capacitor to 9400 µF; to get to 0.1 V you would need ten times the capacitor, ~47,000 µF — physically huge and expensive. The capacitor alone is a losing battle past a point, which is exactly why we add a regulator. (The next tab introduces the practical empirical formula engineers actually use, which folds the messy ~5 ms discharge geometry into one tidy constant.)

Capacitor Charge & Release

The rectified humps (dim) and the capacitor's voltage (bright). Watch the capacitor charge up to each peak, then sag as it feeds the load alone, then get caught and recharged by the next hump. The vertical gap is the ripple ΔV.

Capacitor C 4700 µF
Load current IL 1.00 A
Using ΔV = IL·Δt/C, what happens to the ripple if you double the filter capacitor while keeping load and topology fixed?

Chapter 4: The Ripple Explorer

This is the payoff lab for the first half of the chapter. We will pin down the ripple voltage with the formula engineers actually reach for, then let you drive a live rectifier-and-filter scope to feel exactly how the capacitor and the load fight each other. By the end you will be able to size a filter capacitor in your head.

The practical full-wave ripple formula

The first-principles ΔV = IL·Δt/C from the last tab is correct but awkward, because the real discharge window Δt is not a clean 8.3 ms — the diodes steal back some time near each peak, and we usually want the rms ripple rather than peak-to-peak. Scherz & Monk fold all that geometry into one empirical constant for a full-wave supply on 60 Hz mains:

Vr(rms) ≈ 0.0024 · (IL / C)

with IL in amps and C in farads. The 0.0024 already bakes in the 120 Hz period, the ~5 ms discharge window, and the rms conversion. It is the single most useful power-supply formula in the book: give it a load current and a capacitor, and it tells you the ripple.

The Chapter 0 number, finally derived

Now we can produce the haunted-supply number exactly. With IL = 1.0 A and C = 4700 µF:

Vr(rms) = 0.0024 × (1.0 / 0.0047) = 0.0024 × 212.8 ≈ 0.51 V = 510 mV

There it is: 510 mV of ripple, exactly the value the scope showed in Chapter 0, comfortably exceeding the ±0.25 V your logic can tolerate. And here is the kicker that motivates the rest of the chapter: feed this through a 7805 regulator with its ~60 dB of ripple rejection (a factor of 1000) and the output ripple becomes 510 mV / 1000 = 0.51 mV — effortlessly within spec. A 50-cent chip did what a hundred-fold capacitor increase could barely manage.

Capacitor sizing, the back-of-envelope way. Invert the formula to size a capacitor for a target ripple: C ≈ 0.0024·IL/Vr. Want 100 mVrms ripple at 1 A? Then C ≈ 0.0024×1.0/0.1 = 24,000 µF. Want it ten times cleaner at 10 mV? You need 240,000 µF — absurd. The lesson is permanent: the capacitor gets you into the right ballpark cheaply, but the last factor of 100 always belongs to the regulator, never the capacitor.
Rectifier + Filter Ripple Explorer

A live full-wave supply scope. Sweep the capacitor and the load current and watch the sawtooth ripple grow and shrink in real time. The readout gives Vr(rms) from the 0.0024·IL/C formula and flags whether you are inside the ±0.25 V logic band before any regulator. Toggle the regulated trace to see the ÷1000 magic.

Filter capacitor C 4700 µF
Load current IL 1.00 A
A full-wave supply runs at IL = 0.5 A with C = 4700 µF. Using Vr(rms) ≈ 0.0024·IL/C, what is the approximate ripple?

Chapter 5: Fixed Linear Regulators

We have rippled DC. Now we need to make it clean and constant regardless of ripple or load. The classic answer is the linear regulator, and the simplest mental model is the one Scherz & Monk start from: a reference plus a controlled valve.

From zener reference to series-pass

The crudest regulator is a zener diode across the load: a zener clamps its voltage to a fixed VZ regardless of current, giving a stable reference. But a bare zener wastes current and sags under heavy load. The fix is to put a transistor as a controlled valve (the series-pass element) between input and output, and use the zener only as a quiet reference telling the transistor how much to open. The transistor passes all the load current; the reference just steers it. An internal op-amp compares the output against the reference and nudges the transistor continuously to hold the output where it belongs — thousands of corrections per second. That feedback is what flattens ripple.

The 78xx and 79xx families

This entire circuit — reference, error amplifier, pass transistor, thermal and current-limit protection — is integrated into a three-terminal chip. The 78xx series gives a fixed positive output where "xx" is the voltage: a 7805 is +5 V, a 7812 is +12 V, a 7809 is +9 V. The 79xx series gives the negative counterparts (a 7905 is −5 V). Three pins: input, ground, output. Add a small input and output capacitor for stability and you have a complete, bulletproof regulator delivering up to ~1.5 A with a heat sink.

Dropout: the price of admission

A linear regulator can only ever subtract voltage — it cannot boost. And it needs a minimum headroom, the dropout voltage, to keep its internal pass transistor in control. For a 78xx that is typically 2–3 V; if the input ever falls below Vout + Vdropout (even momentarily at the bottom of a ripple valley) the regulator "drops out" and the ripple leaks straight through to the output.

Vin ≥ Vout + Vdropout
Low-dropout regulators (LDOs) exist for a reason. A standard 7805 needs ~2–3 V of headroom, so you cannot make 5 V from a 6 V battery as it discharges. An LDO like the LM2940 needs only ~0.5 V, so it keeps regulating from a nearly-dead source — vital for battery gear. The catch: less headroom also means less room for the worst-case ripple valley, so you must size the filter capacitor more carefully. Dropout is the hidden constraint that links the regulator back to the capacitor you chose two tabs ago.

Worked Example: choosing the transformer for a 7805

You want +5 V from a 7805 (3 V dropout) at 1 A, with a bridge rectifier (1.4 V drop) and a ripple valley of about 1 Vpp. The regulator input must never dip below 5 + 3 = 8 V. The capacitor's peak must therefore sit at least 8 V + 1 V (ripple valley) = 9 V, plus the 1.4 V bridge drop → transformer peak ≥ 10.4 V. Since Vpk = √2·Vrms, the secondary should be at least 10.4/1.414 ≈ 7.4 Vrms. A standard 9 V or 12 V secondary is chosen for comfortable margin — and that extra margin is precisely the voltage the regulator must burn as heat, the subject of Chapter 7.

Series-Pass Regulator Anatomy

The block diagram inside a 78xx: a stable reference, an error amplifier comparing output to reference, and a pass transistor it controls. Rippled DC in (left), clean DC out (right). The mini-scopes show ripple before and after.

You need +5 V from a 7805 with a 3 V dropout. The rectifier drops 1.5 V. Roughly what transformer secondary peak must the capacitor reach so the regulator never drops out?

Chapter 6: The Adjustable LM317

The 78xx is locked to one voltage at the factory. The LM317 is the same idea made adjustable: instead of a built-in reference voltage, it maintains a fixed 1.25 V between its output pin and its adjust pin, and lets you set the rest with two resistors. It is one of the most-used ICs ever made, adjustable from 1.25 V all the way to 37 V.

How the 1.25 V reference becomes any voltage

The LM317 forces exactly 1.25 V across a resistor R1 between OUT and ADJ. That fixed voltage across R1 sets a fixed current I = 1.25/R1 flowing through R1. That same current flows on through R2 (the tiny adjust-pin current is negligible), and the voltage across R2 is just I·R2. The output sits above ground by the sum of the two resistor voltages:

Vout = 1.25 · (1 + R2 / R1)

R1 is conventionally fixed at 220 Ω or 240 Ω (small enough to keep the regulator loaded for stability). You then pick R2 to dial in the voltage you want. The LM317 is floating: it does not reference ground directly, it references its own output, which is what makes the same chip work at 5 V or 30 V. For negative rails, the LM337 is the mirror-image part.

Worked Example: setting the LM317 for +5 V

Use R1 = 220 Ω and solve for R2 to get 5.0 V:

5.0 = 1.25 · (1 + R2/220)  →  4.0 = 1 + R2/220  →  R2/220 = 3.0  →  R2 = 660 Ω

660 Ω is not a standard value, so you use the nearest standard 680 Ω, giving Vout = 1.25×(1+680/220) = 1.25×4.09 = 5.11 V — close enough for most uses, or trim with a small series resistor. For +12 V the same R1: 12 = 1.25(1+R2/220) → R2/220 = 8.6 → R2 ≈ 1.89 kΩ.

The reference is a current, in disguise. The trick that makes the LM317 universal is that it does not hold a fixed output voltage — it holds a fixed voltage (1.25 V) across one resistor, which is the same as holding a fixed current. Push that fixed current through whatever R2 you like and you get whatever voltage you like. The very same idea, with R2 replaced by a load, turns the LM317 into a precision constant-current source for driving LEDs or charging batteries — one chip, two jobs, all from "1.25 V across R1."
LM317 Voltage Setter

Dial R1 and R2 and watch Vout = 1.25(1+R2/R1) on the gauge, clamped to the LM317's 1.25–37 V range. Try to hit 5.00 V (R1=220, R2≈660) and 12 V (R2≈1.89k). The live computation is printed below the needle.

R1 (OUT–ADJ) 220 Ω
R2 (ADJ–GND) 660 Ω
An LM317 is wired with R1 = 240 Ω and R2 = 720 Ω. What output voltage does it produce?

Chapter 7: Heat & Efficiency

Here is the dark secret of the linear regulator. It holds its output steady by dropping the surplus voltage across its internal pass transistor — but that surplus times the load current is power, and that power becomes heat. A linear regulator is, fundamentally, a controlled resistor that burns the difference. The more you ask it to drop, the more it cooks.

The two equations that govern the burn

The power dissipated in the regulator is simply the voltage it drops times the current it passes:

Pdiss = (Vin − Vout) · Iload

And the efficiency — useful power out divided by power in — reduces (at the same current) to a stark voltage ratio:

η = Pout/Pin = (Vout·I) / (Vin·I) = Vout / Vin

That second equation is brutal in its honesty: a linear regulator's efficiency is just the ratio of output to input voltage. Drop from 12 V to 5 V and you are 42% efficient at best — the other 58% is heat, no matter how good the chip. There is no engineering cleverness that escapes Vout/Vin; it is thermodynamics.

Worked Example: the 7805 space heater

Run a 7805 at Iload = 1 A from Vin = 12 V:

Pdiss = (12 − 5) × 1 = 7 W     η = 5/12 = 42%

7 watts in a tiny TO-220 package will reach ~150 °C and trip its thermal shutdown without a serious heat sink — you are delivering 5 W to the load and wasting 7 W as heat, more waste than useful output. Now lower the input to Vin = 8 V (just above the dropout):

Pdiss = (8 − 5) × 1 = 3 W     η = 5/8 = 62.5%

Same output, less than half the heat. This is the golden rule of linear supplies: keep Vin as close to Vout as the dropout safely allows. Every extra volt of input is wasted power and unwanted heat.

Efficiency caps out at a wall you cannot climb. Because η = Vout/Vin and you need Vin ≥ Vout + Vdropout, the very best a linear 5 V regulator can do is η = 5/(5+dropout). With a 3 V dropout that is 5/8 = 62.5%; with a 0.5 V LDO it is 5/5.5 = 91%. For a big step-down — say 24 V down to 3.3 V — linear efficiency collapses to 14%, dumping six times more energy as heat than it delivers. That is the moment you abandon linear regulators entirely and reach for a switcher, which is the next tab.
Linear Regulator Heat & Efficiency Lab

Fixed Vout = 5 V, fixed load. Sweep Vin from 5 V to 18 V. The thermometer rises with Pdiss=(Vin−Vout)·I, the efficiency bar shows η=Vout/Vin, and below the dropout (Vin<7 V) the regulator falls off the cliff and stops regulating. Watch heat and efficiency trade off.

Input voltage Vin 12.0 V
Load current Iload 1.00 A
A 7812 regulator supplies 0.5 A from a 20 V input. How much power does it dissipate as heat?

Chapter 8: Switching Regulators

The linear regulator burns surplus voltage as heat because its pass element is a resistor, and resistors dissipate. The switching regulator's radical idea: replace the resistor with a switch. An ideal switch dissipates nothing — when closed it has no voltage across it, when open it carries no current, and P = V·I is zero in both states. By flicking that switch on and off tens of thousands of times a second and averaging the result with an inductor and capacitor, a switcher delivers exactly the voltage you want while wasting almost nothing.

The buck (step-down) converter

The most common switcher is the buck converter, which steps voltage down. A transistor chops the input into a square wave; an inductor smooths the chopped current (resisting sudden changes, it averages the pulses); a diode gives the inductor's current a path when the switch opens; and an output capacitor flattens the rest. The key control knob is the duty cycle D — the fraction of each switching period the switch is closed. The output voltage is simply the input scaled by the duty cycle:

Vout ≈ D · Vin     (D = ton / tperiod, between 0 and 1)

Want 5 V from 12 V? Set D = 5/12 = 0.42 — the switch is closed 42% of the time. Because the switch and inductor are near-lossless, the input current automatically drops to match: the converter draws only as much power as the load needs (plus small losses), so input power ≈ output power. That is the whole reason switchers hit 85–95% efficiency where a linear regulator doing the same 12→5 V job manages 42%.

Why your phone charger is tiny

A switcher's transformer (if it has one) and inductor run at ~65 kHz instead of the wall's 60 Hz — over a thousand times higher. Magnetic components shrink dramatically as frequency rises (they move the same energy in far less time), so the bulky 60 Hz iron transformer of a linear supply is replaced by a tiny high-frequency one. Combine "no big transformer" with "barely any heat sink" and you get the modern phone charger: a thumb-sized brick delivering more clean power than a linear supply ten times its size.

Switching trades heat for noise and complexity. Nothing is free. The switcher's brilliance — chopping at 65 kHz — also injects high-frequency switching noise onto its output and into the air, which can plague sensitive analog or RF circuits. Switchers need careful layout, inductor selection, and sometimes a small linear LDO downstream just to scrub the last millivolts of switching hash. The engineering culture splits cleanly: switchers for raw efficiency and battery life, linear LDOs for the final ultra-quiet rail. Real designs often use both in series — switcher first for efficiency, LDO last for cleanliness.

Worked Example: the buck duty cycle

You need 3.3 V from a 12 V rail at 2 A. Duty cycle D = Vout/Vin = 3.3/12 = 0.275, so the switch is closed about 28% of each cycle. Output power = 3.3×2 = 6.6 W. At ~90% efficiency the input power is 6.6/0.9 = 7.33 W, drawn from 12 V as 7.33/12 = 0.61 A — far less than the 2 A output current, because the switcher transforms current up as it steps voltage down. A linear regulator doing the same job would draw the full 2 A at 12 V (24 W in, 6.6 W out) and roast 17.4 W as heat. Same job, 2.4 watts of loss versus 17 — an order of magnitude.

Buck Converter Duty-Cycle Animator

An animated buck converter. The switch flicks on and off; the inductor current ramps up while the switch is closed and dribbles down through the diode while it is open. Sweep the duty cycle and watch the output settle at Vout ≈ D·Vin. Note how little heat the (near-ideal) switch makes.

Duty cycle D 0.42
Input voltage Vin 12.0 V
Why does a switching regulator reach 85–95% efficiency where a linear regulator doing the same big step-down manages under 50%?

Chapter 9: Connections & The Whole Supply

You started this chapter with a "5 V" rail wobbling 510 mV and frying logic chips. Let us assemble the complete cure, then see how every concept connects to the rest of the book.

The full +5 V supply, end to end

120 Vrms wall → 12.6 V transformer
Step down and isolate. Secondary peak = √2×12.6 ≈ 17.8 V.
Bridge rectifier (4× 1N4001–07)
Full-wave, 120 Hz. Lose ~1.4 V to two diode drops → cap peak ≈ 16.4 V.
4700 µF filter capacitor
At 1 A: Vr(rms) = 0.0024×(1/0.0047) ≈ 510 mV. Still lumpy — but plenty of headroom above 8 V.
7805 regulator (or LM317 at 5.1 V)
60 dB ripple rejection → 510 mV ÷ 1000 = 0.51 mV ripple. Clean, calibrated +5 V. (Heat: P=(16.4−5)×1 ≈ 11 W — needs a heat sink, or use a switcher.)

Every key equation in one place

ConceptEquationWhat it tells you
Peak from rmsVpk = √2 · VrmsCapacitor charges to the peak, not the rms, of the rectified wave
Full-wave ripple freqfripple = 2 · fline = 120 HzBoth half-cycles make a hump; cap refills twice per cycle
Capacitor dischargeΔV = IL · Δt / CRipple = current × time-alone ÷ reservoir size
Practical rippleVr(rms) ≈ 0.0024 · IL/CBack-of-envelope full-wave ripple (60 Hz mains)
78xx fixed output7805→5 V, 7812→12 V; 79xx negativeThree-pin fixed linear regulator, ~1.5 A with heat sink
LM317 adjustableVout = 1.25 · (1 + R2/R1)1.25 V reference; pick R2 to set 1.25–37 V (LM337 negative)
Dropout constraintVin ≥ Vout + Vdropout78xx ~2–3 V, LDO ~0.5 V; below this, ripple leaks through
Linear heatPdiss = (Vin − Vout) · IloadSurplus voltage × current, dumped as heat
Linear efficiencyη = Vout / VinBrutal ratio; big step-downs are very inefficient
Buck duty cycleVout ≈ D · VinSwitcher: 85–95% efficient regardless of step ratio
Ripple rejection−60 dB = ÷10007805 ~60 dB; LM317 to ~80 dB (÷10,000) with bypass cap

Linear vs Switcher: the showdown

The central tension of the chapter, side by side. Drive the same 12→5 V job and watch where the energy goes.

Linear vs Switcher Showdown

Same Vin→Vout job, two technologies. The bars show input power and heat wasted; the linear regulator's heat bar towers over the switcher's. The size icons shrink for the switcher (no big transformer, no big heat sink). Sweep the input voltage to make the gap dramatic.

Input voltage Vin 12.0 V
Load current Iload 1.00 A

Choosing between them

Linear (78xx / LM317)Switching (buck)
EfficiencyVout/Vin, often <50%85–95%, step-ratio independent
HeatHigh (needs heat sink)Low
Output noiseVery quietHigh-frequency switching hash
Size / weightBulky 60 Hz transformerTiny 65 kHz magnetics
Can step up?No (drop only)Yes (boost topology)
ComplexityThree pins, two capsInductor, diode, layout care
Best forLow-noise rails, small step-downsBattery gear, big step-downs, efficiency

Connections to Other Chapters

"The wall gives you 120 volts of chaos; your job is to hand your circuit a flat, silent five."
— the power-supply designer's creed

From transformer to regulator, you now own the whole pipeline — and you understand the one decision that defines a supply: burn the surplus as heat (linear, quiet, simple) or chop it away (switching, efficient, noisy). Chapter 12 finally gets to use that clean +5 V.

A 7805 (3 V dropout) follows a bridge rectifier dropping 1.5 V. Roughly what transformer secondary (rms) keeps it regulating cleanly at 5 V, allowing for the ripple valley?
← Ch 10: Oscillators & Timers Ch 12: Digital Electronics →