Author Topic: Open Source 24V3A Flyback Power Supply Based on UC3842, with Transformer Paramet  (Read 171 times)

0 Members and 2 Guests are viewing this topic.

Offline zerunsTopic starter

  • Newbie
  • Posts: 1
  • Country: cn
    • Zeruns's Blog
Open-sourcing a wide input voltage, 24V 3A output flyback switching power supply. This 72-watt design achieves a peak efficiency of 87.4% and is based on the UC3842 controller chip with synchronous rectification (UCC24612-1DB). It includes the complete calculation process for circuit and transformer parameters, schematics, PCB, PSIM simulation models, transformer manufacturing specifications, and more.

Foreword

📍This is my first time designing a flyback power supply. I welcome any feedback or suggestions for improvement from all the experts out there.


Project Video Demo & Design Process Video: https://www.bilibili.com/video/BV1ES4GzQE19/

OSHWHub Open-Source Link: https://oshwhub.com/zeruns/24v3a-Flyback-Power-Supply-uc384x

Electronics/MCU Technical Discussion QQ Group: 2169025065

Project Materials Download Link are at the end of the article!

Warning: Building switching power supplies can be dangerous. I do not guarantee the correctness of any circuits, parameters, or formulas in this design. You are responsible for assuming all possible risks if you replicate or reference this project.

The estimated average cost for a small batch (20 units) is around 25 RMB (excluding PCB and transformer, based on component prices from LCSC Mall). Including the PCB and transformer, the total cost should not exceed 50 RMB.



Design Parameters

ParameterValue
Rated Input Voltage \$V_{acnom}\$220VAC
Minimum Input Voltage \$V_{acmin}\$85VAC
Maximum Input Voltage \$V_{acmax}\$265VAC
Line Frequency \$f_L\$50Hz
Output Voltage \$V_{out}\$24V
Output Current \$I_{out}\$3A
Operating Frequency \$f_s\$150kHz
Target Efficiency \$η\$85%

PCB Dimensions: 100x55mm

PCB Specifications: Double-layer board, top layer for through-hole components, bottom layer for SMD components.



Physical Photos

The picture below shows the second version.


The picture below shows the first version, which had some issues and was prone to blowing MOSFETs. These issues were fixed in the second version shown above.


High-frequency transformer:





Operational Testing and Performance Measurement

Initial Power-On Test

For the initial power-on test, connect a light bulb in series to prevent blowing a whole set of components in case of a short circuit. The test confirmed normal operation, with an output voltage of 24.1V (the picture below shows the test with a 0.9A load).

Quote
The purpose of the series light bulb is: to utilize its current-limiting protection effect. Under normal conditions, the bulb's resistance is low, causing a small voltage drop, so it is dimly lit or off, not affecting the power supply test. If a short circuit occurs inside the power supply, the loop current will surge. The bulb, with its fixed resistance, will drop most of the voltage, limiting the excessive current and preventing the power supply components from burning out due to high current, thus providing protection.

Switching Power Supply Maintenance and Protection Socket: https://s.click.taobao.com/OiMyz3q

You can also test it with a DC input. I tested it with a 60V DC input, and it started up normally and output 24V. However, you need to change the 200kΩ start-up resistor (R24+R16) to a 100kΩ one (short one of them). The original resistance was too high, preventing startup at low voltages.




Conversion Efficiency Test

Test equipment used:



Measured Data:

Input Voltage (V)Input Current (A)Input Apparent Power (W)Input Active Power (W)Output Voltage (V)Output Current (A)Output Power (W)Efficiency (%)Power Factor
219.850.0296.382.1024.130.00------0.33
219.830.25155.1828.6924.101.0024.1083.990.52
219.590.43896.1855.7824.072.0048.1486.300.58
219.650.637139.9282.5524.053.0072.1587.400.59
111.550.0364.021.8124.130.00------0.45
111.130.40645.1228.8824.101.0024.1083.460.64
110.890.75383.5056.7824.062.0048.1284.750.68
110.581.097121.3184.9124.003.0072.0084.790.70

The highest measured efficiency is 87.4%. The lowest no-load power consumption is 1.81W, which is slightly high.

The data above was measured using diode rectification, not synchronous rectification. This is because the on-resistance of the synchronous rectification MOSFET I chose was a bit high, which resulted in slightly lower efficiency. You can replace it with a better MOSFET for testing. The voltage rating should be 200V or higher (a MOSFET with a 150V rating can be considered if you solder a 20Ω resistor and a 2.2nF capacitor for R9 and C8 respectively on the synchronous rectifier side).

Output Voltage Ripple Test

The oscilloscope used is a Rigol DHO914S: https://blog.zeruns.com/archives/764.html

During testing, the oscilloscope probe was clipped to an output wire approximately 15cm long. A ground spring was not used, nor was the probe connected directly across the output capacitor. Therefore, the measured output voltage ripple may be on the higher side.

No-load ripple, with a peak-to-peak value of around 730mV. The ripple frequency is 138.96kHz, close to the switching frequency.


Ripple with a 3A load, with a peak-to-peak value of around 562.08mV.


MOSFET Waveforms

The gate-source (GS) and drain-source (DS) voltage waveforms of the primary-side switching MOSFET with an AC input of 220V and a 1A load at 24V output. The yellow waveform is the voltage between the gate and source, and the blue waveform is the voltage between the drain and source.

It can be seen from the figure that the maximum drain voltage spike when the MOSFET is turned off is approximately 440V (a light bulb is connected in series, and I forgot to switch it to the direct connection mode; therefore, the input voltage of the power supply is probably just over 100V, resulting in a relatively low measured voltage).


A magnified view of the gate voltage waveform.


Output Rectifier Diode Waveforms

The voltage waveform across the output rectifier diode with a 60V DC input and 24V no-load output is shown below. The voltage spike reaches a maximum of about 56V. (After soldering a 20Ω resistor and a 2.2nF capacitor to R9 and C8 respectively across the diode, the voltage spike drops to 42V).


The voltage waveform across the output rectifier diode with a 60V DC input and 24V 1A output is shown below. The voltage spike reaches a maximum of about 190V. (After soldering a 20Ω resistor and a 2.2nF capacitor to R9 and C8 respectively across the diode, the voltage spike drops to 81V).



No-Load Startup Output Voltage Waveform

The output voltage waveform with a 60V DC input and 24V no-load output. The time for the voltage to rise from 0V to 24V is 7 milliseconds.


Thermal Performance

Thermal image of the power supply's underside at no load. The hottest spot is on the startup resistor, with a temperature of around 60°C (ambient temperature around 25°C). The primary-side MOSFET is at around 48°C.


Thermal image of the power supply's underside with a 3A load. The hottest spot is on the primary-side MOSFET or the resistor in the RCD snubber circuit, with a temperature exceeding 88°C (ambient temperature around 26°C). The secondary rectifier diode is likely also above 60°C.

The temperature at full load is a bit high. For long-term full-load operation, the primary-side switching transistor will need a heatsink or be potted to transfer heat to the enclosure!




Component Purchase Links


It is recommended to purchase components from LCSC: https://activity.szlcsc.com/invite/D03E5B9CEAAE70A4.html

Clicking the "Order Now" button in the BOM section of the open-source link on LCSC will allow you to import all the required components into your shopping cart with one click.



Schematic





PCB

Top Layer


Bottom Layer




Download Links

The links below contain: JLCEDA project files, schematic PDF, Gerber files for PCB manufacturing, SMPS Design Tool SMPSKit, Flyback Transformer Calculation Sheet (Mathcad), silkscreen diagram, transformer specification sheet, datasheets for various chips, PSIM simulation models, Bode plot Matlab code, and other reference materials and documents. (Some materials were collected from the internet)


If you find this useful, you can support me by donating through the 123 Cloud Drive link above. If you're reading this on WeChat (Account: zeruns-gzh), you can also tap the "Like Author" button at the bottom of the article. Thank you.



Recommended Open Source Projects

 

Online Whales

  • Super Contributor
  • ***
  • Posts: 2475
  • Country: au
    • Halestrom
Thankyou for sharing.  I appreciate all the photos and test results in particular, this makes it far more interesting and valuable than many other designs I have seen online.

I am not an expert, so I expect to be corrected ;D

(1) What is "the open source link"?  Do you mean oshwhub.com, a site run by Jia Lucheng (JLC/LCSC)?  I am not familiar with this site and it appears to mostly be in chinese, so I had difficulty navigating a few parts of it to find part numbers in your design.

(2) Does oshwhub/JLC/LCSC/easyeda provide you with any money, rewards or discounts for publishing or sharing articles on their website? 

(3) Primary side snubber resistor voltage rating.  R2, R3, R25 1206 68Kohm resistors.  I have not seen 1206 rated above 200VDC and their pad clearance is small.

Would these resistors sometimes see the full DC bus voltage (340VDC)?  I would expect to see at least two 1206 in series for this application.

(4) Mains input fuse F1 appears to be a PTC.  There does not appear to be any backup traditional wire fuse.

Is this safe/allowed? Do these PTC wear out and stay closed, or are they just as reliable as wire fuses?

Part appears to be https://www.lcsc.com/product-detail/C369140.html

(5) Capacitor CY3 seems unusual to me.  It is between the secondary ground and mains ground.  It does not technically need to be Y rated as far as I can tell.

(6) Sidenote: CY4 sometimes needs to be two Y1 capacitors in series to meet standards in some markets for some product types.  Eg from AS/NZS 3100:

Quote
3.17.5 Capacitors Bridging Reinforced Insulation:
For overvoltage Category II accessories, accessible conductive parts separated by double or
reinforced insulation from live parts may be bridged by a single Y1 capacitor with qualification
approval in accordance with IEC 60384-14 (Clause 3.4.2 - Qualification Approval).

For overvoltage Category III equipment and overvoltage Category II equipment other than
accessories, if double or reinforced insulation separating accessible conductive parts from live
parts is bridged by capacitors, at least two Y1 capacitors shall be used.

Not sure if there are also similar european standards or not, but I suspect so (most Australian standards for electronics copy them).

Recently had some power supplies in products rejected by a testing lab because of this.  I also noticed that some metal-cage power supplies have started to put two Y1 in series.

(7) Secondary diode voltage spikes.  Wow they're pretty big.  What do you think is causing them?  Leakage inductance on the secondary windings?

Your snubber didn't help as much as I would have hoped.  Perhaps a smaller resistor (eg 10R) to increase damping and a smaller capacitor (eg 1n) to raise the minimum absorbed frequency might work better?  Not sure.

(8 ) Synchronous rectifier lowering efficiency  ;D  Did you remove the secondary diodes whilst testing this, or were they still in place?

(9) UC3842 gate drive diodes.  A lot of the suggested circuits in the TI datasheets show diodes on the OUTPUT (gate drive) pin to ground & VCC.  It's note entirely clear how often these are required:

Quote
Often the noise which causes this problem is
caused by the OUTPUT being pulled below ground at turnoff by external parasitics. This is particularly true when
driving MOSFETs. A Schottky diode clamp from GROUND to OUTPUT prevents such output noise from feeding
to the oscillator.

Quote
Schottky diodes can be necessary on
the OUTPUT pin to prevent overshoot and undershoot due to high impedance to the supply rail and to ground,

Many newer IC designs based on the UC3842 seem to fix this problem (probably through internal diodes but I am not sure).

(9) Duty cycle and stability.  I notice you have no slope compensation circuitry. 

Your gate waveforms looks like they are far below 50% duty cycle, so maybe you are operating in a safe region where subharmonic oscillation is not a problem.  I am not sure what output load you were using for those gate drive scope shots (was it full load or a smaller load?)

(10) Output capacitor positions.  I would put the ceramics closer to the diode and the electrolytic capacitor further away.  You have done them the other way around (ceramic capacitors far away).

(11)  You are using two error amplifiers in your control loop: one in the TL431, and one in the UC3842.  If you ever have issues with this (stability or response speed) then consider disabling the error amplifier in the UC3842.  Some UC3842 datasheets show examples of this (FB pin grounded, signal injected via COMP pin instead).

(12) What does the output waveform look like if you do a step response?  Eg output is unloaded, then suddenly an 8ohm load is attached (~3A)?  I expect it will overshoot, but it would be interesting to see how much.
« Last Edit: November 30, 2025, 09:23:00 pm by Whales »
 
The following users thanked this post: zeruns


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf