Electronics

How a Buck Converter Actually Works

Switch, diode, inductor and capacitor: how a buck converter steps voltage down efficiently, and how to size the inductor and output capacitor.

Need 5 V from a 12 V battery? A linear regulator like the 7805 will do it — by turning the extra 7 V into heat. A buck converter does the same job at 85–95 % efficiency by switching the input on and off thousands of times per second and smoothing the result with an inductor and a capacitor. Here's what actually happens inside, and how to pick the parts.

Why not just use a linear regulator?

A linear regulator acts like a variable resistor in series with the load. All the load current flows through it, and it drops the voltage difference:

Ploss = (Vin − Vout) × Iout

At 12 V in, 5 V out and 1 A, that is 7 W of heat for 5 W delivered — about 42 % efficient, and a heatsink the size of a matchbox. A buck converter doing the same job typically wastes well under 1 W.

The trick is that an ideal switch wastes no power: when it is off no current flows, and when it is on there's no voltage across it. Power is only lost in the imperfections.

The four essential parts

+− Vin S switch (MOSFET) SW node D L C Load Vout ground
Switch, diode, inductor, capacitor. A controller (not shown) drives the switch and watches Vout.
  • Switch (S) — usually a MOSFET, turned fully on and off by a controller at a fixed frequency (tens of kHz to a few MHz).
  • Diode (D) — gives the inductor current a path when the switch is off. Usually a Schottky for its low forward drop. Synchronous converters replace it with a second MOSFET.
  • Inductor (L) — the energy store. It resists changes in current, which is what turns a chopped voltage into a smooth current.
  • Output capacitor (C) — smooths what's left of the ripple and supplies sudden load changes.

Two states, one cycle

The switch alternates between two states. Everything a buck converter does follows from what the inductor sees in each one.

Switch on (for time D·T)

The switch node is connected to Vin. The inductor has Vin on one end and Vout on the other, so it sees a positive voltage Vin − Vout. Its current ramps up linearly, flowing through the load and charging the capacitor. The diode is reverse-biased and does nothing.

Switch off (for time (1 − D)·T)

An inductor's current cannot change instantly. When the switch opens, the inductor forces the switch node negative until the diode conducts, and current keeps circulating: ground → diode → inductor → load. The inductor now sees about −Vout (plus the diode drop), so its current ramps down.

VSW ON D·T OFF (1−D)·T IL Iout (average) ΔIL
The inductor current is a triangle: it climbs while the switch is on, falls while it is off, and its average is the load current.

Where Vout = D × Vin comes from

In steady state the inductor current must end each cycle where it started — otherwise it would grow forever. So the "volt-seconds" applied during on-time must cancel those during off-time:

(Vin − Vout) · D·T = Vout · (1 − D)·T

Solve for Vout and the T and the messy terms drop out:

Vout = D × Vin

12 V to 5 V needs D ≈ 0.42; 12 V to 3.3 V needs D ≈ 0.28. In practice, diode drop and resistances push the real duty cycle a little higher, and a controller trims it continuously.

Key idea: current is not conserved — power is. At 12 V → 5 V and 2 A out, an ideal converter draws only about 0.83 A from the input (around 0.9 A with real losses). That's the big difference from a linear regulator, where input current equals output current.

Sizing the inductor

During on-time the inductor current rises by:

ΔIL = (Vin − Vout) · D / (fsw · L)

A common design rule is to aim for a ripple of 20–40 % of the maximum load current. Too little ripple means a big, expensive inductor; too much means high peak currents and output ripple.

Worked example

12 V in, 5 V out, 2 A load, an LM2596 switching at its fixed 150 kHz, with a 33 µH inductor:

  • D = 5 ÷ 12 ≈ 0.417
  • ΔIL = (12 − 5) × 0.417 ÷ (150 000 × 0.000033) ≈ 0.59 A — about 29 % of 2 A. Good.
  • Peak inductor current = Iout + ΔIL/2 ≈ 2.3 A.

Choose an inductor whose saturation current comfortably exceeds the peak (say 3 A or more) and whose RMS current rating covers the load. When an inductor saturates its inductance collapses, current spikes, and parts get hot or fail.

Sizing the output capacitor

The capacitor absorbs the inductor's ripple current. Output voltage ripple has two parts — the capacitance itself and its equivalent series resistance (ESR):

ΔVout ≈ ΔIL / (8 · fsw · C) + ΔIL · ESR

With 220 µF in the example above: the capacitive part is 0.59 ÷ (8 × 150 000 × 0.00022) ≈ 2 mV. But an ordinary electrolytic with 50 mΩ ESR adds 0.59 × 0.05 ≈ 30 mV. ESR usually dominates, which is why switching supplies use low-ESR electrolytics, polymer capacitors, or ceramics in parallel.

Don't forget the input capacitor. The input current is chopped into pulses; a good low-ESR capacitor right at the converter's input supplies those pulses so they don't travel back up your supply wires.

Feedback: holding Vout steady

Input voltage and load both change, so a controller constantly measures the output through a resistor divider and adjusts D. For an adjustable LM2596 the feedback pin regulates to 1.23 V, giving:

Vout = 1.23 V × (1 + R2 / R1)

For 5 V with R1 = 1 kΩ: R2 ≈ 3.07 kΩ — use 3.0 kΩ or 3.09 kΩ (1 %), giving about 4.92 V or 5.03 V. The voltage divider calculator can find the nearest standard value for you.

Continuous and discontinuous mode

Everything above assumes the inductor current never reaches zero — continuous conduction mode (CCM). At light loads the triangle's bottom hits zero and the current stays there for part of the cycle: discontinuous mode (DCM). The converter still works, but Vout = D·Vin no longer holds and the controller compensates. Many modern controllers also skip pulses at very light load to save power, which is why their switch node can look irregular on a scope.

Where the losses go

  • Diode conduction — roughly VF × Iout × (1 − D). At 0.5 V and 2 A that's about 0.6 W, often the biggest loss at low output voltages. Synchronous converters replace the diode with a MOSFET to eliminate most of it.
  • Switch conduction — I2 × RDS(on) × D for a MOSFET.
  • Switching loss — during each transition the switch briefly has both voltage and current. It grows with frequency.
  • Inductor loss — winding resistance (DCR) plus core loss.
  • Controller quiescent current — matters most at very light loads.

Higher frequency allows smaller inductors and capacitors but increases switching loss: that's the central trade-off of power supply design.

Layout matters more than you think

A buck converter that works perfectly in simulation can be noisy or unstable on a bad PCB. The rules of thumb:

  1. Keep the hot loop — input capacitor, switch and diode — as small as physically possible. It carries sharp-edged pulsed current.
  2. Keep the switch node copper small: it's a large, fast voltage swing that radiates.
  3. Route the feedback trace away from the inductor and switch node, and take it from the output capacitor.
  4. Use a solid ground plane under the power stage.

Following the layout in the controller's datasheet is usually the fastest route to a quiet supply.

Summary

  • A buck converter chops the input with a switch, and an inductor + capacitor average it to Vout ≈ D × Vin.
  • Inductor current is a triangle; aim for 20–40 % ripple and a saturation rating above the peak.
  • Output ripple is often set by capacitor ESR, not capacitance.
  • Efficiency comes from switches that are fully on or off; losses come from the diode, switch resistance, transitions and the inductor.
← All articles