Você está na página 1de 8

Basic Switching Power Supply Design Tutorial Navigation

This page is a bit longer than the other pages and may be somewhat difficult to navigate. Since it's designed as part of the Basic Car Audio Electronics site and you likely opened this page by clicking on item number 109 in the directory, that link should still be there. If you get in the middle of a long section and you want to quickly return to the top of the page, simply click the link in the directory for page 109. If there is no directory to the right, please click the arrow below and scroll down in the directory to page 109.

1. Overview of this Tutorial

2. Notes

3. Power Supply to be Used as an Example in this Tutorial

4. Linear Power supplies vs Switching Power Supplies

5. Basic Components

6. Definitions and Miscellaneous Information

7. The TL594 PWM Driver IC

8. More Details about the Features of this Power Supply

9. Basic Transformer Design

10. Selecting the Required Circuits

11. Changes on the rev. 3 Boards

12. Assembly Notes

13. Testing

Overview
This page was created help you understand switching power supply basics. It applies only to push-pull switching power supplies powered from a 12v DC source (like those used in virtually all car audio amplifiers). It's not an in-depth tutorial and there is much more to learn but this

should help introduce you to the basics. Most of the other sites and subject matter seem to be written for those who already know the material. This page is for those who know basic electronics but know absolutely nothing about switching power supplies. Hopefully, the information you find here will help you understand the subject matter well enough to understand the more advanced material you'll find on other sites. If you find that something is being discussed but some pre-requisite information seems to have been omitted, please email me. If you have questions, comments or suggestions regarding this material, feel free to email me. If you're interested in building a switching power supply but are intimidated by the length of this page, don't be. Take it one section at a time. Give it time to sink in and a couple of days later, read another section. Back To The Top

Notes - Please Read

Flash Based Graphics: Most of the graphics on this site are Flash graphics. This means that they will not be visible on many of the internet capable cell phones and similar devices. If you're interested in this page, it's best viewed from a laptop or desktop computer.

~: If you see the character '~', it means approximately. For example, ~15v means 'approximately 15v'.
B+: B+ is the positive battery terminal connection on the amp, power supply or the positive 12v source (depending on the context). 4K7, 6K8...: Abbreviations like 4K7 when referring to the values of components like resistors means 4.7K ohms (4700 ohms). You'll see this often when the value is printed on a component. Since the printing is often low quality on an uneven surface, it's easy to lose a tiny decimal point. The substitution of the K in place of the decimal point makes it unlikely that the value can be misread. The K means thousand. If you had a 2.2 ohm resistor, it would likely read 2R2. For a three million, three hundred thousand ohm resistor the marking would likely read 3M3. g = AWG: For this (and most of my tutorials), I substitute the letter 'g' for 'gauge' when stating the size of the wire. This is short for AWG (American Wire Gauge). 14g wire means 14 gauge wire. xxx: If you see a part number that has a lower case 'x' as part of the part number but the other letters of the part number are upper case, it means that there are several versions of the same basic part. For example the TLx94 could be a TL494 or a TL594 but, for the context, they are similar enough so that the TLx94 would cover both parts. The same goes for the L7815, L7805, L7809.... If the context was for the L78.. regulators in general, they would be referred to as the L78xx regulators. 'S' Suffix: If you see a lower case 's' at the end of a part number (particularly one that has other letters in upper case), that's the pluralization of the part number and is not part of the part number. For example, If you're instructed to replace the 'IRF3205s' in the circuit, the part number is IRF3205, not IRF3205S. Zooming in on Flash/Shockwave Files: Many of the graphics files are Flash .swf files. You can determine which are Flash files by right-clicking while the mouse cursor is on the image. If it gives an option to zoom

in, you can do so by simply selecting that option in the pop-up dialogue box. For files that have a relatively square format, if you've selected the option to open the image in a new window, you may want to use the F11 button to go to full screen. You can zoom in when in full screen mode if you want to see the file at a higher resolution. The vector graphics files (most of the schematic diagram files and interactive demos) can be enlarged significantly with no loss of quality. The Flash files that contain bitmap type images have a finite resolution and zooming in more than one time generally won't provide any better detail. While zoomed-in, you can use the left mouse button to scroll/navigate. Note: Most browsers toggle from full screen to normal viewing with F11 but Firefox won't. To get back to normal viewing, you must go to the top-right of the display and click the restore button (between the minimize button and the X).

Dead Links: For those reading this online, you'll find links that are dead. This was primarily written as part of the Car Audio Amplifier Repair Tutorial. Some of the links here will point to links in the tutorial so they will not work online. It's too time consuming to have more than one version so I've left the links. If you're reading this as part of the tutorial and find a dead link, please emailme. Links that Open in Pop-Up Windows: Some of the links and images open in pop-up windows. Many people click on the main window to make the pop-up fall behind the main window. If you click on another link that is supposed to open on top of the main window, it may not and it may appear that the link isn't working. The link will open in the previous pop-up window that's now behind the main window but you may not notice it unless you see the moving icon on the browser tab as the content loads. To prevent this from happening, close each popup by clicking the 'X' at the top of the pop-up window. Power Supply vs Regulator: The terms switching power supply and switching regulator can, many times, be used interchangeably. On this page, I'll try to differentiate between the two. A switching power supply will refer to a circuit that boosts the voltage. The sample switching power supply on this page boosts the voltage from 12v to 36 volts (or more, depending on the transformer). A switching regulator refers to a circuit that takes a voltage greater than the regulated output voltage then reduces and stabilizes the voltage. Both switching and linear regulators will perform this function. Technically, the sample power supply could be considered a switching regulator if it uses regulation to maintain a specific output voltage but since that voltage is always going to be greater than the 12v input voltage (from the vehicle's charging system), it will be referred to as a regulated power supply instead of a switching regulator.

Back To The Top

Power Supply to be Used as an Example in this Tutorial


The power supply below is the one that we'll use as a basis for this tutorial. It was designed to be used with audio power amplifiers but can be used for virtually anything that needs DC voltage greater than what's available from the automotive charging system. If you want to build a switching power supply to power an audio amplifier that you originally built to operate off of mains power but now want to use it for car audio, this type of supply will work very well.

Many tutorials start by showing the individual parts/circuits but you have to wait until late in the tutorial to see how the individual circuits work together. This first section is to help those who prefer to know where they're going before they begin their journey.

Basic Features of this Power Supply

Output Power: This power supply can support an 800 watt audio power amplifier. To operate at full power for extended periods, the power supply will need a fan to force air over the internal components and heatsink to keep it cool. The heatsink (the one used for testing) generally remains relatively cool but the internal components will benefit by having air flowing over/around them if the supply is run to full rated output. With an audio amplifier bridged into 4 ohms, regularly driven into clipping (music) and with the supply's rail voltage initially set to ~94v across the rails (47v), a 50mm x 10mm fan easily kept the heatsink and internal components cool. To clarify for those who may want to build this supply or a similar supply, this power supply is designed to supply power to anaudio amplifier. When it's stated that it can provide 800 watts, that's not a continuous 800 watts DC output (100% duty cycle). It's designed to provide the power to an audio amplifier that intermittently draws the

power required to produce 800 watts. To provide a continuous 800 watts of straight DC, the power supply would have to have approximately twice the components as this one. As a test, the prototype supply was connected across a 4 ohm resistor. The 12v power supply (actually 13.18v during testing) couldn't supply enough current to drive more than 54.7v (1:3.75 transformer with regulation) into the load. It was driven into the 4 ohm load for 27 minutes, until my 12v power supply shut down (too lazy to unbury a larger 12v supply). There was no damage to this supply but the temperature of several of the components indicated that it was being driven about as hard as it could be without going into thermal shutdown. This is a MUCH harder load than if it were driving an amplifier to clipping. Test with 1:3 transformer... 12.7v DC driving a 4 ohm load, the power supply produced 64.8v across the load.

Thermistor Protection: This power supply has a fan drive circuit that's controlled by the temperature of a dedicated thermistor (Power Supply Troubleshooting, #27). The thermistor can be placed on the heatsink or the components that operate at the highest temperatures (whichever you decide to let control the fan speed - I generally place it on the primary filter capacitors). The fan speed control is crude but variable. For this supply, you don't need a fan moving large amounts of air. A minimal amount of air flow will make a huge difference in the temperature of the components. There is a second dedicated thermistor that's used for thermal protection of the supply. The supply is designed to shut down at ~80C (~176F). The thermal protection employs 'hysteresis' which requires that the supply cool down to ~68C (prototype temperature readings) before it will power on again. The shutdown temperature can be changed by changing the value of the resistor in series with the thermistor. A lower value will make the shutdown temperature increase. Regulation of Main Rails: You can operate this power supply with or without regulation. When operated with regulation, both the positive and negative rails are monitored. The regulator has a potentiometer to allow precise voltage adjustment. If you want to have a regulated power supply, I recommend 'over-winding' the power transformer to no more than 20% over what's needed to produce the desired output voltage. This may not be a tightly regulated supply if excessive current is drawn by the amplifier but it's typically good enough and is more efficient than a tightly regulated supply (which requires more over-winding). Pre-Regulators: The pre-regulators in this power supply allow the 15v IC regulators (L7815 and L7915) to be used with rail voltage greater than the regulators' maximum supply voltage. The 7815/7915 regulators aren't designed to withstand more than 35v of supply voltage. If you have the main supply set up to produce more than 35v, they need something to limit the voltage feeding them. That's one reason for the preregulators. The pre-regulator outputs can be used to supply power to 'chip-amps'. The maximum input voltage for many of the chip-amps is 25-30v DC. Many people want to have a large bass amp and smaller 'chip-amps' for the rear/door/dash speakers. The bass amp can be operated from the main power supply. The chip-amps will operate off of the preregulators. The supply was designed to allow the user to power a sub amp from the main rails and chip amps from the pre-regulators. If you're only going to use the supply to power the chip-amps, use the main rails for the chip-amps instead of the preregulators. This will result in much lower operating temperatures. The pre-regulators (and the IC regulators) are linear voltage regulators and will produce quite a bit of heat. In some instances, you may need to use a high output fan to provide enough cooling. If you use the main rails for your amp (set to the proper voltage for the chipamps), the power supply will operate at a much lower temperature.

The pre-regulator transistors have no protection circuits and could be damaged if their output is shorted to ground or one of the other power supply outputs. I strongly recommend that you use inline fuses in the wires that you use to connect to the pre-reg output. A 7.5 amp fast-blow fuse should be sufficient to protect the transistors.

15v Regulators: The IC voltage regulators provide clean power for the audio op-amps that will be used for the preamp section of the power amplifier(s). The L7815 and L7915 (Audio Troubleshooting, only available on the amplifier repair DVD, item #26) provide an extremely stable output voltage and employ over-current/short-circuit protection as well as thermal protection. This makes them very reliable. The 15v regulators are generally the best choice but if you want to use regulators with a different output voltage, that's up to you. If the rail voltage for the main power supply is set to less than 35v, the pre-regulators don't need to be used to reduce the supply voltage for the IC voltage regulators. If they're not needed for any other purpose (chip amps, etc...), the pre-regulator power transistors can be omitted and bypassed (leg 2 shorted to leg 3 with a jumper wire). Since the pre-regulators won't be used, there's no need to install any of the resistors, capacitors or diodes associated with them.

Bypass Capacitors: All supplies are bypassed with film capacitors. Power supplies (especially switching power supplies, like this one) need significant filtering to remove the ripple from the output. Large aluminum electrolytic capacitors (round cylindrical devices on the board) are best suited to provide large amounts of capacitance. This removes most of the noise but aluminum type electrolytics may not filter the highest frequency noise as well as film capacitors. To more effectively remove that noise, smaller value film capacitors are used. They are connected in parallel with the electrolytics and together, they do a good job of bypassing all of the noise to ground.

o o

Notes: There is some disagreement as to whether the 0.1uF bypass capacitors are necessary, beneficial or detrimental to the proper operation of a power supply. Since there are a lot of variables that could make them any of those, you can decide to use them or leave them out. Since I haven't experienced any problems using them, I'd suggest that you initially install them and only omit them if there is a problem. This only applies to the bypass capacitors located near the electrolytic capacitors that they're bypassing. It does not apply to other 0.1uF capacitors. Those are required for the proper operation of the power supply. Previously, the term 'noise' was used. Since switching power supplies typically operate at 25,000Hz or higher, the 'noise' is well above audio frequencies and rarely becomes audible but can sometimes work it's way into the audio chain. In general, the 'noise' is high frequency noise at some multiple of the operating frequency. In some instances, this noise can be transmitted outside the power supply and can cause interference with radio transmissions. If you've ever had a class D amp that interfered with your am/fm radio reception, that was RFI (Radio Frequency Interference) and was caused by the noise generated by the amplifier's switching circuitry.

Output Filter: The main output uses an LC filter. To reduce stress on the filter capacitors (particularly when the power supply is used in regulated mode), an LC (inductor/capacitor) filter is used instead of only using a filter capacitor. This also provides a slightly cleaner output but the main purpose of the inductor is to take stress off of the filter capacitors. Secondary Ground Offset Protection: There is an opto-coupler that monitors the DC voltage on the secondary ground. This will shut the supply down if the output of the supply shorts to chassis ground. It will also protect both the supply and the amplifier if a live speaker wire shorts to chassis

ground. The opto-coupler shuts the supply down when the secondary ground is 2v above or 2v below the chassis ground voltage (0v DC).

Internal Fuses: The internal fuses are in series with the main rails of the supply and help protect the supply from excessive current draw. These are typically going to be 15 amp fuses but the required value may be different depending on the output voltage selected. If the supply is used for an amp that needs only 20v, the fuses could be increased to 20 amps. If the supply was going to be used at 60v, the fuses would have to be reduced to 10 amps. External Fuses: There was insufficient space on the circuit board to provide an on-board fuse for the B+ input. The power supply MUST be fused externally with a 50 amp fuse. I'd recommend either a MAXI-fuse or an AGU fuse (only Bussmann or Littelfuse brands, for proper protection). Failure to use a fuse can lead to catastrophic failure of the power supply. Sometimes, the damage is so severe that the supply will be irreparable. Important: If you blow the main power fuse feeding this power supply, it's strongly recommended that you not simply insert a new fuse of the same size. When in good working order, the power supply draws only about 1 amp at idle. After the fuse blows, remove the load from the power supply (or at the very least set the volume control on the signal source to the minimum position) and install a 10-20 amp fuse in the main fuse holder (the one where the 50 amp fuse was installed). If the fuse blows, you will have to disconnect ALL loads from the power supply and try it again. If the 10-20 amp fuse blows with no loads connected to the power supply, the supply has likely failed and will need to be repaired. Do NOT (repeat, do NOT) install a fuse larger than 50 amps and do NOT bypass the fuse. Wrapping aluminum foil around the fuse WILL cause catastrophic failure of the supply and will almost certainly make the power supply irreparable.

Thermal Protection for the Audio Amplifier: An input is provided for thermal protection of the amplifier that will be powered by the supply. The amplifier needs to have a normally-open thermostat. When the thermostat closes (at excessive temperatures), the supply will shut down. The thermostat must be completely isolated from all power supplies and ground (dry contacts). LED Drive Indicators: This supply is designed to be easy to troubleshoot without having an oscilloscope. All outputs on the terminal block (rail and 15v) have LEDs that show they're producing output. There is an LED to show that the amp is receiving remote turn-on voltage. There are two other LEDs on the power supply drive circuit that show that the drive circuit is working. These only illuminate when there's oscillation (drive signal for the power supply FETs). They will not illuminate when there is only DC. These can be omitted if not needed. They were mainly included for those who didn't have a way to determine if there was oscillation/output from the drive circuit. Auxiliary Power Supply: There is an auxiliary power supply that can be used in several ways. Normally, this will be used to produce 'greater_than_rail' voltage for the driver circuits in the audio amplifier. It can be used to produce both positive and negative voltage, only positive voltage or only negative voltage. It can be used with isolated windings or with windings added to the secondary windings. Additional through-holes are provided to allow connecting the auxiliary windings to the secondary windings or to the secondary ground. This supply is only capable of providing approximately 1 amp of current. But that's sufficient for the driver stage of an audio amplifier. Note: The term 'winding' refers to a group of turns/wraps around the core of the transformer. Examples are primary windings, secondary windings and auxiliary windings. The term 'turns' refers to the individual loops of wires. The primary windings (those driven by the power supply FETs) will typically be two groups of 4 turns each (commonly referred to

as a 4+4 configuration). For many transformers, the wire used for the windings will be stranded. It could be 2, 3, even 30 strands of wire that make up the wire used for each turn. These paralleled strands act as one wire and don't count as individual turns. For this supply, three parallel-connected strands of 14g wire make up the wire that's used for the primary windings. Aux Supply Option 1: Using 4 turns for each of the two auxiliary windings. One winding will have it's ends in points A and C. The other will have it's ends in points B and D. This will give an output of rail voltage plus ~B+ voltage. The voltage will be equal to the rail voltage plus (the B+ supply voltage * number of turns/4). Aux Supply Option 2: Using two windings and having one end of the aux windings in the secondary center tap and the other end in C and D, the output will be plus/minus B+ voltage * number of turns/4. Aux Supply Option 3: Having only a single winding and using only C and D, the output voltage will be B+ * the number of windings/4.

Heatsink Ground: A ground is provided for the heatsink. This will help shunt any noise from the sink to chassis ground. It is designed not to burn when the heatsink is shorted to 12v (which sometimes happens if the power connections are made while the B+ wire has voltage on it). Gate Resistors: It has separate drive resistors for turn-on and turn off resistors (for the gates of the power supply FETs). This allows you to fine-tune the value of the resistors to get the cleanest square wave on the power supply primary windings. Snubbers: Snubbers (RC networks) on the primary windings help damp any remaining ringing on the primary waveform. Secondary Ground Isolation: The power supply has an isolated secondary which simplifies the design of the power amplifier. Virtually all car audio power amplifiers need isolation from chassis ground for their RCA shield ground. The simplest way to do this is to have an isolated secondary ground. It can also be done by using a noise-cancelling or a balanced input circuit. These are not difficult to design but add to the complexity of an amplifier.

Você também pode gostar