Understanding the flyback converter calculator — concept and principle
This calculator sizes the key operating values of an isolated flyback DC-DC converter: duty cycle at minimum and maximum input, reflected voltage, switch and diode voltage stress, peak currents, magnetizing ripple and whether it runs in continuous (CCM) or discontinuous (DCM) mode. It is useful for a first pass before detailed transformer design.
How it is calculated
Reflected voltage V_OR = (Np/Ns)(Vout + V_F)
CCM duty cycle D = V_OR ÷ (Vin + V_OR)
Input power P = Vout × Iout ÷ η
Average on-time primary current = P ÷ (Vin × D); ripple ΔI = Vin × D ÷ (Lm × f)
Peak primary current = average + ΔI/2 (CCM) or √(2P ÷ (Lm f)) (DCM)
Switch stress = Vin,max + V_OR; diode reverse voltage = Vout + Vin,max × Ns/Np
Boundary inductance L = Vin² D² ÷ (2P f)
The principle
A flyback stores energy in the magnetizing inductance of its coupled inductor while the switch is on, then releases it to the output through the diode while the switch is off. In steady state the inductor's volt-seconds must balance over a cycle: Vin × D on the primary equals the reflected output voltage × (1 − D). That gives the CCM conversion ratio. If the current ramps all the way to zero before the next cycle, the converter is in DCM, and the peak current is set by energy per cycle instead.
Worked example
Default inputs: Vin 36–72 V, 12 V at 2 A, diode 0.5 V, Np/Ns = 2, 100 kHz, Lm = 100 µH, η = 85%.
- V_OR = 2 × (12 + 0.5) = 25 V; P = 24 ÷ 0.85 = 28.24 W.
- D at 36 V = 25 ÷ 61 = 41%; D at 72 V = 25 ÷ 97 = 25.8%.
- Average on-time current = 28.24 ÷ (36 × 0.41) = 1.914 A; ΔI = 36 × 0.41 ÷ (100 µH × 100 kHz) = 1.475 A.
- ΔI/2 < average, so CCM; peak primary = 1.914 + 0.738 = 2.651 A, secondary 5.303 A.
- Switch stress = 72 + 25 = 97 V; diode = 12 + 72 ÷ 2 = 48 V; boundary Lm = 38.55 µH.
| Minimum DC input voltage (V) | Duty cycle at minimum input (%) |
|---|---|
| 9 | 73.5 |
| 18 | 58.1 |
| 27 | 48.1 |
| 36 | 41 |
| 45 | 35.7 |
| 54 | 31.6 |
| 72 | 25.8 |
How to read the result
Choose a switch rated well above the calculated stress, because the leakage-inductance spike adds to it; a clamp or snubber is needed. Peak currents set the transformer's saturation limit. A higher turns ratio lowers diode stress and raises D but increases switch stress.
Common mistakes
- Forgetting the leakage spike when choosing the MOSFET voltage rating.
- Designing for nominal input and missing the worst case at minimum and maximum input.
- Using the secondary-side average current as the diode peak current.
Frequently asked questions
When does a flyback enter DCM?
When the magnetizing current falls to zero during the off-time, typically at light load or with low Lm.
Why is the switch stress higher than the input?
During the off-time the switch sees the input plus the reflected output voltage.
Is CCM or DCM better?
CCM gives lower peak currents; DCM eases loop control and diode recovery. The choice depends on power and priorities.
Sources: D. Perreault, MIT OpenCourseWare 6.622 Power Electronics (Spring 2023), Lecture 13 "Isolated DC/DC"