Flyback Converter¶
Overview¶
The flyback converter is an isolated DC-DC topology derived from the buck-boost converter. It uses a coupled inductor (flyback transformer) to provide galvanic isolation while enabling step-up or step-down voltage conversion. Flyback converters are widely used in low-power applications (5-150W) such as phone chargers, LED drivers, and auxiliary power supplies.
Difficulty: Intermediate
Estimated Time: 30-45 minutes
Learning Objectives¶
After completing this example, you will be able to: - Understand flyback converter operation in CCM and DCM - Design the coupled inductor (flyback transformer) - Analyze voltage stresses on switch and diode - Calculate output voltage as a function of duty cycle and turns ratio
Prerequisites¶
- Basic understanding of DC-DC converter operation
- Familiarity with Buck-Boost Converter
- Understanding of transformer/coupled inductor behavior
Circuit Description¶
Topology¶
Flyback Transformer
n:1
+Vin ──┬──[S]──┬────● ●────[D]──┬── +Vout
│ │ ║ ║ │
│ ┌┴┐ ║ ║ ┌┴┐
│ │ │ Lm ║ ║ │ │ C
┌┴┐ │ │ ║ ║ │ │
│ │ Cin └┬┘ ║ ║ └┬┘
│ │ │ ● ● │
└┬┘ │ R │ Load
│ │ │
GND ───┴───────┴─────────────────┴── GND (isolated)
Primary Side Secondary Side
Key Components: - S: Primary-side switch (MOSFET) - Lm: Magnetizing inductance (energy storage) - n:1: Turns ratio (primary:secondary) - D: Secondary-side rectifier diode - C: Output capacitor
Operating Principle¶
Switch ON (Energy Storage Phase): 1. Primary current ramps up through magnetizing inductance Lm 2. Energy stored in magnetic field: E = ½ Lm Ip² 3. Secondary diode is reverse-biased (due to transformer polarity) 4. Output capacitor supplies load current
Switch OFF (Energy Transfer Phase): 1. Primary current interrupted 2. Transformer polarity reverses (flyback action) 3. Secondary diode conducts, transferring energy to output 4. Magnetizing current decreases, reflected to secondary: Is = Ip × n
Key Parameters¶
| Parameter | Symbol | Example Value | Unit | Description |
|---|---|---|---|---|
| Input Voltage | Vin | 85-265 (rectified AC) | V | Wide input range |
| Output Voltage | Vout | 12 | V | Regulated output |
| Output Power | Pout | 30 | W | Rated power |
| Switching Frequency | fs | 100 | kHz | Fixed frequency |
| Turns Ratio | n | 10:1 | - | Primary:Secondary |
| Magnetizing Inductance | Lm | 500 | μH | Primary referred |
| Output Capacitance | C | 470 | μF | Low ESR type |
| Max Duty Cycle | Dmax | 0.5 | - | For DCM/CCM boundary |
Voltage Conversion Ratio¶
CCM (Continuous Conduction Mode):
DCM (Discontinuous Conduction Mode):
Where: - D = duty cycle - n = turns ratio (Np/Ns) - Lm = magnetizing inductance (primary referred) - RL = load resistance
Design Equations¶
Turns Ratio Selection¶
For Vin = 150V (typical rectified line), Vout = 12V, D = 0.4:
Magnetizing Inductance¶
For CCM operation at minimum load:
For boundary/DCM operation (common in low-power):
Switch Voltage Stress¶
The switch must withstand input voltage plus reflected output voltage plus leakage spike:
Example: Vin=400V, n=8, Vout=12V, Vspike=100V
Diode Voltage Stress¶
Example: Vout=12V, Vin=400V, n=8
Building in GeckoCIRCUITS¶
Step 1: Create Primary Side¶
- Add DC voltage source (Vin = 150V for testing)
- Add input capacitor (Cin = 100μF, optional)
- Add switch (MOSFET or ideal switch) in series with primary winding
Step 2: Add Coupled Inductor/Transformer¶
- Option A - Ideal Transformer + Inductor:
- Add ideal transformer with turns ratio n:1
-
Add inductor Lm in parallel with primary winding
-
Option B - Coupled Inductors (if available):
- Use coupled inductor component
- Set primary inductance Lp = Lm
- Set coupling coefficient k ≈ 0.95-0.99
-
Secondary inductance Ls = Lm/n²
-
Note transformer dot convention (primary and secondary dots on opposite sides for flyback operation)
Step 3: Create Secondary Side¶
- Add rectifier diode (cathode to output positive)
- Add output capacitor
- Add load resistor (R = Vout²/Pout)
Step 4: Add PWM Control¶
- Add PWM signal generator (fs = 100kHz)
- Set duty cycle D = 0.4 (for initial test)
- Connect to switch gate
Step 5: Configure Simulation¶
- Simulation time: 5-10 ms (settling time)
- Time step: 10-50 ns (1/100 of switching period)
- Solver: Trapezoidal
Expected Results¶
Steady-State Waveforms¶
| Signal | Expected Behavior |
|---|---|
| Switch voltage (Vds) | Square wave: 0 during ON, Vin + n×Vout during OFF |
| Primary current (Ip) | Triangular ramp during ON, zero during OFF |
| Secondary current (Is) | Zero during ON, decaying ramp during OFF |
| Output voltage | DC with ripple: Vout ± ΔVout |
Design Verification¶
For Vin=150V, D=0.4, n=8:1:
Output Voltage Ripple¶
For Iout=2.5A, D=0.4, fs=100kHz, C=470μF:
Exercises¶
Exercise 1: CCM vs DCM Operation¶
- Set Lm = 500μH, load R = 10Ω (heavy load)
- Run simulation, observe secondary current waveform
- Increase R to 100Ω (light load)
- Question: Does the converter enter DCM? How can you tell?
Exercise 2: Input Voltage Variation¶
- Fix D = 0.4, vary Vin from 100V to 200V
- Record Vout for each Vin
- Plot Vout vs Vin
- Question: Why does a fixed duty cycle not regulate output?
Exercise 3: Turns Ratio Trade-off¶
- Test n = 5:1, 10:1, and 15:1 with fixed Vin = 150V
- Adjust D to achieve Vout = 12V in each case
- Measure: switch voltage stress, primary current magnitude
- Question: What are the trade-offs in selecting turns ratio?
Exercise 4: Leakage Inductance Effects¶
- If using coupled inductors, reduce k from 0.99 to 0.90
- Observe switch voltage during turn-off
- Advanced: Add an RCD snubber to clamp the voltage spike
- Question: How much energy is lost in the snubber?
Practical Considerations¶
Transformer Design¶
- Core selection: Ferrite (EE, ETD, PQ cores common)
- Air gap: Required for energy storage (Lm), typically 0.5-2mm
- Wire gauge: Primary handles high peak current, secondary handles DC
Common Issues¶
| Issue | Cause | Solution |
|---|---|---|
| No output | Wrong dot convention | Reverse secondary winding |
| Low output | DCM operation | Increase Lm or reduce load |
| Voltage spike | Leakage inductance | Add snubber circuit |
| High ripple | Small capacitor | Increase C or use low-ESR type |
| Transformer saturation | Duty cycle too high | Limit Dmax, add reset mechanism |
Related Examples¶
- Buck Converter - Non-isolated step-down
- Forward Converter - Alternative isolated topology
- Full Bridge - Higher power isolated
References¶
- Pressman, A., Billings, K., Morey, T. "Switching Power Supply Design" - Chapter on Flyback Converters
- Basso, C. "Switch-Mode Power Supplies" - SPICE Simulation
- Texas Instruments SLUP127: "Flyback Transformer Design"
- ON Semiconductor AND9124: "Flyback Design Guidelines"
Circuit Files¶
Note: Example circuits to be added: -
flyback_basic.ipes- Basic flyback without feedback -flyback_dcm.ipes- DCM operation example -flyback_ccm.ipes- CCM operation with larger Lm -flyback_snubber.ipes- With RCD snubber for leakage
Example Version: 1.0 Last updated: 2026-02 GeckoCIRCUITS v1.0