Power Electronics
The crude way to get 5 V from 12 V is to burn the difference as heat (a linear regulator — 40% efficiency). The buck is the elegant way: it switches the voltage on and off rapidly and takes the average; ideally it produces no heat at all, with efficiency of 90%+.
Its secret is the inertia of the inductor: while the switch is on, the source feeds the load through the inductor and the inductor "stockpiles" current; when the switch turns off, the inductor refuses to stop — it keeps driving its current through the diode path. The load never notices the interruption. The average output depends only on the ratio: Vout = D · Vin.
The ripple in the inductor current is ΔIL = (Vin−Vout)·D/(f·L); the output capacitor smooths the rest. Raising the frequency shrinks L and C but creates switching losses — design is always this balance.
⚡ Open this lesson in the simulator — free