Why an inductor is the secret ingredient
Last rung you learned to chop a voltage with PWM: flick a switch on for a fraction D of each cycle and off for the rest. The average of that square wave is exactly D · Vin — a knob you can turn from software. But a microcontroller cannot run on a square wave that slams between 12 V and 0 V a hundred thousand times a second. We need to average it into smooth DC. You could just put a big capacitor across the chopper, but the switch would dump huge current spikes into it and melt. The elegant fix is to put an inductor in the path first.
An inductor's defining law is V = L · (dI/dt): the voltage across it sets how fast its current can change, never how big the current *is*. Current through an inductor is like the speed of a heavy flywheel — you can spin it faster or slower, but only gradually. So when our switch slaps a voltage onto an inductor, the current does not jump; it ramps, a straight line whose slope is (V/L). Reverse the voltage and the ramp tilts the other way. The inductor has quietly turned a violent square wave of *voltage* into a gentle triangle wave of *current*. That triangle, smoothed by a small output capacitor, is your clean DC — and almost none of the energy was burned, because an ideal switch and an ideal inductor dissipate nothing.
The buck: stepping down, Vout = D·Vin
The buck converter takes a high voltage and makes a lower one. Picture a single inductor with a switch on its input side and a diode hanging below the switch node. There are only two states, and they take turns every cycle.
- Switch ON (the on-time, D·T). The switch connects Vin to the inductor. The voltage across the inductor is (Vin − Vout), positive, so the inductor current ramps up with slope (Vin − Vout)/L. Energy pours into the inductor's magnetic field and on into the load and output cap. The diode is reverse-biased — it just watches.
- Switch OFF (the off-time, (1−D)·T). The switch opens. But the inductor's current cannot stop instantly — it has momentum. To keep flowing it drags the switch node *below* ground until the diode turns on and provides a return path. Now the inductor sees −Vout across it, so its current ramps down with slope −Vout/L, still feeding the load. This is the diode freewheeling.
Now the killer argument. In steady state, the inductor current must return to exactly where it started each cycle — otherwise it would grow without bound and the part would explode. That means the current it gains during on-time must equal the current it loses during off-time. This is volt-second balance: the average voltage across an inductor over one cycle is zero. Write it out and the whole converter falls out in one line:
BUCK CONVERTER — step-down
Switch L
Vin --o/ o----+-----[ inductor ]----+---- Vout
| |
[diode] [ Cout ] --> load
| |
GND --------------------+----- GND
ON (D*T) : node = Vin -> VL = Vin - Vout (current ramps UP)
OFF ((1-D)T): node ~ 0 -> VL = -Vout (current ramps DOWN)
Volt-second balance (avg VL = 0):
(Vin - Vout) * D + (-Vout) * (1 - D) = 0
Vin*D - Vout*D - Vout + Vout*D = 0
Vin*D = Vout
============================================
Vout = D * Vin (D between 0 and 1, so Vout <= Vin)
============================================
Inductor-current waveform (continuous conduction):
I | /\ /\ /\
| / \ / \ / <- triangle ripple
| / \/ \/ ... around average = I_load
+----------------------------------> t
|<-on->|<-off->|The boost: stepping up, Vout = Vin/(1−D)
How can a circuit make a voltage *higher* than its supply, with no transformer? The trick is older than it looks — it is how a coil ignites a spark plug. The boost converter rearranges the same three parts: now the inductor sits *across* the input, and the switch shorts the far end of it to ground.
- Switch ON. The switch grounds the inductor's far end, so the full Vin sits across the inductor. Current ramps up hard (slope Vin/L) and the inductor stores energy — it is winding up the flywheel. The diode is reverse-biased, so the output cap alone holds up the load. Nothing reaches the output yet.
- Switch OFF. The switch opens and the inductor's current has nowhere to go but through the diode into the output. To keep its current flowing, the inductor flips its own voltage and *adds it on top of Vin* — the two voltages stack in series. So the output sees Vin plus whatever the inductor conjures, which is how Vout climbs above Vin.
Apply volt-second balance again. During on-time the inductor sees Vin; during off-time it sees (Vin − Vout), which is negative. Set the average to zero and the step-up law appears — and notice its teeth: as D approaches 1, Vout shoots toward infinity.
BOOST CONVERTER — step-up
L diode
Vin --[ inductor ]---+------|>|------+---- Vout (> Vin)
| |
Switch [ Cout ] --> load
o |
| |
GND -------------+----- GND
ON (D*T) : far end = 0 -> VL = Vin (store energy)
OFF ((1-D)T): diode conducts -> VL = Vin - Vout (dump to output)
Volt-second balance:
Vin * D + (Vin - Vout) * (1 - D) = 0
Vin - Vout + Vout*D = 0
Vin = Vout * (1 - D)
============================================
Vout = Vin / (1 - D) (D->1 gives Vout->infinity)
============================================
D=0.0 -> Vout = Vin (1x)
D=0.5 -> Vout = 2 * Vin (2x)
D=0.8 -> Vout = 5 * Vin (5x)
D=0.9 -> Vout = 10 * Vin (10x !!)The buck-boost: either direction, output flipped
Sometimes you cannot promise whether you need to step up or down. A lithium cell sags from 4.2 V down to 3.0 V as it drains — but your circuit wants a steady 3.3 V, which is *below* the full battery and *above* the empty one. A buck cannot reach above its input; a boost cannot reach below. You need a topology that does both: the buck-boost converter.
The classic inverting buck-boost rewires the parts one more time: switch on the high side, inductor to ground, diode pointing the 'wrong' way to a negative output. During on-time the switch dumps Vin entirely across the inductor (storing energy, output isolated, exactly like a boost's charging phase). During off-time the inductor freewheels through the diode into the output cap — but because of how it is wired, it pushes current *out* of the output node, so the output comes out negative. Volt-second balance gives a law that is neither purely buck nor boost but a blend of both:
INVERTING BUCK-BOOST
Switch diode
Vin --o/ o----+------+ |<|----+---- Vout (NEGATIVE!)
| | |
[ L ] (node) [ Cout ] --> load
| |
GND ------------------+----- GND
ON : VL = Vin (store; output isolated)
OFF : VL = Vout (inductor freewheels to output)
Volt-second balance:
Vin * D + Vout * (1 - D) = 0
============================================
Vout = -Vin * D / (1 - D)
============================================
D < 0.5 -> |Vout| < Vin (acting like a BUCK)
D = 0.5 -> |Vout| = Vin (unity, inverted)
D > 0.5 -> |Vout| > Vin (acting like a BOOST)
One knob D spans the whole range — below, at, and above Vin.Worked example: a 5 V → 3.3 V buck
Let's size a real one. You have a 5 V USB rail and need 3.3 V at 1 A for a microcontroller, switching at 500 kHz. Two questions decide everything: what duty cycle, and what inductor? The duty cycle is almost a one-liner; the inductor is set by how much ripple — wobble in the current — you are willing to tolerate.
WORKED EXAMPLE: 5 V -> 3.3 V buck, Iout = 1 A, fsw = 500 kHz
STEP 1 — Duty cycle (ideal)
Vout = D * Vin -> D = Vout / Vin = 3.3 / 5.0 = 0.66
So the switch is ON 66% of each 2 us period:
T = 1 / 500 kHz = 2.0 us
Ton = D * T = 1.32 us
Toff= (1-D) * T = 0.68 us
STEP 2 — Pick an inductor for a target ripple
Rule of thumb: ripple current dIL ~ 30% of Iout = 0.3 A
During OFF-time the inductor sees -Vout and ramps DOWN:
dIL = (Vout / L) * Toff
Solve for L:
L = (Vout * Toff) / dIL
= (3.3 V * 0.68 us) / 0.3 A
= 2.244 uV.s / 0.3 A
~ 7.5 uH -> pick a standard 6.8 or 10 uH part
STEP 3 — Sanity-check the ripple with a 10 uH part
dIL = (Vout / L) * Toff = (3.3 / 10e-6) * 0.68e-6
= 0.22 A (about 22% of 1 A -- comfortable)
Inductor current swings 1.0 A +/- 0.11 A, i.e. 0.89 A to 1.11 A.
STEP 4 — Output-cap ripple voltage (why the rail is still clean)
dVout ~ dIL / (8 * fsw * Cout)
= 0.22 / (8 * 500e3 * 22e-6)
~ 2.5 mV (a 22 uF ceramic -> millivolt-clean 3.3 V)Notice the design logic. The duty cycle sets the voltage; the inductor sets the ripple. A bigger inductor means a flatter current triangle (less ripple) but a slower, bulkier, costlier part; a smaller one is cheap and snappy but rings with ripple that stresses the capacitor. The 20–30% ripple rule is the sweet spot the whole industry converged on — enough current swing to keep the converter responsive, little enough that the output cap can mop it up to millivolts.
Three converters, one mental model
Step back and the three topologies collapse into one story. Each is just an inductor, a switch, a diode, and a cap, wired three different ways. Each obeys the same iron law — volt-second balance — and that single equation, applied three times, spat out all three transfer functions. The duty cycle D is the one knob; the wiring decides whether D buys you step-down, step-up, or both.
THE THREE CORE CONVERTERS AT A GLANCE Topology Transfer function Range Output sign ----------- ------------------ ----------- ----------- BUCK Vout = D * Vin <= Vin same (+) BOOST Vout = Vin / (1-D) >= Vin same (+) BUCK-BOOST Vout = -Vin*D/(1-D) any |V| inverted (-) All three: one inductor, one switch, one diode, one cap. All three: derived from avg(V across L over one cycle) = 0. All three: D set by a feedback loop watching the real output.
These three are the alphabet of power conversion. Bolt a transformer into a boost and you get a flyback (galvanic isolation — how your phone charger keeps mains away from your hand). Run a buck in reverse and it becomes a boost (bidirectional, as in an EV that both drives the motor and regenerates braking energy). Stack and interleave them and you power a 1000 A server CPU. Next rung we make it a product: we wrap one of these cores in a feedback loop, a gate driver, protection, and a real switched-mode power supply controller — and turn three equations into a board you can hold.