Flyback Converter Design Calculator

Size or check a flyback transformer in DCM or CCM. Calculate inductance, turns ratio, peak and RMS currents, device voltage stress, winding estimates and an RCD clamp.

#CCM #DCM #flyback #MOSFET #RCD snubber #SMPS #transformer

This flyback converter design calculator sizes the main power stage of a fixed-frequency, isolated, single-output supply. It is intended for engineers choosing a transformer and semiconductors, students learning discontinuous and continuous conduction, and anyone comparing an existing flyback transformer with a new voltage or load requirement.

Start with the minimum and maximum DC input voltages, output voltage, rated output current, switching frequency and estimated efficiency. For an offline supply, the minimum input is the bulk-capacitor voltage at its ripple trough. Entering the mains RMS voltage here gives the wrong design. Set the rectifier forward drop at a representative operating current.

In Size a transformer, select DCM or CCM. DCM uses your chosen maximum duty and an idle fraction to leave time after the secondary current reaches zero. CCM uses a ripple factor equal to half the peak-to-peak primary ripple divided by its mean on-state current. The calculator returns the required primary inductance and primary-to-secondary turns ratio. In Check an existing transformer, enter those two measured or specified quantities instead. Changing the waveform input voltage or operating load then reveals whether that transformer operates in CCM or DCM.

Read the full-load current sweeps before selecting components. Primary peak current, winding RMS current and rectifier reverse voltage serve different purposes. The primary calculations include the estimated efficiency allowance. Conservative secondary current envelopes retain the turns-reflected primary current; the displayed secondary waveform and capacitor ripple estimate instead normalize its pulse area to the actual output current. This explicitly stated loss allocation is a preliminary estimate, because one overall efficiency cannot describe where every converter loss occurs.

The magnetic section suggests integer turns and estimates peak flux, copper area, winding-window demand and total magnetic gap. Supply effective area, ungapped inductance factor and window area from your core datasheet. You can enter a selected primary turn count to investigate a practical winding. Integer secondary rounding changes the ratio: use the rounded ratio in existing-transformer mode before finalizing the design.

The RCD clamp calculation estimates resistance, minimum capacitance and resistor dissipation from primary leakage inductance. Its capacitor voltage is measured above the input positive rail. MOSFET and rectifier rating targets include your voltage multiplier; they are starting requirements for component selection.

Press ▶ beside switching cycle position to follow energy storage, secondary delivery and the DCM idle interval. The traces show ideal timing and omit parasitic ringing and clamp spikes.

This flyback transformer calculator does not design compensation, winding insulation, EMI filtering or a rectified mains front end. Core loss, AC copper loss, temperature rise, current-limit faults and transient stresses require further analysis and hardware verification. It does not certify isolation or electrical safety.

How it is calculated

The power-stage equations follow onsemi/Fairchild AN4137, printed pp. 3–8 (attached pp. 5–10), TI SSZTCW6 equations 1–10 and 23–27, and Vishay AN730. Core reluctance and copper-window equations use the same first-principles method as the catalog's power-inductor and transformer calculators; the bridge-transformer excitation law does not apply to a flyback.

With P=Po/ηP=P_o/\eta, n=Np/Nsn=N_p/N_s, VR=n(Vo+Vf)V_R=n(V_o+V_f) and frequency ff, the fixed-transformer operating solution is

D=min⁡(VRVin+VR,2PLpfVin).D=\min\left(\frac{V_R}{V_{in}+V_R},\frac{\sqrt{2PL_pf}}{V_{in}}\right).

At a reduced load, replace PP by the selected load fraction times PP. The secondary interval is D2=min⁡(1−D,VinD/VR)D_2=\min(1-D,V_{in}D/V_R). Then ΔI=VinD/(Lpf)\Delta I=V_{in}D/(L_pf), Ival=max⁡(0,P/(VinD)−ΔI/2)I_{val}=\max(0,P/(V_{in}D)-\Delta I/2) and Ipk=Ival+ΔII_{pk}=I_{val}+\Delta I. The primary RMS integral is

Ip,rms=D3(Ipk2+IpkIval+Ival2).I_{p,rms}=\sqrt{\frac{D}{3}(I_{pk}^2+I_{pk}I_{val}+I_{val}^2)}.

The mode transition is solved explicitly rather than imposing the sizing mode at every input voltage.

For sizing at minimum input and rated load, DCM uses D2=1−D−xD_2=1-D-x for idle fraction xx, and CCM uses D2=1−DD_2=1-D. Thus n=Vin,minD/[(Vo+Vf)D2]n=V_{in,min}D/[(V_o+V_f)D_2]. Set K=1K=1 in DCM or the chosen KRF=ΔI/(2Imean)K_{RF}=\Delta I/(2I_{mean}) in CCM:

Lp=(Vin,minD)22PfK.L_p=\frac{(V_{in,min}D)^2}{2PfK}.

Current estimates and loss allocation. Primary quantities are conservative sizing estimates using Po/ηP_o/\eta. A direct secondary referral gives conservative rating envelopes nIpknI_{pk} and nIp,rmsD2/DnI_{p,rms}\sqrt{D_2/D}. For the secondary waveform and capacitor RMS estimate, multiply referred pulses by ks=η(Vo+Vf)/Vok_s=\eta(V_o+V_f)/V_o to make their average equal the specified output current. This is an explicit engineering loss allocation, not an exact instantaneous coupled-inductor solution. The efficiency condition ensures ks≤1k_s\leq1. Winding copper sizing uses the conservative envelopes; capacitor RMS uses the load-normalized waveform.

Magnetics. Bpk=LpIpk/(NpAe)B_{pk}=L_pI_{pk}/(N_pA_e); automatic turns round LpIpk,max/(AeBallow)L_pI_{pk,max}/(A_eB_{allow}) upward. The total reluctance gap is

g=μ0Ae(Np2Lp−1AL0).g=\mu_0A_e\left(\frac{N_p^2}{L_p}-\frac{1}{A_{L0}}\right).

It includes finite core reluctance through ungapped AL0A_{L0} and excludes fringing. Copper area per turn is RMS current divided by chosen current density; sum both winding turn-areas and divide by usable fill to estimate the window.

RCD clamp. AN4137 equations 26–31 set Vc=kcVRV_c=k_cV_R at low line, Psn=fLlkIpk2Vc/[2(Vc−VR)]P_{sn}=fL_{lk}I_{pk}^2V_c/[2(V_c-V_R)], Rsn=Vc2/PsnR_{sn}=V_c^2/P_{sn} and Csn≥1/(Rsnfrc)C_{sn}\geq1/(R_{sn}fr_c). With that resistor fixed, solve the quadratic clamp voltage at each full-load line point and at the selected input/load point. Compare diode plus clamp dissipation with the corresponding full-load or load-scaled loss budget. Drain stress is the maximum of input plus clamp voltage, sampled at 41 line points. The voltage-rating multiplier is then applied. The ideal waveform omits the short clamp event.

Waveform rendering. Linear current ramps and ideal voltage plateaus use exact switching breakpoints. Repeated cycle positions retain the values on both sides of each jump, including the next-cycle turn-on. This preserves analytical peaks and pulse areas even for very short conduction intervals. Animation evaluates current and voltage analytically at a periodic cycle position.

Assumptions

  • Fixed switching frequency, steady regulated output, one non-synchronous secondary and linear magnetizing inductance. Input voltages are DC; the bridge, bulk capacitor and AC-line ripple are external.
  • Overall efficiency is a user estimate, constant across line and load. Primary sizing uses its loss allowance; secondary estimated waveforms use the explicit loss allocation described above. These do not resolve separate switch, winding and core losses. Rating envelopes are provided separately.
  • The core and window defaults are generic design assumptions, not a claimed commercial core. Obtain geometry, ungapped inductance factor and hot flux limits from the selected core/bobbin datasheet.
  • Primary normal-load peak flux sets automatic turns. Leakage is primary-referred and measured with secondary windings shorted. Gap is the total equivalent series gap, not necessarily one spacer thickness.
  • RCD equations assume a fast diode, small capacitor ripple, small leakage relative to magnetizing inductance and complete reset of leakage current. Resistance/capacitance are calculated values; choose standard components and rerun with measured transformer data.

Where it applies

For preliminary DCM/CCM power-stage sizing and fixed-transformer checks. Results describe rated-load line sweeps and one selected operating point. With fixed power, inductance, frequency and turns ratio, primary peak current decreases as input voltage rises through CCM, then remains constant in DCM. The line sweep displays the current changes and evaluates combined input-plus-clamp voltage stress.

Integer turns do not automatically feed back into the electrical model. Enter the displayed rounded Np/Ns in existing-transformer mode, with the intended measured primary inductance, to check the practical winding. Negative gap means the requested inductance exceeds the ungapped value at the chosen turns. A window-utilization warning requires a winding redesign.

Select allowed flux below the material's hot saturation limit and check core loss separately. Effective-area flux screening can miss a smaller local core section. Copper estimates omit skin/proximity loss, fringing loss, insulation build, creepage and temperature rise. Current-limit, startup, short-circuit and overload peaks are outside the model.

The RCD voltage is above the input rail; drain stress includes both. Estimated clamp stress excludes capacitor ripple, diode recovery, stray layout inductance and ringing. Voltage multipliers are user allowances, not device qualification. RCD resistor dissipation is a thermal load; choose adequate pulse capability and power derating. Verify the clamp waveform and temperature in hardware. Loss-budget warnings check both the full-load line sweep and the selected input/load point using the fixed clamp resistor. A warning means the assumed efficiency cannot cover even the calculated diode and clamp losses; reduce the efficiency estimate or revise the clamp.

Peak current-mode control in CCM above 50% duty requires suitable slope compensation. No loop compensation, right-half-plane-zero bandwidth design, quasi-resonant behavior, active clamp, synchronous rectification, multi-output cross-regulation or safety-isolation design is included.

References

  • onsemi / Fairchild Semiconductor, AN4137, Design Guidelines for Off-line Flyback Converters Using Fairchild Power Switch (FPS), 2003. Printed pp. 3–8 and 13–15; attached file has two cover pages. https://www.onsemi.com/download/application-notes/pdf/an-4137.pdf
  • John Betten, Texas Instruments, Designing a DCM Flyback Converter, SSZTCW6, February 2024. https://www.ti.com/document-viewer/lit/html/SSZTCW6
  • Vishay Siliconix, AN730 / document 71180, Designing a Wide Input Range DCM Flyback Converter, 8 July 2002, pp. 5–6. Published rounded transformer gives a slight CCM valley at 24 V; see reference-case explanation. https://www.vishay.com/docs/71180/71180.pdf

Inputs

InputSymbolUnitDefault
Transformer task
Sizing chooses inductance and ratio at minimum input and full load. Check mode keeps your inductance and ratio fixed.
taskSize a transformer
Sizing conduction mode
The operating mode may change with input voltage and load.
design_modeDCM — with idle time
Minimum DC input
Use the DC bus trough after rectification, not the AC RMS voltage.
V_minV24
Maximum DC input
Include the maximum DC bus voltage and expected line variation.
V_maxV48
Output voltage
Regulated single-output voltage.
V_outV12
Rated output current
Full-load current used for transformer sizing.
I_outA2
Estimated overall efficiency
Fraction, e.g. 0.85 = 85%. Used for primary-current sizing; must include diode and clamp losses.
eta0.85
Rectifier forward drop
Forward drop at the intended current and temperature.
V_fV0.5
Switching frequency
Fixed-frequency operation; not quasi-resonant or active-clamp control.
f_swkHz100
Full-load duty at minimum input
Fraction of one switching period.
D_target0.4
DCM idle fraction at minimum input
Zero selects the DCM/CCM boundary.
idle0.15
CCM ripple factor ΔI / (2 Imean)
Half of peak-to-peak ripple divided by mean on-state primary current; 1 is the conduction boundary.
K_rf0.4
Existing primary inductance
Primary magnetizing inductance, with other windings open.
L_enteruH100
Existing turns ratio Np / Ns
Primary turns divided by secondary turns.
n_enter2.5
DC input for waveforms
Choose a value within the DC input range. Sweeps always show full rated load.
V_evalV24
Operating load / rated load
Reduce this to explore the transition from CCM to DCM.
load_frac1
Switching cycle position
Press play to follow a switching cycle. Animation is deliberately slowed down; position 1 starts the next cycle.
phase0.6
Effective core area
Effective magnetic cross-section from the core datasheet.
A_emm^2100
Allowed peak flux density
Choose for material, frequency and temperature; below saturation. No core-loss model is included.
B_allowT0.22
Ungapped core inductance factor
Inductance per turn squared for the ungapped core; turn count is dimensionless.
A_L0nH3000
Copper current density
Preliminary DC copper area. Account separately for skin and proximity effects.
J_cuA/mm^24
Available winding window area
Use the winding-window convention in your core/bobbin datasheet.
A_wmm^2120
Usable copper fill fraction
Allow room for insulation, margins, bobbin and winding arrangement.
k_fill0.3
Primary leakage inductance
Measure at switching frequency on the primary with all secondary windings shorted.
L_leakuH0.25
Clamp capacitor voltage / reflected voltage
Defined above the input positive rail. onsemi AN4137 suggests about 2 to 2.5.
k_clamp2.2
Allowed clamp voltage ripple / DC voltage
Fraction, e.g. 0.05 = 5%. Small-ripple approximation.
r_clamp0.05
Voltage-rating multiplier
Apply to the estimated stress. Allow extra margin for tolerance, overshoot and transients.
v_margin1.25
Selected primary turns (0 = automatic)
Enter a chosen winding count to check flux and gap, or use zero to round the minimum count upward.
Np_enter0

Results

With the default inputs above, the calc gives:

ResultValue
Primary magnetizing inductance16.32 uH
Turns ratio Np / Ns1.707
Mode at selected operating pointDCM / boundary
Maximum rated-load primary peak5.882 A
Maximum rated-load primary RMS2.148 A
Conservative secondary peak envelope10.039 A
Conservative secondary RMS envelope3.888 A
Estimated output capacitor RMS2.802 A
Reflected output voltage21.33 V
Estimated clamped drain stress94.93 V
MOSFET voltage-rating target118.7 V
Rectifier voltage-rating target50.2 V
Suggested primary turns5
Suggested secondary turns3
Estimated total magnetic gap0.1506 mm
Estimated required winding window18.67 mm²
Calculated RCD resistance2.778 kohm
Minimum RCD capacitance71.998 nF
Estimated worst RCD dissipation0.793 W

Checked against sources

Each case below was calculated by this calc and agrees with the value from its source (within the tolerance where one is shown).

onsemi AN4137 · 47 W CCM primary design

Source: onsemi/Fairchild AN4137, printed p. 13 (attached p. 15), 46.9 W multi-output worked example reduced to its aggregate primary power. DC bus 92–375 V, 66 kHz, efficiency 0.70, Dmax 0.48, KRF 0.33. Only primary quantities are compared; no single-output secondary validation is claimed. Printed rounded inputs give 668.2 uH versus the spreadsheet's 671 uH, a 0.42% difference; the 5 uH tolerance covers this input rounding. https://www.onsemi.com/download/application-notes/pdf/an-4137.pdf

Inputs: Sizing conduction mode = CCM — specified ripple; Minimum DC input = 92 V; Maximum DC input = 375 V; DC input for waveforms = 92 V; Output voltage = 3.3 V; Rated output current = 14.212 A; Estimated overall efficiency = 0.7; Switching frequency = 66 kHz; Full-load duty at minimum input = 0.48; CCM ripple factor ΔI / (2 Imean) = 0.33; Primary leakage inductance = 4.5 uH; Clamp capacitor voltage / reflected voltage = 2.235; Effective core area = 109.4 mm²; Ungapped core inductance factor = 2,130 nH; Allowed peak flux density = 0.35 T; the others as above.

ResultSourceThis calc
Primary magnetizing inductance671 ± 5 uH668.2 uH
Primary peak at minimum input2.01 ± 0.015 A2.018 A
Primary RMS at minimum input1.07 ± 0.01 A1.07 A
Reflected output voltage85 ± 0.15 V84.923 V
Maximum drain plateau voltage460 V459.9 V

onsemi AN4137 · RCD clamp worked example

Source: onsemi/Fairchild AN4137 printed p. 15 (attached p. 17), section 11: Llk=4.5 uH, Vsn=190 V, ripple 5%, Rsn=33.1 kohm, Csn=9.2 nF, Psn=1.1 W, high-line peak 1.75 A, Vds=547 V. The dimensionless clamp setting uses the published 190/85 ratio; small differences reflect rounded printed bus/primary data. https://www.onsemi.com/download/application-notes/pdf/an-4137.pdf

Inputs: Sizing conduction mode = CCM — specified ripple; Minimum DC input = 92 V; Maximum DC input = 375 V; DC input for waveforms = 92 V; Output voltage = 3.3 V; Rated output current = 14.212 A; Estimated overall efficiency = 0.7; Switching frequency = 66 kHz; Full-load duty at minimum input = 0.48; CCM ripple factor ΔI / (2 Imean) = 0.33; Primary leakage inductance = 4.5 uH; Clamp capacitor voltage / reflected voltage = 2.235; Effective core area = 109.4 mm²; Ungapped core inductance factor = 2,130 nH; Allowed peak flux density = 0.35 T; the others as above.

ResultSourceThis calc
Calculated RCD resistance33.1 ± 0.5 kohm32.933 kohm
Minimum RCD capacitance9.2 ± 0.15 nF9.201 nF
RCD dissipation at minimum input1.1 ± 0.02 W1.094 W
Primary peak at maximum input1.75 ± 0.01 A1.753 A
Estimated clamped drain stress547 ± 1 V547.2 V

Vishay AN730 · primary current with published rounded transformer

Source: Vishay Siliconix AN730 (71180), pp. 5–6, equations 16, 19–20. Uses published Lp=162 uH, Np/Ns=95/40, 100 kHz and 24 V. Aggregate rated output is 3 W; the note's 75% efficiency plus 40% sizing allowance gives 5.6 W processed power, represented by effective sizing efficiency 3/5.6. This validates primary quantities only. The note calls the point DCM and rounds duty to 0.56; its rounded transformer actually gives a small 9.4 mA valley and CCM duty 0.55494. The calculator retains volt-second balance instead of forcing DCM. https://www.vishay.com/docs/71180/71180.pdf

Inputs: Transformer task = Check an existing transformer; Maximum DC input = 100 V; Rated output current = 0.25 A; Estimated overall efficiency = 0.5357; Rectifier forward drop = 0.6 V; Existing primary inductance = 162 uH; Existing turns ratio Np / Ns = 2.375; the others as above.

ResultSourceThis calc
Primary peak at operating point0.832 ± 0.003 A0.8315 A
Primary RMS at operating point0.36 ± 0.003 A0.3597 A
Duty at selected operating point0.56 ± 0.0060.5549

Related Resources

Responses

Your email address will not be published. Required fields are marked *

L ading...