Buck and boost converters are efficient, but they share one limitation: the input and output have a common ground, and the output voltage is tied to the input by a fixed ratio. The flyback converter — the circuit inside almost every phone charger — removes both limits. It uses a transformer for isolation, it can step voltage up or down from any input, and it needs only one switch, one diode and one output capacitor. The secret is that its transformer is not used as a transformer at all: it is a coupled inductor that stores energy, then delivers it.
Figure 1: A flyback converter (a) — while the switch is ON the diode is reverse-biased (note the dots on opposite ends of the windings) and energy is stored in the primary inductance; while it is OFF the stored energy flows through the diode to the load. The currents (b) show one 10 µs switching period. (Schematic, not to scale.)
How it works — the formulas
When the switch is ON, the full input voltage appears across the primary winding and the primary current ramps up linearly, storing energy in the magnetic field. The dot convention is the key: the secondary dot is at the bottom, so while the primary dot is positive the secondary dot is negative and the diode is reverse-biased — no energy reaches the load during this phase; the output capacitor supplies the load alone. When the switch turns OFF, the primary current must stop, the magnetic field collapses, the secondary voltage reverses, the diode conducts, and the stored energy flows to the output. The output voltage follows the duty cycle and the turns ratio:
Vout = Vin × D / (1 − D) × Ns / Np
Because the energy is stored and released each cycle, the transformer needs an air gap (unlike a mains transformer, which only transfers energy). In discontinuous conduction mode (DCM) the secondary current falls to zero before the next cycle starts, which makes the control loop simple and stable — the design below is at the DCM boundary.
Worked example — 12 V in, 5 V / 1 A out
Design a 5 W flyback: Vin = 12 V, Vout = 5 V, Iout = 1 A, switching frequency f = 100 kHz (period 10 µs), turns ratio Np : Ns = 2 : 1. First the duty cycle: D = 0.45 gives Vout = 12 × 0.45 / 0.55 × 0.5 = 4.91 V, and the feedback loop trims D to about 0.455 for exactly 5.0 V.
At 85% efficiency the input power is Pin = 5 W / 0.85 = 5.88 W. In DCM the energy delivered each cycle is ½·Lp·Ipk², so the peak primary current is Ipk = 2 × Pin / (Vin × D) = 2 × 5.88 / (12 × 0.45) = 2.18 A, and the primary inductance is Lp = Vin × D / (f × Ipk) = 12 × 0.45 / (100 kHz × 2.18 A) = 24.8 µH ≈ 25 µH. Check it by energy: ½ × 24.8 µH × (2.18 A)² = 58.9 µJ per cycle, and 58.9 µJ × 100 kHz = 5.89 W, matching the 5.88 W input.
The peak secondary current is Is_pk = Ipk × Np / Ns = 2.18 × 2 = 4.36 A. The secondary inductance is Ls = Lp × (Ns / Np)² = 24.8 × 0.25 = 6.2 µH, so the secondary current takes Ls × Is_pk / Vout = 6.2 µH × 4.36 A / 5 V = 5.4 µs to fall to zero — starting at 4.5 µs, it reaches zero at 9.9 µs, just before the next cycle begins. That is the DCM boundary: the transformer is fully emptied every cycle.
Choosing the switch, the diode and the output capacitor
When the switch is OFF, the primary sees the input voltage plus the reflected output voltage: Vr = Vout × Np / Ns = 5 × 2 = 10 V, so Vds = 12 + 10 = 22 V before the leakage-inductance spike. A 60 V MOSFET gives comfortable margin (the spike is absorbed by a small RCD snubber across the primary). The diode must block Vout + Vin × Ns / Np = 5 + 12 × 0.5 = 11 V in reverse, so a 40 V Schottky diode is a good choice — and its low forward drop keeps the output efficient.
The output ripple has two parts. The capacitor alone gives ΔV = Iout × D / (f × C) = 1 × 0.45 / (100 kHz × 470 µF) = 9.6 mV. But the capacitor's ESR dominates: with 50 mΩ ESR the 4.36 A secondary peak makes a spike of 4.36 × 0.05 = 0.22 V. That is why flyback outputs use low-ESR electrolytic or ceramic capacitors — the ripple is set by the capacitor's resistance, not its capacitance.
Key points to remember
- Flyback = coupled inductor, not a transformer: energy is stored in the primary while the switch is ON (diode blocked by the opposite dots) and delivered to the load while it is OFF.
- Worked example: 12 V → 5 V / 1 A at 100 kHz, Np : Ns = 2 : 1, D = 0.45 (4.91 V; loop trims to 0.455 for 5.0 V), η = 85%.
- Ipk = 2.18 A, Lp = 25 µH (check: 58.9 µJ × 100 kHz = 5.89 W ≈ Pin); Is_pk = 4.36 A, secondary current reaches zero at 9.9 µs — the DCM boundary.
- MOSFET stress: 22 V plus spike → use a 60 V device with an RCD snubber. Diode reverse voltage 11 V → 40 V Schottky.
- Output ripple is ESR-dominated: 9.6 mV from the 470 µF capacitance but 0.22 V from 50 mΩ ESR — use a low-ESR capacitor.
- One switch, one diode, one capacitor and isolation — that is why the flyback is the standard circuit for phone chargers and auxiliary supplies.