A flyback "transformer" is really a coupled inductor: it stores energy while the switch is on and delivers it to the output while the switch is off. That changes how you design it. The core has to hold energy in an air gap, the turns ratio sets the voltage stress on both semiconductors, and the leakage inductance turns into clamp loss. This article walks through the design of a 24 W offline flyback in ten steps.
The specification
- Input: rectified universal mains. Take the bulk-capacitor valley at low line as V and the peak at high line as V.
- Output: V at A, so W.
- Switching frequency: kHz.
- Expected efficiency: .
- Switch: a 650 V MOSFET. Output rectifier forward drop: V.
Step 1: input power
Step 2: choose the reflected voltage
While the secondary conducts, the output voltage is reflected to the primary as . The MOSFET then sees
A higher gives a larger duty cycle and lower primary currents, but more voltage stress. Take V. With 375 V of input, that leaves 175 V of a 650 V rating for the leakage spike and margin.
Step 3: turns ratio
The rectifier diode then blocks V, plus ringing.
Step 4: maximum duty cycle
At the boundary between continuous and discontinuous conduction, volt-second balance on the magnetising inductance gives
Step 5: magnetising inductance
Decide on the conduction mode first. This design runs in discontinuous conduction (DCM) at full load and low line, which keeps the loop simple and removes the diode's reverse recovery. At the boundary, the average input current and the peak current are
Any below this keeps the converter in DCM. Choose µH. In DCM the energy per cycle sets the peak current:
The secondary conducts for of the period. Since , the core resets before the next cycle, and the converter is in DCM as intended.
Step 6: RMS currents
For a triangular current pulse of peak and duty , the RMS value is :
These secondary values are slightly pessimistic, because they assume the full input power reaches the secondary.
Step 7: core size by area product
The area product method sizes the core from the energy it must store and the copper it must hold:
Take T for a power ferrite at 100 kHz, a current density A/mm², and a window share for the primary (the secondary, insulation and margins take the rest):
Pick a core above this with room for safety insulation. For the rest of the example, suppose the chosen core has mm² and a window larger than 28 mm² (the minimum that satisfies ).
Step 8: turns
The primary turns keep the peak flux density below :
Choose and . The peak flux density is then T.
Step 9: air gap
The inductance factor is
Neglecting fringing and the core's own reluctance, the gap length is
Fringing makes the effective gap area larger than , so the measured inductance comes out higher. In practice you order the gapped core by its value and trim on the bench.
Step 10: wire, leakage and clamp
Wire. The primary needs mm², a round wire of about 0.39 mm. The skin depth of copper at 100 kHz is about mm mm, so a single 0.39 mm strand is acceptable. The secondary's 3.78 A RMS needs about 0.95 mm², which should be several parallel strands or litz wire. Interleaving the primary around the secondary reduces both leakage and proximity loss.
Leakage and clamp. The leakage inductance does not couple to the secondary, so its energy must go somewhere at turn-off. An RCD clamp absorbs it. With leakage at 1 % of ( µH) and a clamp voltage V:
That is 3.5 % of the output power, which is why low leakage matters. The MOSFET peak is V before ringing, inside the 650 V rating.
A simulated check. The design was simulated in Voltecx at low line: 100 V input, , µH, , 1 % leakage, a 0.5 V rectifier and an RCD clamp. It runs in DCM as intended, with idle time in every period. The primary current peaks at 1.10 A rather than 1.19 A: during the idle time the drain rings (the magnetising inductance with the switch's capacitance), and the next on-time starts from a small negative current. The secondary peaks at 11.2 A, and its current and the drain voltage ring with the leakage inductance. With the clamp resistor sized for 0.85 W at 150 V (26.5 kΩ), the clamp settles at 135 V and the resistor takes 0.69 W, so the clamp-loss formula errs on the safe side here.
What to verify next
- Run the design at high line, where the duty cycle is smallest and the switch voltage highest.
- Check that the peak flux density stays below saturation at the hottest core temperature, since ferrite saturation flux falls with temperature.
- Estimate core loss from the manufacturer's loss curves at the actual flux swing and frequency, and copper loss including AC resistance.
The method follows the energy-storage design of coupled inductors in R. W. Erickson and D. Maksimović, Fundamentals of Power Electronics, 3rd ed., in its chapters on inductor and transformer design. Core and material data come from the manufacturer's data sheet.
Try it in Voltecx
- The
flybackandflybackClosedLoopexamples show an open-loop and a closed-loop flyback with a coupled inductor. magnetics.designdesigns an inductor or transformer from its simulated current: core, material, gap, turns and wire. A coupled part is checked on its magnetising current.design.autowith"topology": "flyback"draws a flyback, designs its magnetics, closes the loop over the input and load corners and, for an isolated design, sizes a TL431 and optocoupler feedback network.
magnetics.design searches the OpenMagnetics MAS starter set, which is a subset of cores, materials and wires. Its temperature rise is a natural-convection estimate, and saturation is modelled as two straight slopes. Confirm the chosen core, gap and wire against the manufacturer's data sheet.