Flyback Converter
The isolated buck-boost — one coupled inductor, one switch, one diode. It stores energy on the primary while the switch is on and flings it across an isolation barrier to the output when the switch turns off.
- Introduction — isolation from one part
- What is a Flyback Converter?
- Block Diagram
- Circuit Diagram & Construction
- Principle of Operation
- Modes of Operation
- Waveforms Explained in Detail
- CCM vs DCM
- Key Formulas
- Voltage Gain & Turns Ratio
- Worked Example
- Advantages & Disadvantages
- Applications
- Frequently Asked Questions – FAQs
- Related Topics
Introduction — isolation from one part
Up to now in the DC-DC family — the buck, the boost, the buck-boost — the input and output have shared a common wire. The flyback converter breaks that connection. Its input side and output side share no copper at all; energy crosses between them only as a magnetic field. That property is called galvanic isolation, and it is why the flyback is the most widely built power supply in the world: almost every low-power phone charger, laptop adapter, TV standby supply and appliance PCB has one inside.
What makes it clever is how little it needs to do this. A flyback is simply a buck-boost converter in which the single inductor has been re-wound as a two-winding coupled inductor. That one change buys isolation, a free choice of output voltage through the turns ratio, and the ability to produce several outputs at once — all from one switch and one diode.
This page builds the flyback from that idea: what the parts are, what happens in each half of the switching cycle, the waveforms you would see on a scope, the formulas that size it, and a full worked example with real numbers.
What is a Flyback Converter?
A flyback converter is an isolated switch-mode DC-DC converter (it also runs directly from rectified AC, which is how a mains charger works) built around four parts:
- A coupled inductor — the "flyback transformer". Two windings, primary Np and secondary Ns, wound on one core. Unlike a normal transformer it is meant to store energy, so its core has an air gap.
- A primary switch (MOSFET), Q. Ground-referenced on the input side and driven by a PWM controller that sets the duty ratio D.
- A secondary rectifier diode, D. It lets the stored energy out to the load in one direction only.
- An output capacitor, C. It holds up the output voltage during the part of the cycle when the diode is not conducting.
The trick is in the dot convention — the way the two windings are wound relative to each other. In a flyback the dots are opposed: when the primary switch is on and current is building in Np, the induced voltage on Ns reverse-biases the diode, so no current can leave. Energy just accumulates in the core. Only when the switch turns off does the winding voltage reverse, forward-bias the diode, and let that stored energy "fly back" out to the load — which is where the name comes from.
Block Diagram
Read it left to right as a power path: the DC input is chopped by the switch, poured into the coupled inductor, rectified by the diode, smoothed by the capacitor, and delivered to the load. The one feature that separates this from a non-isolated converter is the isolation barrier running down the middle of the coupled inductor. Nothing electrical crosses it — not the power (which crosses as magnetic flux) and not even the feedback, which is sent back to the controller through an opto-coupler so the control loop can regulate the output without breaking isolation.
Circuit Diagram & Construction
| Coupled inductor (Np : Ns) | The heart of the converter. Stores energy in a gapped core while Q conducts and releases it while Q is off. The turns ratio n = Ns/Np sets how the output voltage relates to the input. |
|---|---|
| Switch Q (MOSFET) | On the primary, referenced to the input ground so its gate drive is simple. Must block Vin + Vo/n in the off state — more than the input voltage alone. |
| Diode D | On the secondary. Reverse-biased while energy is stored (Q on), forward-biased while it is delivered (Q off). Blocks Vo + n·Vin in reverse. |
| Capacitor C | Supplies the entire load current during the on-time, when the diode is off. Because it is fed in bursts, flyback output capacitors see high ripple current and are sized for it. |
| Dot convention | Opposing dots. This is what distinguishes a flyback from a forward converter: the secondary is wound so its diode blocks during the on-time, forcing the transformer to store rather than pass energy straight through. |
Principle of Operation
The switch turns on and off at a fixed frequency; the fraction of each period it stays on is the duty ratio D. The two halves of that cycle do two completely different jobs, and the coupled inductor is the only thing that connects them:
- While Q is on the primary is connected across Vin, its current ramps up, and the core fills with magnetic energy. The diode is reverse-biased, so the output is cut off and the capacitor alone feeds the load.
- While Q is off the primary current is interrupted. The magnetic field cannot collapse instantly, so it drives current out of the secondary instead: the diode conducts, the stored energy pours into the capacitor and load, and the core empties.
Because energy is stored then forwarded rather than passed through, the primary and secondary never carry current at the same time. That is the single most important fact about a flyback, and every waveform on this page is a consequence of it. The governing principle is volt-second balance on the magnetising inductance: over one steady-state cycle the flux must return to where it started, so the volt-seconds applied while Q is on must equal the volt-seconds removed while Q is off. That balance is what fixes the output voltage.
Modes of Operation
A flyback has exactly two switch states per cycle. Here is each one on the circuit, with the conducting path highlighted.
Mode 1 — Switch ON (storing energy)
- Q is closed, putting the full Vin across the primary. The magnetising current rises linearly at a slope of Vin/Lm, storing energy ½Lmi² in the core.
- By the opposing-dot arrangement, the secondary voltage reverse-biases diode D. The whole secondary side is disconnected — no energy reaches the load directly.
- The load is carried entirely by the output capacitor C, which discharges slightly. This is why the output ripple depends on how big C is and how long the on-time lasts.
Mode 2 — Switch OFF (delivering energy)
- Q opens and the primary current is cut off. The core's magnetic field must keep the total flux continuous, so it forces current out of the secondary winding instead.
- The winding voltages reverse, forward-biasing diode D. The stored energy now flows through the diode into C and the load — recharging the capacitor and powering R.
- The secondary current starts at 1/n times the primary's peak and ramps down at a slope of (Vo/n)/Lm as the core empties. If it reaches zero before the switch turns on again, the converter is in discontinuous conduction (see below).
Waveforms Explained in Detail
Read the five traces together and the whole converter is visible in one picture:
- Gate. The PWM signal. On for DT, off for (1−D)T. Everything else is timed from these two intervals; here D = 0.5, so they are equal.
- Magnetising current im. The current in the coupled inductor itself, referred to the primary. It ramps up while Q is on (slope Vin/Lm) and down while Q is off (slope (Vo/n)/Lm). Here it never touches zero — that is what "continuous conduction" means. Its average, 1.6 A, is set by the load.
- Switch current iQ. Exactly im during the on-time and zero during the off-time. The abrupt jump to zero at turn-off is what strands the leakage energy and demands a snubber. Notice the input draws current in bursts, not continuously.
- Diode current iD. The mirror image — zero during the on-time, then im/n during the off-time. It peaks at 10.5 A here, five times the primary peak, because the 5:1 turns ratio trades voltage for current. The output is delivered in bursts too, which is why C must be a low-ESR, high-ripple-current part.
- Switch voltage vQ. Near zero while Q conducts, then it stands off Vin + Vo/n = 200 V — twice the input — while Q is off, because the reflected output voltage adds to the input. This, plus the leakage spike, sets the voltage rating of the MOSFET.
The two current traces never overlap: iQ lives in the shaded on-time, iD in the un-shaded off-time. That is the storing-then-forwarding behaviour made visible, and it is the root of both the flyback's great virtue (isolation with one magnetic part) and its great vice (high peak and RMS currents).
CCM vs DCM
A flyback can run in either of two modes depending on load, inductance and frequency — and the difference is simply whether the core empties completely before the next cycle begins:
- Continuous Conduction Mode (CCM). The magnetising current never falls to zero; there is always some energy left in the core. The output voltage then depends only on D and the turns ratio, so regulation is clean and predictable. Peak currents are lower for a given power, which suits higher-power designs.
- Discontinuous Conduction Mode (DCM). The core empties fully every cycle, leaving a "dead time" where no current flows at all. Peak currents are higher, but the transformer can be smaller, the diode turns off softly (no reverse-recovery loss), and the loop is easier to compensate. Most low-power flybacks — chargers and adapters — are deliberately designed for DCM.
Key Formulas
All of these come from one idea — volt-second balance on the magnetising inductance — with n = Ns/Np.
Output voltage (CCM). Volt-seconds on while Q conducts equal volt-seconds off while it does not:
Vin · D·T = (Vo/n) · (1−D)·T → Vo = n · Vin · D / (1 − D)Duty ratio for a target output. Rearranging the above:
D = Vo / (Vo + n·Vin)Magnetising-current ripple and average. The primary sees Vin for DT; the average is fixed by the load:
Δim = Vin · D · T / Lm | Im,avg = n · Io / (1 − D)Device voltage stress. Size the switch and diode for these, not for Vin or Vo alone:
Switch: VQ,off = Vin + Vo/n | Diode: VD,rev = Vo + n·VinBoundary and DCM. The converter is at the CCM/DCM boundary when the ripple just equals twice the average (Im,valley = 0). In deep DCM the gain follows from energy balance (P = ½Lmipk²·f):
Vo = Vin · D · √( R / (2 · Lm · f) ) (DCM, load-dependent)(Diode and switch drops, winding resistance and the leakage snubber are neglected in these ideal expressions; real efficiency is typically 80–92%.)
Voltage Gain & Turns Ratio
The flyback keeps the buck-boost's D/(1−D) shape but multiplies it by the turns ratio n. That gives the designer a second, independent lever: the turns ratio sets the operating point, and the duty then trims around it. A mains adapter that has to drop 320 V of rectified line down to 5 V uses a large step-down ratio (small n) so the duty lands in a comfortable 0.3–0.5 range; a boost-type flyback for a high-voltage output uses a large n. Either way:
- Step-down or step-up is available from the same circuit — below the unity line it bucks, above it boosts, and n moves where that crossover sits.
- Multiple outputs come almost free: add more secondary windings, each with its own diode and capacitor, and each output is set by its own turns ratio. This is why the flyback dominates multi-rail supplies.
- Very high or very low ratios are practical because the transformer, not the duty cycle, does the heavy lifting — avoiding the extreme duty cycles that make a plain buck-boost inefficient.
Worked Example
One consistent design, used by every figure above. Follow the numbers through and the formulas above check out.
| Given | Vin = 100 V, Np:Ns = 5:1 (n = 0.2), D = 0.5, f = 50 kHz (T = 20 µs), Lm = 1 mH |
|---|---|
| Output voltage Vo = n·Vin·D/(1−D) | 0.2 × 100 × (0.5/0.5) = 20 V |
| Load (for Io = 4 A) R = Vo/Io, Po = VoIo | R = 5 Ω, Po = 80 W |
| Magnetising average Im,avg = n·Io/(1−D) | 0.2 × 4 / 0.5 = 1.6 A |
| Magnetising ripple Δim = Vin·D·T/Lm | 100 × 0.5 × 20µ/1m = 1.0 A (Ipk = 2.1 A, Ivalley = 1.1 A → CCM) |
| Diode peak current Im,pk/n | 2.1 / 0.2 = 10.5 A |
| Switch voltage stress Vin + Vo/n | 100 + 100 = 200 V (+ leakage spike) |
| Diode voltage stress Vo + n·Vin | 20 + 20 = 40 V |
| Input current (avg) D·Im,avg | 0.5 × 1.6 = 0.8 A → Pin = 100 × 0.8 = 80 W = Po ✓ |
The last row is the sanity check: with no losses, input power equals output power, and it does — 80 W in, 80 W out. Notice how the 5:1 turns ratio shows up everywhere: it divides the voltage stress on the diode, multiplies the current stress on it, and sets the output at one-fifth of what a non-isolated buck-boost would give at the same duty. Choosing n is the core design decision in a flyback.
Advantages & Disadvantages
Advantages
- Galvanic isolation between input and output — essential for mains-connected supplies and for safety.
- Very low part count — one magnetic component, one switch, one diode. No separate output inductor, unlike a forward converter.
- Free choice of output voltage through the turns ratio: buck, boost, or large ratios all from one topology.
- Multiple outputs from extra secondary windings, each independently set by its own turns ratio.
- Cheap and compact at low power — the reason it dominates chargers and adapters below ~150 W.
Disadvantages
- High peak and RMS currents. Energy is delivered in bursts, so the switch, diode and capacitors all carry currents well above the average — the main reason it does not scale to high power.
- Discontinuous input and output currents → more input and output ripple, needing bigger filters and generating more EMI.
- Leakage-inductance spike at turn-off, which wastes energy and demands a snubber or clamp on the switch.
- Larger, gapped transformer that must store the full throughput energy each cycle, so the magnetic part is bigger than a same-power forward converter's.
- Higher output ripple because the capacitor alone holds up the output during the whole on-time.
Applications
- Phone chargers, laptop adapters and USB power supplies — the classic low-power isolated AC-DC role.
- Standby / auxiliary supplies inside TVs, monitors, and larger converters, generating the housekeeping rails that wake the main supply.
- Appliance and white-goods PCBs that need a small isolated rail from the mains.
- Multi-output supplies — where one flyback produces several isolated voltages (e.g. +5 V, +12 V, −12 V) from a single transformer.
- LED drivers and bias supplies, and isolated gate-drive or sensor supplies in industrial electronics.
- Low-power industrial and telecom DC-DC bricks where isolation is required but power is modest.
The rule of thumb closes it: up to roughly 100–150 W, if you need isolation cheaply, use a flyback. Above that the burst currents become punishing and a forward, push-pull or bridge converter takes over.