Maker.io main logo

85V-260VAC to 5VDC-2.5A Flyback Switching Power Supply

2023-11-07 | By Hesam Moshiri

License: Attribution-NonCommercial-ShareAlike Power Supplies

The key part of any electronic device is the power supply. Any instability or malfunction of the power supply part causes the device to stop working or demonstrate weird behavior. In this article/video, I introduced an AC-to-DC flyback Switching power supply that converts 85V-260VAC to 5VDC-2.5A, which can be used in various applications. The 5V selection for the output makes it friendly for linear regulators that convert 5VDC to lower voltages.

The maximum power delivery of this power supply is around 12W, which means it can handle 2.5A at 5V output. The controller chip is DK1203, which does not need any external supply, a startup resistor, or an auxiliary winding on the transformer. The ferrite core of the transformer is EE20. A potentiometer allows you to adjust the output voltage and set it exactly at 5.0V.

To design the schematic and PCB, I used Altium Designer 23 and shared the PCB project with my friends for feedback and updates using Altium-365.

I tested the board for voltage drop, current delivery, and output noise. I used Siglent SDL1020X-E DC Load and Siglent SDS2102X Plus oscilloscope to perform all tests. I am confident that building this circuit enhances your knowledge regarding switching power supply design, except for using it for real applications.

 

Specifications

Input Voltage: 85-265VAC

Output Voltage: 5VDC

Maximum Output Current: 2.5A

Maximum Output Current (continuous): 2A

Output Noise (No load): 1.5mV(rms), 4mV(p-p)

Output Noise (Max Load, 2A): 3mV(rms), 25mV(p-p)

Maximum Voltage Drop (2A load): 50mV

Transformer Type: EE20

 

 

Circuit Analysis

Figure 1 shows the schematic diagram of the switching power supply. As it is clear, the controller chip is DK1203 [1].

flyback switching power supply

Figure 1, Schematic diagram of the flyback switching power supply.

P1 is the input terminal for the AC input. The input voltage could be in the range of 85V-AC to 260V-AC, and it can deliver up to 12W of output power for this input range. F1 is a small 500mA fuse [2] and R1 is the 7D741 varistor [3] to absorb high voltage transients. C2 is a 100nF X2 rated capacitor [4] to reduce the high-frequency noise and T1 is a common mode choke [5]. BR1 is the Vishay MB6M bridge rectifier [6] and C3 is a 22uF-400V capacitor [7] to reduce the voltage ripple. 

R2, C4, and D2 belong to the snubber circuit to dampen the switching spikes. D2 is the RS1M SMA [8] diode. The switching controller chip is DK1203. OP1 is the PC817 [9] optocoupler that provides an interface for the IC1 to sense the output voltage and stabilize it. REF is the TL431 shunt regulator [10] to stabilize the output voltage and transfer any fluctuation to the optocoupler.

D1 is the SS54 SMC [11] Schottky diode to rectify the output voltage. C5, C5, C7, and L1 are used to reduce the output noise. R4 is a 470R 1206 resistor [12] that provides a preliminary load to stabilize the output voltage. D3 is a 3mm red LED to indicate the proper operation of the power supply and output voltage. C8 and C9 reduce the high-frequency noises. VT is a test point (a single male pin header) to use a multimeter to read the output voltage, so you can use the R11 potentiometer to fix it on 5.0V.

USB is the USB4135 USB Type-C connector to connect a USB Type-C cable to power your external devices.

PCB Layout

Figure 2 shows the PCB layout of the switching power supply. It’s a two-layer PCB board and I used a mixture of SMD and through-hole components.

schematic pcb switching power supply ac dc

Figure 2, PCB layout of the flyback AC DC switching power supply

Transformer

Please follow these steps to build the transformer. First, prepare these materials:

Core: Ferrite, EE-20-10-6 (B66311G0000X187)

Primary Winding: 2.88mH (124 turns of 0.2mm wire)

Gap: around 0.25mm (mathematically)

Secondary Winding: 6 turns of 2*0.7mm wires (two 0.7mm wires in parallel)

Bobbin: 5+5, E20 Horizontal (B66206B1110T001)

Usually, EE cores come with no gap (a gap between the two middle legs of the core). Therefore, you have to grind the middle EE legs equally to build a gap, but making such a gap accurately and winding the transformer by hand and without any error is difficult. 

The easy solution is to use an LCR meter! First, wind the primary and assemble the transformer (without any gap). Then measure the inductance of the primary. Naturally, the inductance would be higher than 2.88mH. Therefore, you have to grind the middle leg of the EE ferrite and build a gap, then assemble the transformer again and measure the inductance of the primary. As a result, simply increase the gap and continuously measure the primary inductance till it gets as close as possible to 2.88mH. A little tolerance from 2.88mH is fine and does not make any difference. Figure 3 shows the EE core and the gap. This is the simplest flyback transformer with one primary and one secondary winding, so you shouldn’t have any problem in this process.

Figure 4 shows the bobbin and the ferrite core. Figure 4 shows the EF20 ferrite core and bobbin, and Figure 5 shows the way that you should wind the transformer.

EE core transformer gap

Figure 3, The 20-10-6 EE core and the non-magnetic gap of the middle legs

switching transformer power supply

Figure 4, EF20 Ferrite core and 5+5 horizontal bobbin

ferrite transformer winding

Figure 5, Transformer winding

Assembly and Test

Figure 6 shows the assembled PCB board. If you have problems with soldering the components or you don’t have time to purchase and solder them yourself, you can order the board assembled.

smps ac dc 220v 110v 5v power supply

Figure 6, Assembled PCB board of the 85V-260VAC to 5V flyback switching power supply

I conducted three tests for this power supply: output voltage drop, current delivery, and output noise measurement.

Figure 7 and Figure 8 show the behavior of the power supply, first without any load and second under the maximum continuous 2A load. As the DC load confirms, the voltage drop is just around 50mV.

dc load noise power supply

Figure 7, The output voltage of the power supply (no load)

dc load power supply noise

Figure 8, The output voltage of the power supply (2A load)

Similarly, I tested the output noise of the power supply first without any load (Figure 9) and second under the maximum continuous 2A load (Figure 10). If you face extra heating on the output diode and inductor, mount a small heatsink on each using thermal glue. Figure 11 shows such a heatsink. VT is the testing point to connect a multimeter and adjust the output voltage to 5V. Figure 12 shows such a connection.

output noise power supply oscilloscope

Figure 9, Output noise of the power supply (no load)

oscilloscope power supply output noise

Figure 10, Output noise of the power supply (2A load)

heatsink power supply

Figure 11, Suggested Heatsink for D1 and L1 7*7*6mm (if necessary)

power supply adjustment

Figure 12, Output voltage adjustment 

TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum