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

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.

The one-sentence version. A flyback is a buck-boost whose inductor has been split into two magnetically-coupled windings: the primary stores energy from the source while the switch is on, and the secondary hands that same energy to an isolated output while the switch is off. Everything else follows from that.

Block Diagram

Block diagram of a flyback converter: a DC input feeds a primary MOSFET switch driven by a PWM controller, then a coupled inductor that both isolates and stores energy, then a secondary rectifier diode, an output capacitor filter and the load, with an isolated feedback path returning to the controller.
Figure 1: Flyback converter block diagram — the coupled inductor both isolates and stores

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

Circuit diagram of a flyback converter: a DC source Vin on the primary side feeds the primary winding Np in series with a ground-referenced MOSFET Q; the isolated secondary winding Ns, with opposing dot polarity, feeds a rectifier diode D into an output capacitor C and load R producing Vo.
Figure 2: Flyback converter power circuit — isolated primary and secondary sides
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 DOn 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 CSupplies 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 conventionOpposing 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.
Leakage inductance matters here. No coupling is perfect, so a little energy is trapped in the primary's leakage inductance at turn-off. With nowhere to go it spikes the switch voltage above the Vin + Vo/n level. Every real flyback therefore adds a small snubber or clamp (an RCD network or a Zener) across the primary to catch that spike. It is not optional.

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)

Flyback converter with the switch on: current flows from Vin through the primary winding and the closed switch Q, building magnetic energy in the core. The secondary diode is reverse-biased and off, so the output capacitor alone supplies the load.
Figure 3: Mode 1 — Q on. Primary current builds; diode off; capacitor holds up the output
  • 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)

Flyback converter with the switch off: the collapsing magnetic field forward-biases the secondary diode, so the stored energy flows out of the secondary winding through the diode into the output capacitor and load. The primary switch is open and carries no current.
Figure 4: Mode 2 — Q off. The field collapses, the diode conducts, energy transfers to the output
  • 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

Flyback converter waveforms over two switching periods in continuous conduction: the gate signal, the magnetising current as a continuous triangle that never reaches zero, the primary switch current present only during the on-time, the secondary diode current present only during the off-time, and the switch drain voltage clamped at Vin plus Vo over n during the off-time.
Figure 5: Flyback waveforms in CCM — gate, magnetising, switch, diode and switch-voltage traces

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

Comparison of continuous and discontinuous conduction in a flyback converter. In continuous conduction the magnetising current is a triangle that stays above zero on a positive pedestal. In discontinuous conduction it rises from zero during the on-time, falls back to zero while the diode conducts, and then remains at zero for a dead interval before the next cycle.
Figure 6: The two conduction modes — whether the core fully empties each cycle

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.
The key practical difference. In CCM the gain is fixed by D and n alone. In DCM the gain also depends on the load resistance and the inductance, so the controller has to work a little harder to hold the output steady as the load changes — but it gains a smaller magnetic part and softer switching in return.

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·Vin

Boundary 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

Voltage gain of a flyback converter in continuous conduction versus duty ratio for a turns ratio of 0.2. The curve rises slowly from zero, passes the point where output equals input at a duty of 0.833, and climbs steeply toward the right. The operating point at duty 0.5 gives a gain of 0.2.
Figure 7: CCM voltage gain M = n·D/(1−D) — the turns ratio scales the buck-boost curve

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.

GivenVin = 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 = VoIoR = 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/Lm100 × 0.5 × 20µ/1m = 1.0 A (Ipk = 2.1 A, Ivalley = 1.1 A → CCM)
Diode peak current   Im,pk/n2.1 / 0.2 = 10.5 A
Switch voltage stress   Vin + Vo/n100 + 100 = 200 V (+ leakage spike)
Diode voltage stress   Vo + n·Vin20 + 20 = 40 V
Input current (avg)   D·Im,avg0.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.

Frequently Asked Questions – FAQs

A flyback converter is an isolated buck-boost converter. Its single inductor is re-wound as a two-winding coupled inductor, so the input and output share no wire. While the switch is on, energy is stored in the core from the input; while the switch is off, that energy is released through a diode to an isolated output. It is the most common topology in low-power chargers and adapters because it gives isolation and a free choice of output voltage with just one switch and one diode.

The name describes the energy transfer. While the switch is on, energy is stored in the transformer core and nothing reaches the output. The moment the switch turns off, the winding voltages reverse and the stored energy "flies back" out of the secondary to the load. Because energy is delivered on the off-transition rather than passed straight through, it is called a flyback. A forward converter, by contrast, passes energy through while the switch is on.

In continuous conduction the output voltage is Vo = n · Vin · D / (1 − D), where n = Ns/Np is the turns ratio and D is the duty ratio. It is the buck-boost relation D/(1−D) scaled by the turns ratio. So the duty cycle needed for a target output is D = Vo / (Vo + n·Vin). In discontinuous conduction the output also depends on load and inductance, following Vo = Vin · D · √(R / (2·Lm·f)).

Not in the usual sense. A conventional transformer passes energy through instantly and the two windings conduct at the same time. A flyback "transformer" is really a coupled inductor: its job is to store energy in the core (which is why it has an air gap) and its windings never conduct simultaneously — the primary conducts while the switch is on, the secondary while it is off. It provides isolation and a turns-ratio like a transformer, but it works as an energy-storage device.

It is whether the core fully empties each cycle. In continuous conduction mode (CCM) the magnetising current never falls to zero, so the output voltage depends only on duty and turns ratio and peak currents are lower — better for higher power. In discontinuous conduction mode (DCM) the current hits zero and rests before the next cycle; peak currents are higher but the transformer is smaller, the diode switches softly, and the loop is easier to compensate. Most low-power flybacks are designed for DCM.

Yes. Like the buck-boost it is based on, a flyback can produce an output either higher or lower than the input, and the turns ratio adds a second lever. Below the crossover point (D = 1/(1+n)) it steps down; above it, it steps up. By choosing the turns ratio the designer places that crossover wherever a convenient duty cycle lands, which is why a single flyback can go from 320 V mains down to 5 V, or from a low battery up to a high rail.

Because no coupled inductor is perfectly coupled. A little energy is stored in the primary's leakage inductance, and at turn-off that energy has nowhere to transfer to the secondary. It dumps into the switch's drain node and spikes the voltage above the normal Vin + Vo/n level, which can exceed the switch rating. A snubber or clamp — an RCD network or a Zener across the primary — absorbs that spike and protects the switch. It is a mandatory part of any real flyback.

While the switch is off it must block the input plus the reflected output, Vin + Vo/n, plus the leakage spike on top — so it is rated well above the input voltage. The secondary diode, while the switch is on, must block the output plus the reflected input, Vo + n·Vin. In the worked example on this page (Vin = 100 V, n = 0.2, Vo = 20 V) that is 200 V for the switch and 40 V for the diode. The turns ratio trades these: a smaller n lowers switch stress but raises diode current.

Because energy is delivered in bursts, not continuously. The switch and diode conduct only part of the cycle, so to deliver a given average power they must carry high peak and RMS currents — much higher than a converter that conducts continuously. Those currents mean higher conduction losses and larger, more stressed capacitors, which become impractical above roughly 100–150 W. Beyond that a forward, push-pull, half-bridge or full-bridge converter, which transfers energy more evenly, is used instead.

They differ in when energy is transferred and how the transformer is used. A flyback stores energy in a gapped coupled inductor while the switch is on and releases it when the switch turns off, using opposing winding dots and no output inductor. A forward converter uses the transformer conventionally — energy passes straight through to the secondary while the switch is on — and needs an output inductor and a reset winding. Flyback is simpler and cheaper at low power; forward handles higher power with lower peak currents.