Nearly every phone charger and computer board has to turn a higher voltage into a lower one — 12 V down to 5 V, for example. A linear regulator does it by burning the extra 7 V as heat, which wastes more energy than it delivers. A buck converter does it differently: it switches the input on and off very fast and lets an inductor average the pulses into a smooth, lower voltage. This post explains how the inductor does that, and works a complete 12 V to 5 V design.
Figure 1: The buck converter (a) and its inductor current (b). The current ramps up while the switch is on and ramps down while it is off, averaging exactly the 1 A load current. (Schematic, not to scale.)
How the circuit works
The switch (usually a MOSFET) connects the inductor to the 12 V input for part of each switching cycle, then opens. While the switch is on, the inductor sees Vin − Vout = 12 − 5 = 7 V across it, so its current ramps up — the inductor stores energy in its magnetic field. When the switch opens, the inductor current cannot stop instantly, so it keeps flowing through the freewheeling diode and into the load; now the inductor sees −Vout = −5 V across it (the diode drop is ignored in this ideal calculation), so its current ramps back down. The capacitor smooths the ripple, and the load sees a steady 5 V.
The key rule is volt-second balance: in steady state the inductor voltage must average zero over one cycle, otherwise its current would drift up or down forever. So the up-ramp and the down-ramp must cover the same volt-seconds:
(Vin − Vout) × ton = Vout × toff → D = ton / T = Vout / Vin
where D is the duty cycle — the fraction of each cycle the switch is on. That one formula sets the output voltage.
Worked example — 12 V to 5 V at 1 A
Take Vin = 12 V, Vout = 5 V, load current 1 A, switching frequency f = 100 kHz, L = 100 µH, C = 100 µF.
Step 1 — duty cycle: D = 5 / 12 = 0.417 (41.7%). Each period is T = 1 / 100 kHz = 10 µs, so the switch is on for ton = 0.417 × 10 = 4.17 µs and off for toff = 5.83 µs.
Step 2 — inductor current ripple: while the switch is on, the current rises at (Vin − Vout) / L = 7 / 100 µH = 70,000 A/s, so over 4.17 µs it rises by
ΔIL = (Vin − Vout) × D / (L × f) = 7 × 0.417 / (100 × 10−6 × 100 × 103) = 0.292 A (292 mA).
Check it from the off side: Vout × (1 − D) / (L × f) = 5 × 0.583 / 10 = 0.292 A — the same, as volt-second balance demands. The volt-seconds also match: 7 V × 4.17 µs = 29.2 V·Âµs on, and 5 V × 5.83 µs = 29.2 V·Âµs off.
Step 3 — peak and minimum current: the inductor current averages the 1 A load current, so it swings from Imin = 1 − 0.146 = 0.854 A up to Ipeak = 1 + 0.146 = 1.146 A. The inductor and the switch must both be rated above 1.15 A — pick an inductor with a saturation current comfortably above the peak, not just above the average.
Step 4 — output voltage ripple: the capacitor absorbs the ripple current, and the peak-to-peak output ripple is approximately
ΔVout ≈ ΔIL / (8 × f × C) = 0.292 / (8 × 100 × 103 × 100 × 10−6) = 0.292 / 80 = 3.65 mV.
That is less than 0.1% of 5 V — a bigger capacitor or a higher switching frequency makes it smaller still.
Why a buck beats a linear regulator
A linear regulator dropping 12 V to 5 V at 1 A wastes (12 − 5) × 1 = 7 W as heat while delivering only 5 W — 41.7% efficient, and it needs a heatsink. A buck converter ideally draws only D × Iout = 0.417 × 1 = 0.417 A average from the 12 V input, so Pin = 12 × 0.417 = 5 W, the same as Pout. Real switches, diodes and inductor resistance add losses, but a well-built buck still reaches 85–95% efficiency — that is why every USB charger and laptop power stage uses one.
Key points to remember
- The duty cycle sets the output: D = Vout / Vin — 5 / 12 = 41.7% here, so the switch is on 4.17 µs of every 10 µs period.
- Worked example: L = 100 µH at 100 kHz gives ΔIL = 292 mA, so the inductor current swings from 0.854 A to 1.146 A around the 1 A average; volt-seconds balance at 29.2 V·Âµs on both halves.
- Output ripple with C = 100 µF is only about 3.65 mV (ΔVout ≈ ΔIL / 8fC).
- Rate the inductor and switch above the peak current (1.15 A), not the average — and remember a buck at 85–95% efficiency wastes far less than a linear regulator's 7 W here.
- This is an ideal calculation: a real diode drop (~0.7 V) and switch resistance shift the duty cycle slightly, so check the finished design against the controller's datasheet.
