Advertisement
Advanced Time: 4–5 weeks Electronics Engineering

Flyback SMPS Design

Design a 65W flyback power supply from AC mains with isolation, active clamp, synchronous rectification, and < 1% load regulation.

SMPSFlybackPower ElectronicsPWM ControllerTransformerLLC
DifficultyAdvanced
Duration4–5 weeks
Components10 items
Steps4 steps

Introduction

Design a 65W flyback power supply from AC mains with isolation, active clamp, synchronous rectification, and < 1% load regulation. This comprehensive guide covers everything from design through implementation, testing, and deployment.

Theory & Background

Flyback converter: energy stored in transformer (acting as inductor) during MOSFET ON time, transferred to secondary during OFF time. Not a true transformer — gap in ferrite core allows energy storage. When primary MOSFET turns ON: energy stored in transformer magnetizing inductance. When MOSFET turns OFF: energy released to secondary through diode. Voltage conversion: V_out = V_in × (1-D)/D × Ns/Np (DCM). Isolation: primary and secondary are galvanically isolated. Power range: 5W–200W efficient range. Applications: phone charger, laptop PSU, SMPS adapters.

Advertisement

Components & Requirements

10 components required for this project.

#ComponentPurposeQty
1UCC28180 PFC controller + UCC28740 LLC controllerPFC and flyback control ICsx1
2Custom EE/ETD ferrite core transformerIsolated power conversionx1
3SiC MOSFET (C3M0075120K, 1200V, 20A)Primary switchx1
4Schottky diode (80V, 10A) or sync rect MOSFETSecondary rectificationx1
5Electrolytic capacitors (400V, 100µF)PFC output / flyback input bulkx2
6EMI filter (common mode choke + X/Y caps)Conducted EMI suppressionx1
7Optocoupler + TL431 (feedback)Isolated voltage feedbackx1
8Litz wire (0.1mm × 100 strands, AWG7 equivalent)Transformer winding (reduce AC losses)x1
9Oscilloscope (200MHz) + current probeWaveform analysisx1
10Dimmer (variac 0–250V, 5A)Safe AC voltage variation testingx1

Step-by-Step Implementation

Follow these 4 steps carefully.

1
Flyback Converter Theory

Flyback converter: energy stored in transformer (acting as inductor) during MOSFET ON time, transferred to secondary during OFF time. Not a true transformer — gap in ferrite core allows energy storage. When primary MOSFET turns ON: energy stored in transformer magnetizing inductance. When MOSFET turns OFF: energy released to secondary through diode. Voltage conversion: V_out = V_in × (1-D)/D × Ns/Np (DCM). Isolation: primary and secondary are galvanically isolated. Power range: 5W–200W efficient range. Applications: phone charger, laptop PSU, SMPS adapters.

2
Transformer Design for Flyback

Core selection: ETD34 ferrite (N87 material, low loss at 100 kHz). Primary inductance: Lp = V_in_min² × D_max² / (2 × Fsw × Pout / η) → determines stored energy. Primary turns: Np = V_in × D_max / (ΔB × Ae × Fsw) → prevent core saturation. Secondary turns: Ns = Np × V_out / (V_in × D_max). Secondary winding: sandwiched between primary layers reduces leakage inductance (critical for snubber sizing). Litz wire: at 100 kHz, skin depth = 210 µm in copper → use stranded wire (0.1mm strands) to minimize AC resistance.

3
EMI Compliance Requirements

Switching power supplies generate conducted and radiated EMI (electromagnetic interference). Regulatory: CISPR 32 (consumer), FCC Part 15 (US), CE marking (Europe). Conducted EMI test: connect to LISN (Line Impedance Stabilization Network), measure noise on mains. Limits: CISPR class B (residential): 56 dBµV from 150 kHz to 30 MHz. EMI reduction: common-mode choke on mains input (rejects common-mode noise), X-capacitors across mains (differential mode), Y-capacitors mains-to-chassis (common mode). Spread spectrum: modulate switching frequency ±10% reduces peak EMI at fundamental by 10dB.

4
Feedback and Control Loop

Output voltage feedback: TL431 precision shunt regulator compares output voltage with internal 2.5V reference. Error current drives optocoupler LED. Optocoupler transmits error signal across isolation barrier to primary-side control IC. Primary IC adjusts duty cycle to maintain constant output voltage. Control loop stability: measure open-loop gain and phase using injection transformer + analyzer. Target: phase margin > 45°, gain margin > 10dB at unity gain crossover. Compensator design: Type 2 or Type 3 op-amp compensator in TL431 feedback network.

Code & Implementation

Core code for flyback_design.py:

flyback_design.py Python
# Flyback Transformer Design Calculator  def flyback_design(V_in_min, V_in_max, V_out, I_out, Fsw, eta=0.85):     """     Design a flyback converter transformer.     V_in: Input voltage range (V)     V_out: Output voltage (V)     I_out: Output current (A)     Fsw: Switching frequency (Hz)     eta: Efficiency estimate     """     P_out = V_out * I_out     P_in  = P_out / eta      # Maximum duty cycle at minimum input (worst case)     D_max = 0.45  # Limit to 0.45 for DCM margin      # Primary inductance for DCM at full load     Lp = V_in_min**2 * D_max**2 / (2 * Fsw * P_in)      # Turns ratio     V_f_diode = 0.5  # Secondary diode forward drop (Schottky)     V_clamp   = 80   # Reflected clamp voltage     n = (V_in_min * D_max) / ((V_out + V_f_diode) * (1 - D_max))      # Core selection (ETD34): Ae = 97mm², Ve = 7700mm³     Ae = 97e-6   # m²     dB = 0.2     # Tesla swing (keep below 0.3T for N87)     Np = (V_in_min * D_max) / (dB * Ae * Fsw)     Ns = round(Np / n)     Np = round(Np)      # Peak primary current     Ipk = 2 * P_in / (V_in_min * D_max)      print(f"=== Flyback Design: {P_out}W, {V_out}V/{I_out}A ===")     print(f"Primary inductance: {Lp*1e6:.1f} µH")     print(f"Turns ratio (n):    {n:.2f}")     print(f"Primary turns:      {Np}")     print(f"Secondary turns:    {Ns}")     print(f"Peak primary I:     {Ipk:.1f} A")     print(f"Max duty cycle:     {D_max*100:.0f}%")     print(f"MOSFET voltage stress: {V_in_max + V_out*n:.0f} V (use 600V+ FET)")  flyback_design(V_in_min=85, V_in_max=265, V_out=20, I_out=3.25, Fsw=100e3)

Testing & Troubleshooting

Test Flyback SMPS Design by verifying each subsystem individually before full integration.

!
Troubleshooting Tips

Verify power voltages, check ground connections, use serial monitor for debug.

Real-World Applications

*Laptop and phone charger design
*Industrial power supply
*LED driver power supply
*Telecom rectifier power supply
*Medical isolated power supply
*Electric vehicle on-board charger
*UPS power supply module
*Renewable energy micro-inverter

Extensions & Next Steps

  • Add active power factor correction (PFC) pre-stage
  • Implement LLC resonant converter for higher efficiency
  • Design a synchronous rectifier secondary for lower losses
  • Add digital control with DSP for adaptive operation
  • Build an automatic test bench for power supply characterization

Interactive Playground

Coming Soon

An interactive simulator will be available here — simulate circuits and run code in-browser without hardware.

Frequently Asked Questions

What are the safety considerations for mains-connected electronics projects?
CRITICAL SAFETY RULES: (1) Always use an isolation transformer (variac + isolation transformer) between mains and your circuit during development — prevents electrocution when touching circuit ground. (2) Use earthed workbench and anti-static mat. (3) Never work alone on mains circuits. (4) Add safety interlock: primary-side capacitors hold lethal charge (400V, 100µF = 8 joules) long after power removed — add discharge resistor (100kΩ, 5W) or bleed resistor permanently, verify voltage before touching. (5) Enclosure: all mains-connected parts must be covered, inaccessible without tools. (6) Fusing: always fuse on both L and N.
Advertisement