Repairing Switching Mode Power Supplies

May 23 2018, 09:00
There are a lot of books and articles out there about how to design a switching supply, but not many on fixing them. As switching power supplies become ubiquitous in electronic devices today, it becomes that much more important to understand how they work and just as importantly how they fail.
 

The entire point of the switcher is that it rectifies the AC power line to DC, then chops the DC with a variable-duty-cycle oscillator at very high frequency so that a tiny step down transformer can be used. Transformers at high frequencies don’t need large cores or many windings for a lot of power, so they can be made tiny and at little cost. The oscillator duty cycle can be adjusted with feedback so that the regulation can be done without losing any power in the process. Thus, you can get good regulation and good efficiency at the same time.

This article will focus on line-operated flyback supplies. Other topology converters exist and are popular when line isolation isn’t needed, but when you look at what is going on between the AC input and the DC rails on a piece of electronic equipment today, this is the basic topology used because it gives good efficiency and line isolation.
 
Figure 1: This sample switching supply design comes from the UC2842 datasheet and uses the common UC2842 PWM controller chip. (Original schematic courtesy of Texas Instruments)

How Switchers Work
Figure 1 shows a sample switching supply design (courtesy of Texas Instruments). This comes from the UC2842 datasheet and uses the common UC2842 PWM controller chip. (The datasheet can be found in the Supplementary Materials section of the audioXpress website, see Project Files for the link.) Note that this design, as is typical, has complete isolation between the primary and secondary sides of the circuit. You can draw a line in your head through the transformer core and through the optocoupler and break the circuit up into two electrically isolated halves. This is an important point and you will see this in almost all supplies of any size since isolation from the power line is a primary safety concern.

AC power comes off the line, and is rectified through the bridge rectifier, DBRIDGE. The output charges up a big filter capacitor on the primary side CIN, which provides a filtered (but hardly ripple-free) DC voltage to the primary of the transformer, NP, as well as voltage to start the pulse width modulation (PWM) chip through resistor RSTART.

RSTART only supplies a small amount of current to start the device, so once the first pulse makes it through the field-effect transistor (FET), current from a third winding on the transformer is used to provide power to run the oscillator. This is what NA and DBIAS are all about. You might not see that third winding, you might just see all the running power being drawn through a higher power dropping resistor in place of RSTART. But, using the third winding improves efficiency a lot.

When the PWM oscillator is running, it sends constant pulses from the output pin. This turns on the big switching FET, QSW, which pulses the current going through the transformer. As this happens, current is induced in the transformer secondary, rectified and filtered by DOUT and COUT, and current flows from the output.

Because the PWM oscillator is so fast, the transformer and the filter capacitor on the secondary side can be very small. Although that 2200 šF cap may seem large, if the oscillator is running at 60 kHz, it’s a thousand times as effective as the same value off the 60 Hz line.
 
Figure 2: This schematics shows a typical small switching supply using a 3845 PWM IC. Notice the Vaux output is referenced to the input ground. The optoisolator, U2, is drawn in two individual halves. U3 provides a reference with which to compare the 5 V line.

Regulating the Power Supply
So, how does the regulation work? All that other stuff on the secondary causes the LED in the optoisolator to come on when the output voltage exceeds 12 V. The UC2842 provides a small amount of regulated 5 V (made with an internal linear regulator) and that voltage at VREF is used to power the output stage of the optoisolator. It provides a varying voltage to the VFB input to provide feedback to the UC2842 that the voltage is correct and to back off the duty cycle of the output waveform a little bit.

The optoisolator doesn’t have to be very linear for the UC32842 duty cycle to be kept right on the edge so the output voltage is always perfect. The ISENSE input is measuring the voltage drop across RCS, which is to say it’s measuring the current draw through that switching FET. The UC2842 is designed so that if it exceeds 1 V, it shuts the PWM circuit down. So this is a current protection circuit.

Now, normally we would see a resistor and capacitor, RRT and CCT, connected to the RT/CT pin and providing a time constant for the PWM oscillator. In this case we also are amplifying the PWM ramp signal off of that with a transistor and applying it to the ISENSE input through CRAMP and IRAMP so that the circuit is stable for very long duty cycles. This is called “slope compensation” and the trick for doing it is explained briefly in TI datasheet for the UC2842 chip, but not in the datasheets for any other manufacturers.

And what about that other transistor, with CSS and RSS? That’s a little circuit to narrow the pulse width when the device is first turned on and slow down the startup slightly so there is less shock to components. Now, you will see other variants on this basic circuit. 

You’ll see an additional transformer winding being used to provide feedback, instead of the optoisolator. You’ll see the PWM IC being driven directly off the AC line instead of with that NA winding. You’ll see multiple secondaries and crowbar circuits. But this is the basic design that you will see inside any switcher and so your job is to figure out exactly what changes from this basic design exist in your circuit.
 
Figure 3: Here is another variation of a small switching supply design. This switcher uses regulation on the 5 V rail and the 12 V rail is regulated only in that it tracks the 5 V rail. A fourth winding powers the PWM chip.

How to Determine What You Have
The bad news is that most of the time you won’t have any documentation for the switcher. The good news is that most of the time the switcher will be very close to identical to the sample circuit on the PWM chip datasheet (see Figure 2). Not always, and not for higher end supplies, but much of the time getting the chip datasheet will tell you 90% of what is going on with the circuit.

The vast majority of better quality Chinese-made supplies seem to use the C2842/UC2843/UC3842/UC3843 series of PWM controllers. These are made by a dozen different companies including Fairchild Semiconductor, ON Semiconductor, TI, and STMicroelectronics, and each of those companies has a slightly different datasheet with slightly different sample circuits. So if you don’t see the circuit you have encountered on the datasheet, get another datasheet from another manufacturer and likely you will (see Figure 3).

The Fairchild KA7552 shows up in a number of devices (see Photo 2). This was a Samsung design, now sold by Fairchild since they took over the Samsung facilities and product line. It is vaguely similar to the UC2842 although with a different pinout.

Sometimes you will see the TL594 PWM controller from ON Semiconductor. Again, there are a couple other vendors for this so you should check for multiple datasheets. One very popular IC that you will find in lower powered single output devices is the TOP242 series of chips made by Power Integrations. These are integrated PWM oscillators on the same substrate with a big power FET. Add a transformer, a couple rectifiers, and an optoisolator and you have a complete switching supply in a box. Of course, they fail frequently but are fairly easy to diagnose. 

However, there are dozens of power and package options on these chips so you can’t always keep them all on hand. A similar but less popular device is the MC33374. A lot of less expensive Chinese-made products will use the AP3021 control IC, and this chip is manufactured and sold under dozens of different names by dozens of different companies in China. The documentation on it is poor, but if you ever encounter a cryptic-looking PWM controller where pin #6 is not being used, it is likely to be an AP3021 or a copy. The English language datasheets for this product are skimpy at best but once you have some idea of the pinout and how it works you should be able to figure out what is going on.
 
Photo 2: The Fairchild KA7552 has been used in several devices.

Encountering the Unexpected
Not every supply is a single switching supply in a box. Sometimes you will encounter systems with multiple switchers in the same box providing multiple output voltages, each regulated. It’s more common to find multiple voltages off one transformer with a single output voltage used for the control loop but some applications require good regulation with highly varying loads.

Sometimes there is a second “always on” power supply that provides a standby voltage used to run the processor that controls the main power. This is very common for things like video monitors and computers. Often this supply is on a small daughterboard since it needs good electrical isolation from the rest of the electronics but doesn’t need to produce a lot of power.

If you see a lot of small discrete transistors all over the place, a good guess is that they are involved with automatic shutdown systems, to shut down in case of high or low voltages or currents at one or more place. Troubleshooting these circuits without a manual can be a real nightmare since it can be difficult to figure out at what voltages individual parts trigger.

Every once in a while for audio or other low noise applications you will see linear series regulators for a little additional smoothing, located after the switching supply. Since these can run hot, they are a common source of trouble but fairly easy to diagnose since you can see power coming into and out of them.

Fixing the Problem
If you have documentation on the power supply, half the work is done for you. If not, you know the basic block diagram and you can work out the individual parts within each block by hand. Getting the datasheet for the PWM chip will tell you a huge amount since most PWM circuits and sometimes entire supplies are just copied from the manufacturers’ datasheets. Often the PWM chip will have multiple sources. For example, you can get the common 2842 PWM controller from at least four different vendors. All have different datasheets and if your circuit isn’t on one, it might be on another.

If the power supply comes on but immediately crowbars, the first thing to do is check or replace all the filter capacitors on the secondary side of the transformer. Other things can cause this like a leaky rectifier on the secondary or a bad resistor in a current sense circuit, but they are far less common.

Sometimes the caps will be just leaky enough that the supply will start up with no load but won’t run with any load on it. Your inclination is to blame the load for pulling too much current, but it’s not always the load. When in doubt, change the caps and then take the diagnosis from there.

Many power supplies use a “kickstart capacitor” to supply current to start them up. This isn’t shown in the example given above, but it is a fairly common configuration. If the power supply was working, was shut off, but then would not restart at all, replace the kickstart capacitor. If there is no documentation, this is likely to be a 25 V to 50 V electrolytic of very small value (1 μf or 2 μf), located near the PWM chip.

The high voltage capacitor (sometimes two capacitors) on the primary supply, which filters the line directly seldom is seen to be failed in the US. However, in Europe where the line voltage is twice as much and where the same multi-input power supplies are used, those capacitors are frequently found to be bad. European supplies whose behavior changes with the load should first have these checked.

Capacitors located near or under heatsinks tend to bake out very quickly and are common sources of failure. In fact, because the vast majority of failures that you encounter will be capacitor-related, having an equivalent series resistance (ESR) tester to make quick tests in-circuit is very handy. However, I am often inclined just to replace all electrolytics from doubtful manufacturers even if they test well, just because I want a longer lifetime from the supply than the likely design lifetime was.

If the problem isn’t the capacitor, a very common failure is the power transistor or FET (see QSW in Figure 1). Usually these can be easily located by large holes in the board where the FET used to be, by all three of the pins of the FET having continuity between them, or by obvious diode or resistor failures in the circuit near the FET. If the FET is not “wiped” (meaning all three pins have continuity and beep on a continuity tester), it may be worthwhile to test it out of circuit.

If a FET is “wiped,” however, whatever drives the gate of that FET has likely been destroyed as a consequence of the failure. That is often the PWM chip and it’s good to have common PWM chips available in the spares bin.

A good rule is that if the switching transistor or FET has failed, you should replace the protection diode on the base or gate of the transistor. Even if it checks well, it may not be. The damping diode DCLAMP is also one to check. FETs do fail for no apparent reason but more often they are driven to fail by overvoltage (from bad clamping diodes) or overcurrent (from bad and leaky capacitors) or high temperatures (from bad designers).

If these simple things don’t fix your problem, it’s time to start actually doing real diagnosis. Get out the meter and start looking at the pins of the PWM chip. Do you see a reasonable input voltage on VCC? Do you see a 5 V reference voltage from VREF? Do you see less than a volt at ISENSE or more? Is the oscillator oscillating at all? Start making sure that the inputs to the PWM chip are good and then that the outputs to the PWM chip are good. If you have a waveform on the output pin but you don’t have any output, start looking at the switching FET or transistor, the damping diode around it, and so forth. If the oscillator isn’t oscillating, what is it missing?

The exact values will vary depending on the PWM chip being used, but the recommended operating conditions table on the PWM chip datasheet will tell you about what they should be.

Capacitor Rules
Rule 1: Most switching supply failures are due to bad electrolytic capacitors. Even FET failures are often long-term consequences of an initial capacitor problem. 

Rule 2: Nobody ever went wrong replacing cheaply made consumer electrolytic capacitors with higher grade 105C industrial ones. It might not fix the immediate problem, but it will likely improve the long-term reliability of the supply. So don’t spend a lot of time trying to decide if a capacitor is bad, just replace it. Your time is worth more than an electrolytic.

Rule 3: Buy capacitors from a legitimate supplier like Digi-Key, Newark/element14, Allied/RS, Mouser, and so forth. There are a lot of counterfeit capacitors out on the market, capacitors that didn’t come from the manufacturer on the can.

Rule 4: Electrolytic capacitors fail from age and poor engineering margins, but when other capacitor types have failed, it’s because something else has caused them to fail.

Rule 5: Tantalum capacitors are actually electrolytics. The chemistry is a little different than that of aluminum electrolytic caps, but the longterm reliability and temperature-related issues are the same. Note that the more common “dry slug” tantalums (those epoxy-dipped types) tend to fail into shorts and this can make them easier to identify when failed. Unfortunately it also means that a failure can result in major collateral damage.

Peroration
Don’t be afraid to work on equipment with integral switching supplies. It can take a long time to get the hang of how they work and the more common failure modes, but once you do, they are usually not difficult to fix.

If you want to learn how to design switching supplies (and you should, because that is also a useful skill), permit me to recommend the “Linear Technology Application Note 25: Switching Regulators for Poets,” written 30 years ago by the great Jim Williams. Back then, switching supplies were fancy new things that designers were just getting a handle on, and available ICs were much more limited and crude, so Williams’ description had to be detailed. It is a fine document that is available in many places on the web. B

Project Files
To download the Texas Instruments UC2842 datasheet visit audioXpress-Supplementary-Material

Resource
J. Williams, “Linear Technology Application Note 25: Switching Regulators for Poets,” September 1987.

This article was originally published in audioXpress, January 2018.


About the Author
Scott Dorsey has a degree in electrical engineering, during the pursuit of which he worked in the broadcast and recording industries. After several years working at a major studio, he took a job with a defense contractor. This left him time to do live concert recording for acoustical music and to design and build audio devices for personal use and on contract to several audio manufacturers and importers. Scott is a regular contributor to several audio magazines. He has been publishing equipment reviews and DIY projects since the mid-1980s. He is probably best known in the general audio community for his retrofit electronics designs in inexpensive Oktava, AKG, and Feilo microphones.
Page description
About Scott Dorsey
Scott Dorsey has a degree in electrical engineering, during the pursuit of which he worked in the broadcast and recording industries. After several years working at a major studio, he took a job with a defense contractor. This left him time to do live concert... Read more

related items