FLY BACK CONVERTER DESIGN

Photo of author

By Jackson Taylor

Home » Electronics Topics » Power Electronics » FLY BACK CONVERTER DESIGN

As an Amazon Associate we earn from qualifying purchases.

A flyback converter is one of the most common isolated DC-DC topologies. It is used in phone chargers, small adapters, standby supplies and auxiliary rails in larger equipment. It needs few parts, supports several outputs and gives galvanic isolation without a separate output inductor. This guide walks through the design steps in the order you would normally do them.

How a flyback converter works

A flyback converter is derived from the buck-boost converter. The inductor is replaced by a coupled inductor, usually called the flyback transformer. It really works as an inductor with two windings, because it stores energy rather than passing it straight through.

  1. Switch on: the MOSFET conducts and current ramps up in the primary winding. Energy is stored in the core. The output diode is reverse biased, so the output capacitor supplies the load.
  2. Switch off: the primary current stops, the winding voltages reverse and the secondary diode conducts. The stored energy is delivered to the output capacitor and the load.

If you are comparing topologies, the boost converter design article covers a related non-isolated stage, and a SEPIC converter is another option when you need a step-up or step-down output without isolation.

Hardware Hack

Stop Buying New Batteries for Your Tech

Electronics are expensive, but their power sources don't have to be. Discover the simple engineering trick to recondition dead batteries and bring your gadgets back to 100% capacity.

Watch the Free Video

Before you start: collect the requirements

Write down these values first, since every later calculation depends on them:

  • Input voltage range (minimum and maximum), and whether it is rectified AC or DC
  • Output voltage and maximum output current, or total output power
  • Switching frequency target
  • Expected efficiency (a starting estimate is fine, then refine it)
  • Isolation and safety requirements
  • Allowed output ripple

Step 1: Choose the operating mode

Flyback converters run in one of two modes, depending on whether the secondary current reaches zero before the next switching cycle.

Discontinuous conduction mode (DCM)

The transformer fully releases its energy each cycle. The result is simpler control, lower diode reverse-recovery losses and a smaller transformer inductance. The price is higher peak currents, which raises RMS current and ripple.

See also
DESIGN AC POWER CONTROL USING TRIAC AND DIAC

Continuous conduction mode (CCM)

Some energy remains in the core when the switch turns on again. Peak currents are lower, which suits higher power levels, but the transformer needs a larger inductance. CCM also has a right-half-plane zero, which makes the control loop harder to compensate.

For a first design, DCM is usually the easier choice. The calculations below assume DCM.

Step 2: Set the turns ratio and duty cycle

When the switch turns off, the output voltage plus the diode drop is reflected back to the primary through the turns ratio:

Vreflected = (Vout + Vdiode) × Np / Ns

The MOSFET must withstand the maximum input voltage plus this reflected voltage, plus the voltage spike caused by leakage inductance. A higher turns ratio lowers the current in the secondary but raises the voltage stress on the switch, so it is a trade-off. Choose a ratio that keeps the maximum duty cycle comfortably below 0.5 in most designs. Leave margin on the MOSFET voltage rating rather than running close to the limit.

Step 3: Size the primary inductance

First estimate the input power from the output power and your efficiency assumption:

Pin = Pout / efficiency

Sustainable Tech

Keep Toxic E-Waste Out of Landfills

Don't throw away your failing laptop, phone, or car batteries. Learn how to recondition them at home in just a few hours. It's better for the planet—and your wallet.

Learn How It Works

Then, in DCM at minimum input voltage and maximum duty cycle, the primary inductance limit is:

Lp = (Vin(min) × Dmax)2 / (2 × Pin × fsw)

The primary peak current follows from the same energy balance:

Ipk = 2 × Pin / (Vin(min) × Dmax)

Use a value at or below the calculated inductance to stay in DCM. Make sure the transformer core can carry the peak current without saturating, because saturation causes the switch current to spike and often destroys the MOSFET.

Step 4: Design the transformer

The transformer is the hardest part of a flyback design. Because it stores energy, it usually needs an air gap in the core. Key points:

  • Choose a core size that suits the power level and frequency, then check the maximum flux density against the core material limits in the datasheet.
  • Calculate the primary turns so the peak flux stays safely below saturation.
  • Set the secondary turns from the turns ratio.
  • Interleave primary and secondary layers to reduce leakage inductance.
  • Check winding fit and copper losses. Thin wire may be needed at high frequency to limit skin effect.
  • Follow creepage and clearance rules and use proper insulation if the converter works from mains voltage.
See also
Z - SOURCE INVERTER - DESIGN

Leakage inductance does not transfer energy to the output, and it causes the voltage spike at turn-off. Keeping it low improves both efficiency and reliability.

Step 5: Select the switch, diode and capacitors

MOSFET

Pick a drain-source rating well above the maximum input voltage plus reflected voltage plus the leakage spike. Check the RMS current and choose a low enough on-resistance to keep conduction losses acceptable. Gate charge matters too, because it affects switching loss and drive requirements.

Output diode

The diode must handle the reverse voltage seen when the switch is on, which is roughly the output voltage plus the input voltage divided by the turns ratio. Schottky diodes work for lower output voltages. Higher output voltages generally need fast-recovery or ultrafast diodes. Synchronous rectification can improve efficiency at low output voltages and high currents.

Output capacitor

Flyback output current is pulsed, so the capacitor sees high ripple current. Choose low-ESR capacitors rated for that ripple current, and consider adding a small LC post-filter if the output needs to be very quiet.

Step 6: Add a clamp or snubber

Leakage inductance energy has nowhere to go when the MOSFET turns off, so it produces a voltage spike across the switch. A clamp circuit, such as an RCD clamp or a TVS-based clamp, limits that spike and protects the MOSFET. If you want more detail on dissipating this energy, see this guide to basic snubber design.

Choose the clamp voltage above the reflected voltage so the clamp does not conduct during normal operation and waste power. Then check the clamp resistor power rating, because the clamp dissipates all of the leakage energy.

Step 7: Choose the controller and feedback

Most designs use a dedicated flyback controller or a controller with an integrated switch. Isolated designs commonly use an optocoupler with a shunt regulator for feedback on the secondary side. Primary-side regulation is another option that senses the output through an auxiliary winding and removes the optocoupler, at the cost of some regulation accuracy.

See also
A Cascaded Multilevel Inverter (9 level )Based on Switched-Capacitor -SIMULATION MATLAB

Also plan for:

The Ultimate Money-Saving DIY Skill

From power tools and solar banks to your car, batteries are the most expensive part of your gear. Master the step-by-step DIY system to bring dead batteries back to life.

Get the Step-by-Step Guide
  • Current sensing for cycle-by-cycle limiting
  • Soft start to limit inrush and stress at power-up
  • Overvoltage, overcurrent and short-circuit protection
  • A start-up supply, usually from a resistor or an auxiliary winding

Step 8: PCB layout and testing

Layout has a large effect on noise and reliability in a switching supply. Keep the high-current loop (input capacitor, transformer primary, MOSFET and sense resistor) as small as possible. Place the clamp close to the transformer and switch, and keep the small-signal feedback ground away from the power loop. Use sufficiently wide traces for the current involved, and a trace resistance check can help; see the notes on trace resistance for PCB design.

When testing the first prototype:

  1. Power it from a current-limited supply, and with a light load at first.
  2. Check the drain voltage waveform for the spike and ringing.
  3. Confirm the transformer is not saturating by watching the primary current waveform.
  4. Raise the load step by step and check regulation, temperature and ripple.
  5. Test at minimum and maximum input voltage, and under start-up and short-circuit conditions.

Work with isolation-grade test equipment when the primary side is connected to mains. For more projects and design references, see the power electronics hardware guides.

Reference photos

Flyback converter hardware photo showing the board and transformer, first view
Flyback converter hardware photo showing the board and components, second view
Flyback converter hardware photo showing the circuit board, third view

FAQ

What power range suits a flyback converter?

Flyback converters are most often used at low to medium power, where their low part count and low cost are an advantage. At higher power levels, the peak currents and transformer size make other topologies, such as forward or half-bridge converters, more practical.

Why does a flyback transformer need an air gap?

The transformer stores energy in the core during the on-time. A gap lets the core hold that energy without saturating. Without a gap, the core would saturate at a very low current.

Should I design for DCM or CCM?

DCM is simpler to control and avoids the right-half-plane zero, so it suits many first designs and lower power levels. CCM gives lower peak currents and is often chosen for higher power, but it needs a larger inductance and more careful loop compensation.

See also
Bidirectional DC-DC converter fed drive for electric vehicle system with speed variation

Why is my MOSFET failing in a flyback converter?

Common causes are a voltage spike from leakage inductance that exceeds the rating, transformer saturation causing a current surge, or too little margin in the voltage rating. Check the drain waveform, the clamp circuit and the peak primary current first.

Revive Your Dead Electronics

Got a drawer full of dead gadgets or a failing car battery? Instead of paying a premium for replacements, use this simple trick to easily recondition them right from home.

See How It Works