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.
Design a 65W flyback power supply from AC mains with isolation, active clamp, synchronous rectification, and < 1% load regulation.
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.
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.
10 components required for this project.
| # | Component | Purpose | Qty |
|---|---|---|---|
| 1 | UCC28180 PFC controller + UCC28740 LLC controller | PFC and flyback control ICs | x1 |
| 2 | Custom EE/ETD ferrite core transformer | Isolated power conversion | x1 |
| 3 | SiC MOSFET (C3M0075120K, 1200V, 20A) | Primary switch | x1 |
| 4 | Schottky diode (80V, 10A) or sync rect MOSFET | Secondary rectification | x1 |
| 5 | Electrolytic capacitors (400V, 100µF) | PFC output / flyback input bulk | x2 |
| 6 | EMI filter (common mode choke + X/Y caps) | Conducted EMI suppression | x1 |
| 7 | Optocoupler + TL431 (feedback) | Isolated voltage feedback | x1 |
| 8 | Litz wire (0.1mm × 100 strands, AWG7 equivalent) | Transformer winding (reduce AC losses) | x1 |
| 9 | Oscilloscope (200MHz) + current probe | Waveform analysis | x1 |
| 10 | Dimmer (variac 0–250V, 5A) | Safe AC voltage variation testing | x1 |
Follow these 4 steps carefully.
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.
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.
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.
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.
Core code for flyback_design.py:
# 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)
Test Flyback SMPS Design by verifying each subsystem individually before full integration.
Verify power voltages, check ground connections, use serial monitor for debug.
An interactive simulator will be available here — simulate circuits and run code in-browser without hardware.