Flyback Converter Tutorial

Flyback Converter Tutorial — Complete Design Guide with Formulas

Learn flyback converter design from first principles: transformer turns ratio, snubber circuits, loop compensation, and practical design examples for isolated DC-DC power supplies.

Design your flyback converter in minutes, not hours

Try Our Free Flyback Calculator →

Quick Answer

A flyback converter is an isolated DC-DC converter that uses a coupled inductor (flyback transformer) to transfer energy from input to output. During the switch-on phase, energy is stored in the transformer’s magnetic field. During the switch-off phase, the stored energy is released to the output through the secondary winding. The output voltage is determined by VOUT = VIN × (NS/NP) × D/(1−D), where NS/NP is the turns ratio and D is the duty cycle. Flyback converters are the most popular topology for low-to-medium power isolated supplies (5–150W), found in USB chargers, LED drivers, and auxiliary power supplies.

Flyback Converter Fundamentals

Unlike forward converters that transfer energy directly during the switch-on period, flyback converters operate on the “flyback” principle: energy is stored in the transformer core during the primary switch-on time, then “flies back” to the output when the switch turns off. This makes the flyback topology simpler (fewer components) and more cost-effective for sub-150W isolated applications.

Key Operating Waveforms

The flyback converter has two distinct phases per switching cycle:

Phase Switch State Primary Current Secondary Current Energy Flow
On-Time (tON) Switch ON Ramps up linearly Zero (diode reverse biased) Stored in transformer core
Off-Time (tOFF) Switch OFF Zero Ramps down linearly Transferred to output

The Flyback Transformer: More Than a Transformer

The “transformer” in a flyback converter is technically a coupled inductor with an air gap. The air gap stores the majority of the energy and prevents core saturation. Without sufficient gap, the core would saturate at even modest currents, destroying the switch.

Transformer Turns Ratio

n = NS / NP = VOUT × (1−Dmax) / (VIN(min) × Dmax)

Where:
n = secondary-to-primary turns ratio
Dmax = maximum duty cycle (typically 0.45 for flyback)
VIN(min) = minimum input voltage

Primary Inductance

LP = (VIN(min) × Dmax)2 / (2 × PIN × fSW × KRF)

Where KRF is the ripple factor (0.3–0.6 for CCM, 1.0 for DCM boundary)
PIN = POUT / η

Core Design Formulas

Peak Primary Current

IPK = PIN / (VIN(min) × Dmax) + (VIN(min) × Dmax) / (2 × LP × fSW)

Output Capacitor Selection

COUT ≥ (IOUT × Dmax) / (fSW × ΔVOUT)

Where ΔVOUT = allowable output ripple (typically 1–2% of VOUT)

Snubber Circuit Design

Rsnub = Vclamp2 / (0.5 × Lleak × IPK2 × fSW)
Csnub = Vclamp / (ΔVclamp × Rsnub × fSW)

Where Vclamp = desired clamp voltage, Lleak = leakage inductance (~1–3% of LP)

Component Selection Table

Component Selection Criteria Typical Values Notes
Primary MOSFET VDS ≥ 1.3 × (VIN(max) + Vclamp) 600–800V for universal input Consider avalanche rating
Output Diode VR ≥ VOUT + VIN(max)/n Schottky for <100V; ultrafast for higher Low VF and fast trr
Input Cap IRMS rating, hold-up time 2–3μF/W for 100/120Hz ripple Aluminum electrolytic + film
Output Cap Low ESR, ripple current rating Multiple MLCCs + 1 bulk electrolytic Watch for ESR zero in compensation
RCD Snubber Clamp leakage energy Vclamp = 1.5 × VOR R must dissipate Lleak energy

Worked Example 1: 85–265VAC to 12V/3A Flyback

Specifications: Universal AC input (85–265VAC → 120–375VDC), VOUT = 12V, IOUT = 3A, fSW = 65kHz, target efficiency η = 85%

Step 1: Output Power and Input Power

POUT = 12V × 3A = 36W
PIN = 36W / 0.85 = 42.4W

Step 2: Reflected Output Voltage and Turns Ratio

Choose VOR = 100V (typical for 600V MOSFET)
n = VOUT / VOR = 12 / 100 = 0.12
NP / NS = 1/n = 8.33 → use 8:1 or 8.5:1

Step 3: Maximum Duty Cycle at Minimum Input

Dmax = VOR / (VIN(min) + VOR) = 100 / (120 + 100) = 0.455

Step 4: Primary Inductance (CCM Design, KRF = 0.5)

LP = (120 × 0.455)2 / (2 × 42.4 × 65,000 × 0.5)
= 2,989 / 2,756,000 = 1.08mH → Select 1.0mH

Step 5: MOSFET Voltage Rating

VDS(max) = VIN(max) + VOR + Vspike
= 375 + 100 + 80 = 555V → Select 650V MOSFET (e.g., STP6N65)

Worked Example 2: 48V to 5V/2A Isolated Flyback (Telecom)

Specifications: VIN = 36–72VDC, VOUT = 5V, IOUT = 2A, fSW = 200kHz

VOR = 36V (using 100V MOSFET, conservative)
n = 5 / 36 = 0.139, NP/NS ≈ 7:1
Dmax = 36 / (36 + 36) = 0.50
LP = (36 × 0.50)2 / (2 × 11.8 × 200,000 × 0.4) = 324/1,888,000 = 172μH

Loop Compensation for Flyback Converters

Flyback converters in CCM exhibit a Right-Half-Plane Zero (RHPZ) similar to boost and buck-boost topologies. Proper compensation is critical for stable operation.

Parameter Formula Design Guideline
RHPZ Frequency fRHPZ = (1−D)2 × RLOAD / (2π × LP × D × n2) fC < fRHPZ/5
Output Pole fP = 1 / (2π × RLOAD × COUT) Place compensation zero near this pole
ESR Zero fZ(ESR) = 1 / (2π × ESR × COUT) Ensure it’s well above fC
Compensation tip: Use Type II compensation (1 zero, 2 poles) for most flyback designs. Place the compensation zero at the output pole frequency, and the high-frequency pole at fSW/2 or the ESR zero (whichever is lower).

5 Common Flyback Design Mistakes

Mistake 1: Forgetting the Air Gap
Using a standard transformer core without an air gap causes immediate core saturation. The flyback “transformer” is a coupled inductor, not a conventional transformer.
Correct: Always include an air gap in the core. Gap length lg = (μ0 × NP2 × Ae) / LP. Proper gapping stores energy in the gap, not the core material.
Mistake 2: Inadequate Snubber Design
Skipping or undersizing the RCD snubber leads to excessive voltage spikes on the MOSFET drain during turn-off, eventually destroying the switch.
Correct: Design snubber to clamp leakage energy: Rsnub = Vclamp2 / (0.5 × Lleak × IPK2 × fSW). Leave 20–30% margin on clamp voltage above VOR.
Mistake 3: Ignoring Transformer Leakage Inductance
High leakage inductance wastes energy in the snubber, reduces efficiency, and causes cross-regulation issues in multi-output designs.
Correct: Use sandwich winding technique (primary-secondary-primary) to minimize leakage. Target Lleak < 3% of LP. Use interleaved windings for better coupling.
Mistake 4: Wrong Output Diode Selection
Using a standard rectifier diode instead of a fast-recovery or Schottky type causes excessive reverse recovery losses and reduced efficiency.
Correct: For outputs below ~50V, use Schottky diodes (zero reverse recovery). For higher voltages, use ultrafast diodes with trr < 35ns. Factor in PD(diode) = VF × IOUT + fSW × switching loss.
Mistake 5: Poor PCB Layout Causing EMI
Long traces in the primary current loop create large magnetic fields that couple into sensitive circuits and fail EMC compliance.
Correct: Minimize the primary loop area: bulk capacitor → transformer primary → MOSFET → sense resistor → bulk capacitor return. Keep this loop under 1cm2 if possible. Use a ground plane under the switching node for shielding.

FAQ

1. What is the difference between a flyback and a forward converter?

The flyback converter stores energy in the transformer during switch-on and releases it during switch-off, requiring an air-gapped core. The forward converter transfers energy directly during switch-on (like a buck converter with a transformer), uses a non-gapped core, and requires an output inductor. Flyback is simpler and cheaper for <150W; forward is better for higher power and lower output ripple.

2. How do I choose between CCM and DCM for my flyback design?

CCM (Continuous Conduction Mode) provides lower peak currents and less output ripple but requires more complex compensation due to the RHPZ. DCM (Discontinuous Conduction Mode) offers simpler compensation and zero-current turn-on for the output diode but has higher peak currents. Use CCM for POUT > 25–30W; DCM or quasi-resonant for <25W. Many modern flyback controllers operate in DCM at light load and transition to CCM at heavy load.

3. Why does my flyback converter need a snubber circuit?

The leakage inductance in the flyback transformer stores energy that cannot be transferred to the output. When the primary switch turns off, this energy creates a high-voltage spike on the MOSFET drain. The RCD snubber absorbs this leakage energy and clamps the drain voltage to a safe level, protecting the MOSFET from overvoltage breakdown.

4. How do I calculate the flyback transformer turns ratio?

The turns ratio n = NS/NP is calculated as: n = VOUT × (1−Dmax) / (VIN(min) × Dmax). First choose Dmax (typically 0.45 to leave margin), then calculate n. Alternatively, choose a reflected voltage VOR (e.g., 80–120V for 600V MOSFET) and compute n = VOUT / VOR.

5. Can I use a flyback converter for USB-C PD applications?

Yes, flyback converters are widely used in USB-C PD chargers up to 100W. For USB PD, the flyback must support variable output voltages (5V, 9V, 15V, 20V). Design for VOUT(max) and use a controller with adaptive output voltage capability. Popular solutions include the NCP1342 + USB PD controller or the InnoSwitch3-Pro family with integrated synchronous rectification and digital control.

6. What is quasi-resonant (QR) flyback operation?

Quasi-resonant flyback switches the MOSFET at the valley of the drain voltage ringing after demagnetization. This reduces switching losses (zero-voltage or valley switching) and EMI. QR flyback operates in DCM and varies fSW with load. It’s popular in high-efficiency adapters (DoE Level VI, CoC Tier 2). ICs like NCP1207 and UCC28600 integrate QR control.

7. How do I prevent transformer saturation in my flyback design?

To prevent saturation: (1) Include an air gap calculated as lg = (μ0 × NP2 × Ae) / LP; (2) verify maximum flux density Bmax = (LP × IPK) / (NP × Ae) < 0.3T for ferrite cores; (3) include overcurrent protection with cycle-by-cycle current limiting; (4) consider core loss at maximum operating temperature. Ferrite materials (PC40, PC95, 3C96) are standard; for high temperature, consider N87 or similar.

8. What is cross-regulation and how do I minimize it in multi-output flybacks?

Cross-regulation occurs when load changes on one output affect the voltage of other outputs in multi-output flyback designs. This happens because only one output is typically regulated via feedback. Minimize it by: (1) tight coupling between windings (use sandwich winding); (2) pre-loading lightly-loaded outputs with a small resistor; (3) using weighted feedback sensing from the most critical outputs; (4) adding post-regulators (LDO or mag-amp) on auxiliary outputs when tight regulation is required.

Related Calculators

Reference: Switching Power Supply Design (Pressman), TI Power Supply Design Seminars, ON Semiconductor AND8093/D, Infineon AN-2017-01.

发表评论