check in
Completed

UC3842 flyback switching power supply design

PROUC3842 flyback switching power supply design

tag

84
0
0
0
Mode:Full

License

CC BY-NC-ND 3.0

Creation time:2024-12-19 01:54:39Update time:2024-12-26 03:11:36

Description

Addendum: There is an advanced version of this project: Switching Power Supply Experiment - JLC Open Source Hardware Platform (oshwhub.com).

 

UC3842 switching power supply

Design Parameters:

    1. VIN = 220V frequency = 50Hz Vacmin = 85V Vacmax = 265V
    2. Vout = 12V Iout = 5A Pout = 60W
    3. Operating frequency fs = 100KHz
    4. Efficiency = 80% Pin = 75W

 

Design process:

  • The design of flyback power supply is actually the transformer, voltage loop, current loop, loop compensation, these three things are calculated, basically there is no problem.

This design process does not include EMI, the instrument required by that thing is too high-class, there is no money to buy it, and you can know how to design it by picking up articles on the Internet, and it doesn't require too much calculation.

1.Single-phase bridge rectifier filter circuit

      1. The alternating current is multiplied by the root number 2 after rectification, so we get Vbus = 311V, Vbusmax = 374V, and Vbusmin = 120V. With another 1.5 times redundancy, the withstand voltage of the rectifier bridge can be obtained at 562V.
      2. Since the Pin is 75W, the maximum current Iacmax can be calculated by dividing by Vacmin to get 0.5A, leaving 1.5 times the redundancy, and the rectifier bridge withstand current is 0.75A.
      3. According to the above data, directly the whole fierce, TELESKY bridge stack GBJ3510 rectifier bridge stack 35A 1000V flat bridge single-phase bridge rectifier-tmall.com Tmall
      4. The filter capacitance is calculated by the formula below.
      5. q0y2DaoPX7ZoZn4FvJ4ifwlAlqBi1o43yInFl2Yz.png
      6. Where tc is the filtering time constant, it is an empirical value, this can be found in Baidu, I take 0.008 seconds here.
      7. Therefore, choose 180uf/450V electrolytic capacitors, original imported black diamond electrolytic capacitors 400/450V/47/56/68/82/100/150/180/220UF-Taobao (taobao.com).

2.Transformer

      1. The design of the transformer is to find the Ap value (select the core), the turns ratio (voltage ratio), and the inductance (flyback feature)
      2. First, the maximum duty cycle is calculated, and the minimum input DC voltage of 110V is taken for design. Assuming that the induced voltage Vor (reflected voltage) of the primary winding of the flyback transformer is 100V, according to the flyback working principle, when the input voltage is the lowest, the duty cycle is the largest, and the maximum duty cycle Dmax is calculated at this time.
      3. TlsSMVwwtiJjPGQOqYRb8LZkeAMgPNP64eoyaHnO.pngVds is the on-voltage of the MOS tube, assuming 4V.
      4. Next, the input average current Iavg at full load is calculated:
      5. MraRizlrAvIEtBk7IgBeVd5xz77V8uv4tNG1YwR1.png
      6. In the case of a wide input voltage range, the flyback power supply is usually set at the input low voltage, and the ripple coefficient Krp of the ripple current Ir and the peak current Ip of the primary winding of the primary winding is 0.8, and the peak current Ip of the flyback primary winding can be calculated according to the ripple coefficient and the input average current:
      7. iLYu0zjYgggwTjA31HlmcyqLHeTMwQMZehNb5pWp.png
      8. The pulsating current Ir is then obtained:
      9. TltbbjHcwOE3laUq1KtrBhAdTa3t2JQqZ35aysca.png
      10. At this point, it can be calculated that the transformer primary effective current Iprms is:
      11. Pwo384ttqkz7j4lqwfNJ6CRfXEjwWPVnBz0ESljX.png
      12. Through the calculation formula of the excitation inductance of the flyback transformer, the Lp of the primary side excitation inductance of the transformer is obtained:
      13. eeZdpKd2mNxBbxpckUiD5zwXhM6xM6fUQbgRuROe.png
      14. According to the previous assumption that the on-voltage drop Vds of the primary MOS transistor is 4V, and the on-voltage drop Vf of the secondary diode is 0.7V, the ratio of turns of the primary and secondary sides of the transformer can be calculated from the law of conservation of magnetic flux of the primary and secondary sides:
      15. AjEKSRWQdmQAPkndR19K728jRDpRenYGALRzvgvn.png
      16. Next, the magnetic core of the transformer is calculated, the window filling coefficient Ko of the flyback transformer is 0.4, the current density coefficient Kj is 3.95, and the magnetic flux Bw of the transformer is 0.2T, then the minimum Ap value of the required core is calculated according to the empirical formula:
      17. xRqp2rBjBjQSg6sNmFb8CPGXHSOoxuQeBRC7EAJu.png
      18. According to this Ap value, leave a double redundancy, and select the core of PQ2625 according to the core specification manual. At this time, the core manual was queried, and the window Aw=84.5 and the core cross-sectional area Ae=118 of the skeleton were obtained. In order to prevent the electromagnetic saturation of the transformer, the average maximum magnetic flux density Bmax is selected as 0.2mT, and the primary turns of the transformer Np are calculated as:
      19. Nay9TgBAlDuqpbdhkNqLyMl92t6hkt49bTxhmA4X.png
      20. Through Nps, the secondary side parameters are as follows:
      21. D8psVNfluTy85Ur6hGM39WeeEyFeYMogs2xN6GwZ.png
      22. The flyback transformer is additionally provided with an output winding, the output voltage of this winding is used by the control chip, the additional winding output voltage Vout1 of the proposed design is 15V, and according to the relationship between the output voltage and the winding transformation ratio, the turns Ns1 of the auxiliary power supply winding can be calculated as:
      23. re51EEVeibPWG2F5m05Sjv5KOOQuwgnIJjsdstU6.png
      24. Next, calculate the data of the thread used, because the wire will have a skin effect at high frequencies, so use a lot of wires to wind together, according to the empirical formula, the skin depth Dm is obtained:
      25. Y0qSRJMPKfpKNTAOy1ysbXCTqpupGAH6eGHm7fSR.pngThe diameter of the transformer winding wire should be selected to be less than the value, which can effectively reduce the skin effect.
      26. In order to meet the requirements of heat generation in the transformer, the current density is generally set to 4~6A/mm^2. Therefore, the winding diameter Dp=0.3mm and the number of strands Pp=3 used in the primary winding of the transformer can be designed. Through these parameters, together with the RMS value of the transformer primary winding current, Iprms can calculate the current density jp, which is just the empirical value that can meet the design heat of natural cooling. Therefore, the number of strands and diameter of the winding wire can be used.
      27. aXdDJkLdIIqth9iiFHG7jV42hEl1X2EAbhCTIdd3.png
      28. According to the transformer's primary and secondary side transformation ratios and the peak value of the primary side current, the peak Isp of the transformer's secondary winding current in the flyback circuit is calculated as:
      29. yo9utAGPXkcUJlPcX1TrbqIu3J52Cok7N8XiAGKz.png
      30. According to the current peak value and the duty cycle of the secondary side of the flyback transformer, the RMS value Isrms of the transformer's secondary winding current is calculated by using the RMS calculation formula:
      31. Nnmlvc6KB8GNCOZ860KlCUR3cplUGxrlt9ijuPUf.png
      32. It can be obtained that the winding diameter Ds=0.4mm, and the number of strandsPs=11 strands can be obtained. According to the above data, the current density js of the secondary winding of the transformer can also be calculated, which is also just enough to meet the empirical value of natural cooling design heat.
      33. u7iyOaytJVCDiqWL2Zl2PA0c66gYXopED2alA9gu.png
      34. After selecting the primary and secondary windings of the transformer, it is necessary to calculate whether the transformer can be wound in the windings of the selected line, and determine by calculating the proportion of the sum of the cross-sectional areas of all windings and the skeleton window of the transformer. The coefficient Kw for calculating the cross-sectional area of all windings to the transformer window is:
      35. uTc3Sov0P1k0a5lMpR2rIO35KtEVRWyGMpt78nmi.png

         

      36. Usually when the transformer winding is designed, because the wire of the winding has a certain insulation layer, at the same time, the winding process will also increase the insulating tape, retaining wall, etc., in order to ensure that the winding can be wound, and has good economy, the window coefficient is generally specified between 0.1~0.3 is more appropriate, so the window coefficient calculated above proves that the winding selection is relatively reasonable.
      37. So far, the design of the transformer has been completed, including the selection of the transformer core, the design of the primary and secondary windings of the transformer, and the final accounting of whether the designed winding can be wound.

3.MOS

      1. During primary MOS shutdown, the platform voltage at the MOS source-drain is the sum of the input voltage and the voltage converted to the primary winding by the secondary, and the platform voltage reaches a maximum when the input voltage is highest:
      2. KEAbn6GBW725XYEKqWF2ACKbEQ568I5l4o0FBiMy.pngLeave 1.5 times the redundancy, you can get that the withstand voltage of the MOS tube must be greater than Vmos*1.5=705V.
      3. The current resistance value of the MOS tube is based on Isrms, so 9R1K2C is selected IPA90R1K2C3 New imported spot TO-220 900V 5.1A real picture can be taken directly-Taobao (taobao.com).

4.Diode

      1. During MOS turn-on, the secondary rectifier diode is subjected to a reverse voltage with diode cut-off, and the platform voltage on it is the sum of the output voltage and the voltage converted from the primary winding to the secondary winding, and when the input voltage is highest, the platform voltage reaches the maximum, and the voltage subjected to the diode cut-off is calculated as:
      2. qUC3fwlalny704tdepgXyhDBbcHf148yVmtcxf1H.png
      3. Due to the leakage inductance of the secondary winding of the transformer, the junction capacitance of the diode will produce LC oscillation, resulting in a certain peak voltage when the diode is turned off, so leaving a 1.5 times redundancy, the withstand voltage capacity is Vdio*1.5 = 92V, with Iprms as a current withstand worthy reference, so choose a new spot SBR20U100CT 20A100V Schottky diode and rectifier TO-220-Taobao (taobao.com).
      4. At the same time, calculate the voltage subjected to by the auxiliary winding palace diode as:
      5. bMYxVVAKoK0Z6Pb4ZO8soJPNkCdpzbZ1UaU8WSkt.png
      6. Leave a 1.3 times redundancy to obtain a withstand voltage of Vdio1*1.3=100V. Because the auxiliary winding is for the chip, the current consumption is particularly small, so you can choose 1N4148W T4 4148WS 4148WT SOD-123 323 523 SMD switch diode-tmall.com Tmall

5.Output capacitance

      1. Assuming that the output ripple voltage ΔVout of the flyback circuit to be designed is 100mV, the output load resistance Rout of the flyback is Vout/Iout=2.4R when the output is fully loaded. Then calculate the capacitance value:
      2. 3qAjJEsohCmbbBe2nXmm2DSBbDJblMGS5583Ye6I.png
      3. Due to the influence of ESR internal resistance, it is replaced with 4 470uf capacitors in parallel.

6.RCD circuit

      1. First, assuming that the primary leakage inductance Lk of the transformer is within 1% of the excitation inductance Lp, Lk = 2.5uH is calculated. Assuming that the charging time of the capacitor is very short and negligible, since the discharge of the capacitor is linear, and assuming that the maximum voltage Vmosmax does not exceed 800V when the switch is working, and leaving a redundancy, the voltage Vclamp on the clamping capacitor can be obtained:
      2. GV1s2lp0CjOhPujyWwd5roDDQ11oWaHNuLqGB060.png
      3. Then calculate the clamping resistance Rc and clamping capacitance Cc according to the RCD circuit absorption formula:
      4. vXKfwZ8J2bph0GCZLSSii9QOEPoM70P1lHrHMDYB.png
      5. By the way, the clamping power Pclamp is calculated as:
      6. JpWBvvlQ5HZfs70n4PFgQpYs3eBdWyM5UofylKWd.png

Based on these calculations, a 2W resistor of 100KR and a capacitor of 330pf were selected, and the clamping diode was selected with a withstand voltage of 1000V FR107 1A/1000V in-line DO-41 Fast Recovery Rectifier Diode (50pcs)-tmall.com Tmall

7.Loop compensation calculations

        1. The following diagram is a block diagram of the peak current control transfer function of the UC3842, and if you want to know how to design the peripheral circuit, optocoupler feedback circuit, you must understand the relationship between these functions. I won't spend any more time talking about the specific principles here.
        2. QvFADQ3eOMkMKNWyD2RM0jur8L7WCJEMAbxONaJg.png
        3. Transfer function of FM flyback peak current control:
        4. wR1eei3sm95msnUpvS6sJXbYvhSn1L5Jfk86CVmY.png
        5. Gvd(s) is the transfer function from a specific duty cycle d(t) to the output of the flyback circuit.
        6. FQHjvOV5CCGIR4m5T9ezfcbBHiHKX7RduTTZlUdq.png
        7. where Nt=1/Nps, Cout is the output capacitance, Resr is the esr resistance of the output capacitance, Lp is the transformer excitation inductance, D is the working turn-on duty cycle, D' is the shutdown duty cycle, and Rout is the output load.
        8. The output voltage is generated by the transfer function Got(s) of the sampling feedback circuit constructed by optocoupler isolation and TL431 to generate a feedback voltage Vot(t) that has a specific relationship with the output voltage, and the signal is sent to the designed voltage loop transfer function Gvp(s), and the current loop reference current signal is generated after the voltage loop calculation, and the Rsense primary current sampling resistor converts the current into a voltage signal, and the current loop reference current Vfb(t) signal generates a control duty cycle d(t) and a duty cycle d(t) A specific voltage Vot(t) is output after acting on the flyback transfer function Gvd(s).
        9. The transfer function from Vfb(t) to Vo(t) can be deduced from Gvd(s) as:
        10. hzlEPXhbPczvyOZ7ra9HD7dqcVrf8n6qOlpuJcYa.png
        11. Where Ak = 1/3, some of the remaining values are given below:
        12. zSVw3pQYWOUOB999gMPr68fLVbzSDW2lutoZfHZK.png
        13. For the peak current transfer function, wz is the zero point generated by the capacitor Cout, wrz is the zero point of the right half-plane under peak current control, and wp is the output filter pole.
        14. Next, according to the UC3842 internal peak current protection point is 1V, the maximum output current we need is 5A, then Rsense is equal to 1/5=0.2R.
        15. By performing the calculations in MATLAB, we can obtain the BODE diagram of the power supply before the compensation:
        16. J48mpZTShDckY7ytNQgYBpX0J4cJTlA2gC5ZLO3b.png
        17. As can be seen from the image, there are two traversal frequencies, one is 500 Hz and the other is 1.4 MHz, but it is an unstable system with an upturned gain curve in the high frequency band.

8.Compensator

      1. The first is voltage loop compensation.
      2. DamokHn8UwJXwIMStPdKLKtEJFVhWhgI8bUnIerQ.png
      3. A compensating pole is required at the frequency of the right hemiplane zero or ESR zero, whichever is lowest. The fesrz is calculated by wz (the zero point of the capacitor's esr), and the capacitance is about 10nf by setting the resistance to 1kr.
      4. xjYXXP6DuTVOK1zQSYODo3yS7zDjBA0koZcWPUwf.png
      5. ANW89tb8bsbMPoYSu3SqX5PvjxJiWJnyYhgSHr6a.png2ypecHhcvt3VkJENBh7nKnYdEuys0mfXZcbJN22E.png
      6. Then according to these parameters, the transfer function of the voltage loop from input to output can be obtained as follows:
      7. MG4zY2Cz9o8WsmIxRscUiBN9VlvbzRvIJMaAeTza.png
      8. The optocoupler and TL431 transfer function are then calculated.
      9. tK2ZFshBGlUeo95ZdRnMMLS2RMgfb0p1GI1dweV5.png
      10. It can be obtained by assuming that the primary current of the optocoupler is I1(s) and the output voltage of TL431 is Vop(s).ijFhzGmaQsaHfoKgkqfZKCvpecpdaZVzPOjXZ3aZ.png
      11. Rled is the resistance to be determined.
      12. According to the working principle of the op amp, the relationship between Vop(s) and the output voltage Vout(s) is as follows:
      13. Qk1Om9RSmrmdgcxUqKgZol7U7u0nNl229MTIq8vu.png
      14. Bringing in the above equation, simplifying yields I1(s):
      15. KwdRzK67Yk05e3G6TwiDZohRKkLGDS1Ne7XWRykx.png
      16. Then, according to the CTR parameter of the selected optocoupler, that is, the current transformation ratio of the primary and secondary sides, after being found in the manual, the voltage Got(s) on the optocoupler secondary pulldown resistor Rplludown can be calculated as:
      17. 6JmbtdGnlicVq2mKDk5gqSAV8RSF70oNj0iF7lTY.png
      18. Bringing I1(s) into this equation and simplifying it, we get the transfer function from Vout(s) to the voltage Got(s) as follows:
      19. 9LGuJlpQ9at3b5GTCo2jAvqX0ox2ixPqY6SZXkrC.png
      20. In this formula, the unknown parameters are Rplludown, Rled, R1, C1.
      21. CFcUtVambE8QR9IJ2XZBa4pvw0CDxXsAIB8x5zr7.png
      22. In this figure, the parameters to be set include R11, R18, RP1, R9, R14, and C3.
      23. When the output voltage is 12 V and the reference voltage Vref of the R mount of TL431 is 2.5 V, assume that R11 = 20 KR. From the voltage division of the resistor, it can be calculated that R18 = 5.253KR. So we choose 5.1KR for R18 and 500R for RP1. R14 sets the resistance for the minimum working current of TL431, here sets the minimum value of TL431 working current 1mA, and the voltage of the primary diode of the optocoupler is 1.2V, for the convenience of value selection, the working current of TL431 is calculated as 1.2mA, then R1 = 1.2/1.2m = 1KR. In order to obtain a good phase margin, the pull-down resistance R17 = 10KR and the feedback capacitance C13 = 100nf of the optocoupler transistor are assumed.
      24. Substituting the traversal frequency fc into Gvv(s), the gain of the open-loop transfer function before compensation is calculated as:
      25. StDSMl4GHr5jDroo6sD62a2kRbSgTWGoqtnBg9dO.png
      26. For the flyback circuit of analog control, the closed-loop bandwidth (ride-through frequency) is generally configured at 1/10 of the switching frequency, and the flyback switching frequency is 100kHz, that is, the ride-through frequency fc of the closed-loop transfer function can be configured to be 10kHz.
      27. In order to ensure that the gain of the closed-loop transfer function at the traversal frequency fc is 1 and the corresponding dB value is zero, then the following conditions are satisfied:
      28. 9snTFzte12qGn7UxtTB6roOqivIKjJSBqhHeRI26.png
      29. Bring in gainvv and you can get.
      30. 22ocEuE5HqBYR4DQEI342gDhDGzUxwmbxQ3c8wvr.png
      31. Synapsing the equation of Got(s) (remember to bring in the known data) and Gvd(s) to calculate R9 = 287R.
      32. According to the previous analysis, the overall closed-loop transfer function of the flyback is G(s).
      33. SqZpL5eSaRplZgpPBGxBIw4pXmAZ1BAwUMYES3GU.png
      34. The BODE plot was calculated with MATLAB as follows:
      35. EO6B24pm70T2FVEnMxLDUwP8EeSKJaIO4HoF2eJM.png
      36. As shown in the figure above, the traversal frequency in the compensated closed-loop transfer function is 9.55 kHz, which is very close to the designed 10 kHz. The overall phase margin is 76.5 degrees, the gain margin is 14.2dB, and the low-frequency 100Hz gain is 40dB. It should be noted that the design here uses an iterative method, that is, if the phase margin of the flyback closed-loop transfer function obtained above is not greater than 45 degrees, and the gain margin is less than 7dB, it means that the above parameter assumptions are not suitable, and the initial parameters related to the voltage loop, such as R14, C13, etc., need to be adjusted until the phase margin and gain margin of the generated closed-loop transfer function meet the requirements.
      37. In general, the criteria for the closed-loop stability of the switching power supply are as follows:
      38. NXQL54k5gYEhdBFqJgjvmI4hJcz9t8qavpUyjYFV.png
    1. The parameters are basically calculated, and the results can be verified with PSIM simulation.

 

Physical testing

    1. When testing ac-dc with an oscilloscope, it should be noted that because the GND of the oscilloscope is connected to one of the two wires of the mains, it cannot be directly connected to the GND pin of the UC3842, which will lead to tripping, and the solution is to add an isolation transformer.
    2. Efficiency test (voltage regulation can also be seen)
      1. 0hQwmsoYmXL0Bm9E3bZvoFhfdsGAAGJySSGfpAom.jpegaQhgxI18lZL7O8UhSbOZsTBw7N1YTz55zDBIZTwg.jpegwmDBq1YfTGLEWxdQR7GnTsTPYuSKVB00SyAgC6yo.jpegBhmgvDasofrGH5IyhEmGEGpoxRMEwCqLZ6PFtjWS.jpegAUHufkb2ozjuyI2AYE8xzpNfmnkHT247zRVQ1a87.jpeg
      2. The output voltage is not very stable, and my MOS transistor does not have a heat sink, so it may cause excessive temperature drift. However, the efficiency can be seen that the calculation is about 80%, and the physical object is also around 80%, which is still relatively stable.
    3. Ripple test
    4. Initiate the process
    5. Output dynamics
    6. Drive-source-drain voltage
    7. (These tests will be added later, and we will talk about it when I have time)

 

Some places where the design is unreasonable (some quotes and comments)

    1. The safety distance on the PCB is not enough, and it is okay to test and play in the case of an isolation transformer, but it is not in line with the specifications to connect to the mains, why is it so compact? It's because the board is a little bigger, and Lichuang has to charge a proofing fee.
    2. The ACN and the fixing screw holes are relatively close, so you can design them as far away as possible.
    3. Most of the flyback power supply withstand voltage on industrial products is 650V, and the withstand voltage of MOS is generally used to use 90% of the MOS specification calibration, taking 650V withstand voltage MOS as an example, 6500.9 = 585,585% 3E470.017, 650V withstand voltage MOS is also easier to buy, and the internal resistance is also acceptable, and the internal resistance of 900V withstand voltage MOS is scary, and you can also use an isolation probe to test how much the actual peak voltage of MOS DS actually has, and whether there is a breakdown risk.
    4. The high-voltage part should not be poured copper, and the discharge resistor of the safety X capacitor should be designed (2 resistors of about 1M, 1206 package, connected in series and then connected in parallel to both ends of the safety X capacitor)
    5. The starting resistance does not need to be very large, the 0603 is actually fine, because the starting resistance is not too high.
    6. You can comment on the unreasonable places and problematic places in my design, and I will add them to this column for your reference.

 

Supplement

    1. I've already put the winding of the transformer in another project, so if you're interested, you can take a look.

Design Drawing

Download File
The preview image was not generated, please save it again in the editor.

Attachments

OrderFile nameDownload times
1
Transformer core reference table.xlsx
1216
2
uc3842 full Chinese version (ti official full Chinese Oh).pdf
1446
3
UC3842 240W Flyback calculation (not verified).pdf
3942
4
matlab flyback loop compensation calculation.txt
786
5
matlab flyback loop compensation before calculation.txt
680
6
PSIM.zip
882
7
The transformer specifications .docx
1270
Add to Album
0
0
Share
Report

Comment

All Comments(1)
Sort by time|Sort by popularity
Followers0|Likes0
Related projects
Empty

Bottom Navigation