Flyback transformer calculator
A flyback stores energy in its transformer's gap while the switch is on and delivers it through the secondary when the switch is off, so the turns ratio sets the duty cycle, the reflected voltage on the switch and the reverse voltage on the rectifier all at once. TI's SNVA866 lays out the continuous-conduction design in order — turns from the maximum duty cycle at minimum input, primary inductance from a 30–70 % ripple ratio at maximum input, then the ripple and peak currents — and the calculator follows it, adding the reflected voltage and the drain and diode stresses with the clamp margin you allow.
Minimum input voltage. The maximum duty cycle and the peak current occur here.
Maximum input voltage. The primary ripple ratio and the drain voltage stress occur here.
Regulated output voltage.
Maximum load current.
Auxiliary (bias) winding voltage; 0 for none. SNVA866: N_AUX = N_S·V_AUX/V_LOAD.
Auxiliary winding current, mA.
Switching frequency, kHz.
Target maximum duty cycle at minimum input, %. SNVA866 keeps it below 50 % to avoid slope compensation and push the right-half-plane zero up; it chose 40 %.
Primary ripple ratio ΔI/I at maximum input, %. SNVA866: "a maximum ripple ratio between 30 % and 70 % results in a good balance" of core and copper loss; it used 60 %.
Secondary turns per primary turn actually chosen (0 = the calculated value). SNVA866 rounded 0.417 to 0.5, i.e. 2:1.
Primary (magnetising) inductance chosen, µH (0 = calculated). SNVA866 rounded 20.6 µH to 21 µH.
How far the RCD clamp lets the drain rise above V_in + V_OR during the leakage spike, V. SLUP254: the clamp "dissipates the leakage energy and some magnetizing energy"; a higher clamp is less loss and more drain stress. 0 ignores it.
- Output power · N_S/N_P for 40 % at 18.0 V · used
- 20.2 W · 0.417 · 0.500 (2.00:1), aux 1.00
- Duty cycle at V_in min · at V_in max
- 35.7 % · 21.7 %
- Primary inductance for 60 % ripple at 36.0 V · used · ripple ratio with it
- 20.2 µH · 21.0 µH · 58 %
- At 18.0 V: primary ripple · peak · secondary peak
- 1.22 A · 3.75 A · 7.51 A
- Reflected voltage V_OR · drain at 36.0 V with clamp · rectifier reverse
- 10.0 V · 61.0 V · 23.0 V
The turns ratio trades the switch against the rectifier: V_OR = 10.0 V adds to the input on the drain (61.0 V at 36.0 V including the 15.0 V leakage spike the clamp allows), while the rectifier sees the output plus the input divided by the same ratio, 23.0 V. SLUP254: the clamp voltage "is maximum at full load and minimum input voltage" and is a "tradeoff between efficiency, peak drain voltage, output current limit and cross regulation".
The peak of 3.75 A sizes the current-sense resistor and the transformer's saturation current — SNVA866's example chose a 6 A part for a 3.75 A peak. The leakage inductance is not in these numbers: SLUP254 puts it at "a function of winding geometry, number of turns and separation between primary and secondary", reduced by interleaving, and "not lowered with a high permeability core".
How this is calculated
Standard: TI SNVA866; TI SLUP254
- SNVA866 eq 2–4: the duty cycle the turns impose, and the turns for a chosen maximum duty cycle at minimum input.
- SNVA866 eq 6: primary inductance for a ripple ratio I_LRR at maximum input; 30–70 % is the note's range.
- SNVA866 eq 7 and 8: the ripple and peak primary current at minimum input.
- The reflected voltage and the switch and rectifier stresses; the clamp margin is the leakage spike the RCD clamp allows (SLUP254).
Assumptions
- Continuous conduction at full load; SNVA866's procedure. Light-load DCM is not modelled.
- Lossless: the input power equals P_OUT, and the rectifier drop is not added to the output voltage.
- Turns are reported per primary turn; the transformer uses whole turns in the chosen ratio.
- Leakage inductance is represented only by the clamp margin entered; its loss and commutation effects are not computed.
- Auxiliary power is added to P_OUT and its turns follow the output turns.
What sets a flyback transformer
A flyback transformer is an inductor with two windings. SLUP254: "energy is stored in flyback transformer" while the switch is on, and when it turns off the "stored energy [is] transferred to output" — through the secondary, at a voltage set by the turns. Because the two windings never conduct at once, the turns ratio does what a buck's duty cycle does and more. SNVA866's design order is the calculator's. The duty cycle follows from the ratio and the input: D = (NP/NS· VLOAD) / (VSUPPLY + NP/NS · VLOAD), largest at the minimum input. So choosing the maximum duty cycle chooses the turns: "the maximum duty cycle occurs when the supply voltage is at the minimum value. By selecting the maximum duty cycle, the number of turns on the secondary winding is calculated", and the note keeps it under 50 % because that "reduces the need for slope compensation" and "the right-half plane zero of the modulator is pushed to high frequencies".
The primary inductance sets the ripple. "Three main parameters are considered when selecting the inductance value of primary winding: primary winding current ripple ratio, falling slope of the transformer current and the right half plane zero frequency", and the note's balance is "a maximum ripple ratio between 30 % and 70 %": more ripple means "the core losses increase and the copper losses decrease", less means a larger inductance and a lower right-half-plane zero. The ripple is largest at maximum input, so the inductance is set there (eq 6), and the peak current, which "occurs at the minimum supply voltage", is the pedestal POUT/(VSUPPLY_min·D) plus half the ripple (eq 7 and 8). That peak "is used to properly size the current sense resistor" and the transformer's saturation rating.
Two voltages come with the ratio. When the switch is off the output reflects onto the primary as VOR = (NP/NS)·VLOAD, which sits on top of the input at the drain — and above that the spike from leakage inductance, which the RCD clamp limits: SLUP254's "during commutation primary-to-secondary, the leakage energy is absorbed by the clamp circuit", "Vclamp is maximum at full load and minimum input voltage", and the level is a "tradeoff between efficiency, peak drain voltage, output current limit and cross regulation". The rectifier, during the on-time, sees the output plus the input divided by the ratio. A ratio that eases the switch loads the diode.
Worked example: SNVA866's 18–36 V to 5 V, 4 A at 250 kHz
The defaults are the note's: 18–36 V in, 5 V at 4 A plus a 10 V, 20 mA bias winding (20.2 W), 250 kHz, a 40 % target duty cycle, 60 % ripple, and the rounded values it chose — 0.5 turns per primary turn and 21 µH — with a 15 V clamp margin.
secondary turns V_LOAD (1 − D_max) / (V_min D_max) = 5 × 0.6 / (18 × 0.4) = 0.417 per turn (eq 3)
chosen 0.5 D_max = (2 × 5) / (18 + 2 × 5) = 35.7 % (eq 4)
auxiliary 0.5 × 10 V / 5 V = 1 turn (eq 5)
inductance 36² × 5² / (0.6 × 250 kHz × 20.2 W × (0.5 × 36 + 5)²) = 20.2 µH (eq 6; note: 20.6 µH)
chosen 21 µH ripple 18 V × 0.357 / (21 µH × 250 kHz) = 1.22 A (eq 7)
peak 20.2 W / (18 V × 0.357) + 1.22 / 2 = 3.75 A (eq 8)
reflected 2 × 5 V = 10 V; drain 36 + 10 + 15 = 61 V; diode 5 + 36 / 2 = 23 V
The note's transformer: "turns ratio 1:0.5:1 (2:1:2), primary winding inductance 21 µH, saturation current 6 A". The 6 A against a 3.75 A peak is the margin for the current limit and the leakage-shifted duty cycle SLUP254 warns of — "higher duty cycle and magnetizing current than expected" — and the 61 V drain is why a 100 V MOSFET is the usual choice on a 36 V input.
Where the flyback model stops being valid
- Continuous conduction only. The equations are SNVA866's CCM procedure. At light load, or with a small inductance, the secondary current reaches zero before the period ends — SLUP254's DCM, "first-order system, inherently stable, no RHPZ problem", "lower inductance value", "better no-load efficiency" — and the duty cycle is no longer set by the turns alone.
- Leakage is not in the sums. It sets the clamp voltage, the loss in the clamp, the commutation time and "loss of volt-seconds"; the clamp margin entered is a design choice, not a calculation. SLUP254: minimise "the separation between the primary and main secondary winding(s)", "interleave the primary and main secondary", and note that leakage "is not lowered with a high permeability core".
- Diode drops and efficiency are ignored. The duty cycle uses the output voltage alone; the rectifier's drop adds to it, and a real design's losses raise the input power above POUT.
- Fractional turns are a bookkeeping device. SNVA866's 0.5 turns per primary turn is 2:1; the calculator reports turns per primary turn, and the transformer has whole numbers of each.
- Cross-regulation is a separate problem. With several secondaries, "if the coupling is perfect, the turns ratio directly defines output voltages. In the real world, 'perfect' coupling is not possible"; SLUP254's second half is about that.
Common flyback mistakes
- Choosing the ratio for the switch alone. A low VOR spares the MOSFET and puts the input, divided by the ratio, on the rectifier instead.
- Sizing the transformer by the average current. It saturates at the peak — pedestal plus half the ripple, at minimum input — and SNVA866 leaves 60 % headroom above it.
- Ignoring the clamp's dissipation. The leakage energy goes into Rclamp every cycle, "and some magnetizing energy" with it; the resistor's wattage is a design line, not an afterthought.
- Running over 50 % duty without slope compensation. SNVA866: stable CCM operation above 50 % needs it.
- Expecting the datasheet inductance in the gapped part. The primary inductance is set by the gap; the ungapped AL is not the number.
Further reading
- The gate resistor calculator: the switch's edge and the drain's dv/dt.
- The RC snubber calculator: the ringing on the drain after the clamp diode recovers, which SLUP254 draws as the leakage resonating with the drain capacitance.
- The coil suppression calculator: the same inductor-and-clamp physics in a relay.