Silicon ChipHigh-Power Class-D Audio Amplifier, Pt.1 - November 2012 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Replacing sacrificial anodes in hot-water systems is good for the environment
  4. Feature: Sacrifice Your Sacrificial Anode by Leo Simpson
  5. Project: High-Power Class-D Audio Amplifier, Pt.1 by John Clarke
  6. Project: High-Energy Ignition System for Cars, Pt.1 by John Clarke
  7. Project: LED Musicolour: Light Up Your Music, Pt.2 by Nicholas Vinen
  8. Project: Hacking A Mini Wireless Webserver, Pt.1 by Andrew Snow
  9. Project: A Seriously Bright 20W LED Floodlight by Branko Justic, Ross Tester
  10. Review: Agilent U1233A DMM with Bluetooth Adaptor by Nicholas Vinen
  11. PartShop
  12. Order Form
  13. Vintage Radio: The HMV A13B 4-Valve Twin-Chassis Mantel Radio by Rodney Champness
  14. Book Store
  15. Advertising Index
  16. Outer Back Cover

This is only a preview of the November 2012 issue of Silicon Chip.

You can view 22 of the 96 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Items relevant to "High-Power Class-D Audio Amplifier, Pt.1":
  • CLASSiC-D PCB [01108121] (AUD $20.00)
  • CLASSiC-D Speaker Protector PCB [01108122] (AUD $5.00)
  • CLASSiC-D PCB pattern (PDF download) [01108121] (Free)
  • CLASSiC-D Speaker Protector PCB pattern (PDF download) [01108122] (Free)
Articles in this series:
  • High-Power Class-D Audio Amplifier, Pt.1 (November 2012)
  • CLASSIC-D Speaker Protector (November 2012)
  • CLASSIC-D Amplifier Power Supply (December 2012)
  • High-Power Class-D Audio Amplifier, Pt.2 (December 2012)
Items relevant to "High-Energy Ignition System for Cars, Pt.1":
  • High Energy Electronic Ignition PCB [05110121] (AUD $10.00)
  • PIC16F88-E/P programmed for the High Energy Electronic Ignition System / Jacob's Ladder [0511012A.HEX] (Programmed Microcontroller, AUD $15.00)
  • ISL9V5036P3-F085 360V, 46A IGBT for the High-Energy Electronic Ignition System (Component, AUD $10.00)
  • High Energy Electronic Ignition System Firmware (HEX/ASM - zipped) [0511012A.HEX] (Software, Free)
  • High Energy Electronic Ignition PCB pattern (PDF download) [05110121] (Free)
  • High-Energy Electronic Ignition System front panel label artwork (PDF download) (Panel Artwork, Free)
Articles in this series:
  • High-Energy Ignition System for Cars, Pt.1 (November 2012)
  • High-Energy Ignition System For Cars, Pt.2 (December 2012)
Items relevant to "LED Musicolour: Light Up Your Music, Pt.2":
  • LED Musicolour PCB [16110121] (AUD $25.00)
  • dsPIC33FJ128GP802-I/SP programmed for the LED Musicolour [1611012A.HEX] (Programmed Microcontroller, AUD $25.00)
  • LED Musicolour front & rear panels [16110122/16110123] (PCB, AUD $20.00)
  • LED Musicolour Firmware (HEX/C - zipped) [1611012A.HEX] (Software, Free)
  • LED Musicolour PCB pattern (PDF download) [16110121] (Free)
  • LED Musicolour front & rear panel artwork (PDF download) [16110122/16110123] (Free)
Articles in this series:
  • LED Musicolour: Light Up Your Music, Pt.1 (October 2012)
  • LED Musicolour: Light Up Your Music, Pt.2 (November 2012)
Items relevant to "Hacking A Mini Wireless Webserver, Pt.1":
  • Scripts for the Mini Wireless Webserver (WR703N) (Software, Free)
Articles in this series:
  • Hacking A Mini Wireless Webserver, Pt.1 (November 2012)
  • Hacking A Mini Wireless Web Server, Pt.2 (December 2012)

Purchase a printed copy of this issue for $10.00.

250W into 4Ω; 150W into 8Ω B+ CON1 IN 47F NP NRML R2B R2A 4.7k 1W GND LIFT LK1 10 K 100k 4.7k 1W ZD3 5.6V 1W A 330 INV 1nF 4.3k 68k RF R1 R5 LK2 4.7k VAA IC2: TLE2071CP +5.6V (VAA) +5.6V 7 2 4 100F 25V L/ESR CSH VB 16 15 10k VB R4 47k IN– 560pF 6 IC2 3 3 VAA 100 TP1 850 GND R6 6.8k 560pF 4 Comp Ho 22 G 560pF VR1 2k 2 6 –5.6V (Vss) 1W R3B 4.7k 1W ZD4 5.6V K VS 13 K 22 S RUN  LED1 4.7 5 CSD K 10k COM K G G A CSD Q4 BS250P Q2 IRFB561 A LO 11 COM D6 1N4004 10 The CLASSiC-D D PROTECT LED2 100 A  K 2.2k LK4 A K SD 7 VREF A D5 1N4148 VCC 1F MMC 5.6k Q3 TIP31C 10 V Pt.1: By Vcc John Clarke 12 REF R7 8.2k 8 100F 25V L/ESR DT OCSET 9 2012 CLASSic-D AMPLIFIER E C R10 R8 2.2k 1k 1W 4.7k B– SC  B R9 7.5 B– 1N4148 A K 1N4004, MUR120 A K World’s first DIY high-power high-performance Class-D amplifier: 250W into 4Ω; 150W into 8Ω You asked for it and now we are finally delivering it! Over the years we have worked on a number of Class-D amplifiers but they never saw the light of day because they were simply too difficult to build and were unreliable. We kept blowing ’em up! But now we have succeeded and as a bonus, this design has high power, very low harmonic distortion and is very quiet. 18  Silicon Chip 1F MM 15V 1W A 10F +5.6V ZD2 D3 MUR120 VSS VSS A 220F 10V L/ESR IC1 IRS2092 K 100F 25V L/ESR GND 1F MMC R3A Q1 IRFB561 14 VS 4.7k K A 3.3k 1 4.7k 220F 10V L/ESR D4 MUR120 siliconchip.com.au Z A 15 B+ F1 5A 9 0V 63V S G +50V 470F B+ 100nF P-CHANNEL D Vs Vt Vo L1 D N-CHANNEL G D1 1N4004 SPEAKER S COMPARATOR DRIVER FILTER LOAD Fig.1: simplified circuit of a Class-D amplifier. The incoming analog waveform (Vs) is compared to a high-frequency triangle wave (Vt) and the comparator then drives a pair of Mosfets to generate a PWM waveform. This then passes through an LC low-pass filter before being delivered to the speaker. A 100nF X2 D C1 B– K S B– F MC 15 CON2 Vo OUTPUT CON3 L1 22H 5A B+ Vs + 10 D 1W 470nF 150pF 2.2k 100nF X2 100V 0V X2 S K 10 1W B– 100F 25V L/ESR K C B– D2 1N4004 A A ZD1–4 K Vt F2 5A 470F 100nF –50V (CON2) 63V LOW ESR LEDS siliconchip.com.au TIME Fig.2: this diagram shows the two input waveforms fed to the circuit of Fig.1, along with the PWM output (VO). Note how the duty cycle is longer when Vs is high and shorter when Vs is low. The output of the filter will be quite similar in shape to Vs. BS250P LASS-D OR SWITCHING ampliK S D G areAmade by the squillions and used in countless TV sets, home TIP31C audio systems and a host IRFB5615 of other applications ranging from iPod playC D ers and phones to large amplifiers in B G C applications. commercial D So they are E S obviously reliable when they are mass produced. However, in the past when we have taken a typical Class-D chipset and tried to adapt it to a do-it-yourself design for publication in SILICON CHIP, we have been lamentably unsuccessful. Inevitably the chipsets were surfacemount devices and some employed quite critical heatsinking for the main amplifier itself. And inevitably again, we consistently blew devices as we tried to devise a reliable DIY design. So much so, that Leo Simpson, the publisher of this magazine, had sworn off attempting another Class-D amplifier. Time heals all wounds ZD1 15V fiers 5k B– though and eventually he relented when he saw the details and specs of this proposed design. Yes, it does use a surface-mount driver chip but the pin spacing is quite reasonable for hand-soldering. More particularly, the main switching Mosfets are conventional TO-220 devices that are easy to solder and heatsink. All the other components are conventional leaded devices and the result is that this ClassD amplifier is easy to assemble. That’s its first big advantage. Its second big advantage is ruggedness and reliability. It delivers heaps of power and has all sorts of protection built in so we have not blown up a succession of devices during development. Well, back up a minute, we did blow some in the early stages but those problems have all been sorted out. Efficiency is the third big advantage, in common with all Class-D switching amplifiers. Typical efficiency is around 90% and that means that this amplifier will deliver considerably more power from a given power supply than would be possible with a typical linear amplifier such as our Ultra-LD design. High-quality sound is the final advantage of this design and this is its outstanding feature. Most Class-D amplifiers are only average in this respect and this applies to the vast majority of sound equipment used in homes today. We’ve christened the new module the CLASSiC-D. Why the CLASSiC-D moniker? Well, “CLASS” stands for class (what else?), “SiC” is for SILICON CHIP and “D” describes the class of operation. What is Class-D? So what is a Class-D amplifier and how does it differ from a conventional amplifier? Put simply, conventional audio amplifiers are either Class-A, Class-B or Class-AB (a combination November 2012  19 FEEDBACK B+ TRIANGLE GENERATOR N-Ch LEVEL SHIFT & HIGH SIDE DRIVER Vt Vs + ERROR AMP D Q1 G S SET DEADTIME L1 N-Ch D COMPARATOR Q2 G LOW PASS FILTER C1 SPEAKER S B– Fig.3: a more complete block diagram of a Class-D amplifier. This adds an error amplifier which provides some feedback from the output, reducing distortion. The output arrangement is improved too, with a pair of N-channel Mosfets. With this arrangement, the upper Mosfet must be driven from a floating gate supply and a dead-time generator is used to prevent cross-conduction which would otherwise waste power and increase dissipation. of the first two). These amplifiers have their output driver transistors (or Mosfets) operating linearly and if you trace the signal through them, you will find that its shape is unchanged but increased in amplitude as it passes through successive stages to the output. Class-D amplifiers operate in an entirely different mode whereby the output Mosfet or bipolar transistors operate as switches rather than in their linear region and are either fully switched on or fully switched off. When switched on (or off), the power losses within the Mosfets (or output transistors) are almost zero. Thus a Class-D amplifier is far more efficient and generates much less heat than linear Class-A, Class-B and Class-AB designs. In a Class-D amplifier, the output Features • • • • High efficiency High power Low distortion and noise Bridging option for driving 8Ω loads with two modules • Over-current protection • Over-temperature protection • Under-voltage switch-off • Over-voltage switch-off • DC offset protection • Fault indicator • Amplifier running indicator • Optional speaker protector module 20  Silicon Chip devices are switched at a very high frequency and the duty cycle is varied by the input audio signal. This is called pulse width modulation (PWM). After filtering to remove the high-frequency switching from the output, the result is an amplified version of the input signal. With Class-D it is often (mistakenly) assumed that “D” stands for digital. Not true. It was called Class-D because the previous amplifier classes were A, B, AB and C. So when switching amplifiers were first devised many decades ago, it was natural to call them Class-D. Class-D basics Fig.1 shows the simplified arrange­ ment of a Class-D amplifier. It consists of a comparator that drives a complementary Mosfet output stage with balanced supply rails (B+ and B-). The comparator compares a fixedfrequency triangle wave against the incoming analog signal. Its output swings low, to B-, when the input signal voltage is more positive than the triangle waveform and swings high, to B+, when the signal voltage is below. The output stage shown here is inverting so the common drain (Vo) has the correct sense, ie, high when the input signal voltage is above the triangle voltage and vice versa. Fig.2 shows the switching waveform produced by this circuit as well as the triangle wave input. The triangle wave (Vt) is at a much higher frequency than the input signal (Vs) and the resulting PWM output is shown as Vo. A second order low-pass filter comprising inductor L1 and capacitor C1 converts the PWM signal to a smoothly varying voltage. The result is an amplified version of the input signal which is then applied to the loudspeaker, reproducing the input waveform as sound. Fig.3 shows a more practical Class-D audio amplifier. This includes negative feedback from the PWM output to an error amplifier. The feedback reduces distortion at the amplifier’s output and also allows a fixed gain to be applied. The input signal is applied to the error amplifier at the summing junction and its output is applied to the following comparator which acts in the same way as in Fig.1, comparing a triangle waveform with the error amplifier output. Note that because feedback comes from before the LC filter, the filter must be very linear for the output distortion to be low. In other words, we are assuming that the output filter does not add much distortion since there is no feedback around it and therefore if it does, that distortion will not be automatically compensated for. We don’t want to add feedback around the output filter because it introduces a significant phase shift to the signal and that would adversely affect amplifier stability. Fig.3 employs two N-channel Mosfets and so the driving circuitry is more complicated. It includes a “deadtime” generator that prevents one Mosfet switching on before the other has switched off. Without dead-time, each time the output switches, there would be massive current flow as both Mosfets would simultaneously be in a state of partial conduction. siliconchip.com.au The Mosfet driver also includes a level shifter and high-side gate supply voltage generator, so that Mosfet Q1’s gate can be driven with a higher voltage than its source (as is necessary to switch on an N-channel device). N-channel Mosfets are generally more efficient than P-channel types and since it can be the same type as Q2, the switching times are better matched. It is important that Mosfets Q1 and Q2 have similar characteristics so that the switching and dead-time can be optimised. The desirable characteristics include low on-resistance (RDS(ON)) for minimal dissipation, a low gate capacitance to reduce switching losses and minimise switching times, and low gate resistance and reverse recovery times. These allow for a fast switching speed with short dead-times. Increased dead-time generally means increased distortion, so the shorter the better. In practice, our new Class-D amplifier works in a slightly different way to that depicted in Figs.1, 2 & 3 since it uses a scheme known as “secondorder delta-sigma modulation”. In this, the triangle wave is produced by an integrator which is connected as an oscillator and its frequency varies with the output duty cycle. This integrator also effectively forms the error amplifier and as with the simpler scheme described above, its output is fed to the comparator which controls the Mosfets. In terms of actual circuit complexity, the delta-sigma scheme probably uses less components and from our tests, it gives surprisingly good performance. So it’s a clear winner compared to the traditional approach explained above. Full circuit details Fig.4 shows the full circuit of the SILICON CHIP CLASSiC-D Amplifier. It’s based on an International Rectifier IRS2092S Class-D audio amplifier IC (IC1). This incorporates the necessary integrator, comparator, Mosfet drivers and fault protection logic. It also includes the level shifting and high-side driver required for the two N-channel Mosfets (Q1 & Q2). The over-current protection thresholds for each output Mosfet and the dead-time delay are set by external resistors on IC1’s CSH, OCSET and DT pins. The IC also has a fault input/ output pin (CSD) to allow external sensing of supply rail under-voltage and over-voltage conditions, as well siliconchip.com.au Specifications THD+N: typically <0.01%; see Figs.8-10 Power output: up to 150W into 8Ω and 250W into 4Ω, depending on power supply Power output, bridged, 8Ω only: 450-500W, depending on power supply Efficiency: typically 90% at full power for 8Ω and 83% for 4Ω Signal-to-noise ratio: 103dB with respect to full power Input sensitivity: 2V RMS (4Ω), 2.2V RMS (8Ω) Frequency response: ±1dB, 10Hz-20kHz Power requirements: ±40-60VDC, 50-55V nominal Over-temperature cut-out: 75°C Under-voltage threshold: +40V Over-voltage threshold: +75V DC offset protection threshold: > ±4VDC Over-current threshold: 29A Idling (no signal) frequency: ~500kHz (adjustable) Mosfet dead time: 45ns as heatsink thermal limiting. This is used to shut down the amplifier if one of these fault conditions has occurred. Other components in the circuit are included to regulate and filter the various power supplies, while inductor L1 and a 470nF capacitor form the low-pass output filter. As shown on Fig.4, the main ±50V (nominal) supplies (B+ and B-) are fed in via fuses F1 and F2. These rails are then filtered by 470µF low-ESR capacitors that are bypassed with 100nF capacitors. The B+ rail connects to the drain of Mosfet Q1 while B- connects to the source of Q2 and to the common (COM) of IC1 at pin 10. There is no direct B+ connection to IC1. Instead, the Vcc supply at pin 12 is relative to and derived from the B- supply via zener diode ZD1 and transistor Q3. In operation, current flows through ZD1 via a 7.5kΩ resistor (R9), so ZD1’s cathode is at B- plus 15V. This voltage is buffered by Q3 and bypassed using 100µF and 1µF capacitors to derive the Vcc rail (ie, 15V above B-). This voltage is applied to pin 12 of IC1 and is the supply rail for the lowside driver inside IC1. This drives Mosfet Q2’s gate via the pin 11 (LO) output. When pin 11 is low (ie, at COM or B-), Mosfet Q2 is off. Conversely, when the LO output goes high to Vcc, Q2’s gate-source voltage is around +15V and so Q2 switches on. Similarly, Q1’s gate must be at least 12V above its source in order to switch it fully on. Its source is connected directly to the output inductor (L1) and this can swing up to B+ (or very close to this) when Q1 is on. Conversely, this side of the output inductor goes to Bwhen Q1 is off and Q2 is switched on. This means that the voltage supply for Q1’s gate drive must “float” on top of the output rail. Fig.5 shows a simplified version of the basic arrangement. When the output at the junction of Q1 & Q2 is low, D3 is forward biased and this charges the 100µF and 1µF capacitors in parallel across ZD2 from the 15V Vcc supply. Conversely, when this output goes high, D3 is reverse biased but the two capacitors retain charge for long enough to keep Q1’s gate high (via VB and HO of IC1) and thus Q1 switched on until the next negative pulse. When both Mosfets are switched off (eg, when power is first applied or during a fault condition), the voltage at Vs (pin 13 of IC1) is held near ground by current flowing through the speaker load at CON3 or, if no speaker is attached, the parallel 2.2kΩ resistor. Since D3 is reverse-biased in this condition, resistor R4 (47kΩ) is included to provide a small amount of current to keep the capacitors across ZD2 charged, so that Q1 can be quickly switched on once conditions have stabilised. The current through R4 produces a small DC offset at the amplifier’s output but it’s not sufficient to cause November 2012  21 22  Silicon Chip siliconchip.com.au R3A 1W R3B 4.7k 1W ZD3 5.6V R2B 4.7k 1W B– 220F 10V L/ESR 100F 25V L/ESR 3 2 K A LK2 INV 2.2k LED2 PROTECT D S K  A 6 VR1 2k 100 G SD K A A D5 1N4148 100 K 560pF 560pF +5.6V 1 VAA R7 R8 2.2k 8.2k VREF D6 1N4004 10F 1F MMC CSD VSS 8 7 5 6 2 560pF 4 3 IC1 IRS2092 A K 1N4148 OCSET VREF CSD VSS GND Comp IN– R1 RF VAA 68k 4.3k +5.6V (VAA) 1nF 330 –5.6V (Vss) TP1 850 GND +5.6V ZD4 5.6V 4 IC2 7 4.7k IC2: TLE2071CP NRML Q4 BS250P LK4 220F 10V L/ESR 4.7k 100k 47F NP CLASSic-D AMPLIFIER 1W 4.7k A 10 K R2A 4.7k 1W B+ 13 14 15 16 DT Vcc COM VCC 4.7k 5.6k A K 1W 1k C E K A R10 Q3 TIP31C 10 1F MMC B– 4.7 K A 10k D3 MUR120 100F 25V L/ESR A K 100F 25V L/ESR R6 6.8k 1N4004, MUR120 12 10 9 VS VB COM LO 11 VS Ho VB CSH 3.3k R5 R4 1F MMC B RUN  LED1 22 10k G A K A K S D S D ZD1–4 R9 7.5k G Q2 IRFB5615 22 15V 1W K Q1 IRFB5615 47k ZD2 A D4 MUR120 ZD1 15V B C K A E B– X2 470nF 100nF B– 1W 10 100V 150pF 100F 25V L/ESR B– L1 22H 5A X2 100nF B+ 100nF 63V 470F TIP31C C G BS250P (CON2) D S IRFB5615 D –50V + OUTPUT CON3 0V +50V CON2 D G S F2 5A D2 1N4004 X2 2.2k 100nF 1W 10 D1 1N4004 LOW ESR LEDS A K A K 63V 470F F1 5A Fig.4: the main circuit for the CLASSiC-D Amplifier module (without the protection circuitry shown in Fig.6). It’s based on IC1, an IRS2092 Digital Audio Amplifier which contains the error amplifier/triangle wave generator, comparator, dead time generator, level shifter, Mosfet drivers and protection logic. Op amp IC2 provides the signal invert option, while Mosfets Q1 & Q2 form the output stage. The main supply rails are B+, GND and B-, while IC1 has four additional supply rails: +5.6V (VAA), -5.6V (VSS), B- + 15V (VCC) and a 15V floating supply (VB/VS). 2012 SC  LK1 GND LIFT IN CON1 any problems. With no load attached, the output offset will be +1.56V, due to current flowing through R4, ZD2 and the 2.2kΩ resistor at the output. This drops to 5.7mV with an 8Ω loudspeaker load (or half that for a 4Ω load). Input circuit The input/analog section of IC1 is powered from a pair of separate ±5.6V rails. These are connected to pin 1 (VAA, +5.6V) and pin 6 (VSS, -5.6V) and are referenced to GND (pin 2). They power IC1’s internal error amplifier/ integrator and comparator circuits and they also power op amp IC2. The ±5.6V rails are derived from the main B+ and B- rails via paralleled 4.7kΩ resistors and zener diodes ZD3 and ZD4. A 220µF capacitor filters each supply, while a 100µF electrolytic and 1µF MMC capacitor in parallel bypass the total supply between VAA and VSS. The amplifier’s signal input is applied to one of the two RCA sockets at CON1 – one vertical, the other horizontal so that you have a choice when it comes to making the connection. Having a second input socket also allows the input signal to be daisychained to a second amplifier module if you want to operate two modules in bridge mode. The RCA socket shields are either connected directly to ground via link LK1 or via a 10Ω resistor. This resistor is typically included in a multi-channel amplifier and prevents hum by reducing the current flowing between the signal ground connections. It can also improve channel separation. As shown in Fig.4, the input signal is fed via a 47µF capacitor to jumper block LK2. This allows you to select whether the input is inverted by op amp IC2 or not. If you are using just one module, then LK2 would be installed in the normal (NRML) position. The invert mode is useful for bridging two amplifier modules. In that case, the first module is set to normal mode and the second to invert. The same input signal is then fed to both amplifiers and the speaker connected between the two outputs. Supply bus pumping You can also use the invert mode for one channel of a stereo amplifier. Basically, it’s a good idea to invert the output signal of one amplifier relative to the other. The correct phase is then siliconchip.com.au B+ R4 47k K D3 A ZD2 15V D VB (15) K C1 A FLOATING HIGH SIDE DRIVER Q1 Ho (14) G S L1 22 H Vs (13) SPEAKER D Vcc (12) 15V SUPPLY (Q3,ZD1) C2 LOW SIDE DRIVER Q2 Lo (11) G 470nF 2.2k S COM (10) B– Fig.5: a simplified version of the floating supply arrangement. C1 is charged to 15V which is limited by ZD2. When the output (Vs) is low, C1 charges from C2 via D3. C1 partially discharges (due to gate drive current) when Vs is high and recharges on the next low cycle. R4 charges C1 when both Q1 and Q2 are switched off (eg, when power is first applied). maintained by swapping the output terminals of the inverted amplifier module. This prevents a problem with Class-D amplifiers whereby the power supply can be raised above its normal voltage by a process called “supply bus pumping”. Supply bus pumping is caused by the energy stored in the inductance of the output filter and speaker winding(s) being fed back into the supply rail via the output Mosfets. This is primarily an issue for signal frequencies below 100Hz, ie, the ripple frequency of the main supply capacitors. When one amplifier is driven out of phase to the other, the supply pumping effect is cancelled out, assuming the low-frequency signal is more or less evenly split between the two channels. In bridge mode, this is automatically the case so the effect doesn’t occur. From LK2, the signal is fed through a low-pass filter comprising a 330Ω resistor and 1nF capacitor which prevents RF signals from entering the amplifier. This filter also prevents high-frequency switching artefacts at the output from being feed back to the input via resistors R1 and RF. Following the low-pass filter, the audio signal is fed to the inverting input (IN-) at pin 3 of IC1. RF (4.3kΩ) and R1 (68kΩ) set the gain of the amplifier, with feedback via the 68kΩ resistor also applied to the IN- input. The gain with the component values shown is 68kΩ ÷ (4.3kΩ + 330Ω) = 14.7 or 23dB. The 560pF capacitor between the COMP input (pin 4) and GND (pin 2) rolls off the open loop gain of the amplifier, to ensure stability. Two more 560pF capacitors between the COMP and IN- pins, together with a 100Ω resistor and trimpot VR1, set the oscillator frequency. This RC network forms the second-order delta-sigma differentiator. Output filter The switching amplifier output is filtered using 22µH inductor L1 and a 470nF X2 polypropylene capacitor. The inductor is a special type chosen for its linearity, so as to minimise distortion, especially at higher frequencies. This type of LC low-pass filter has second order characteristics, ie, after the -3dB point it rolls off at around 12dB/octave. The switching frequency is around 500kHz and the filter’s -3dB point is set to 1 ÷ (2π x √(22µH x 470nF)) = 49.5kHz. This gives log2(500kHz ÷ 49.5kHz) x 12dB + 3dB = 43dB attenuation of the nominally 50V RMS switching waveform. Thus, we expect a high-frequency signal of about 0.4V RMS to remain after the filter – which is very close to that measured. A snubber network comprising a 10Ω resistor and series 100nF capacitor is also connected across the output following the filter to prevent oscillation. Similarly, there is a 150pF/10Ω 1W snubber at the switching output to limit the rise and fall times and so reduce EMI (electromagnetic interferNovember 2012  23 THERMAL CUTOUT (75 °C) OFFSET DETECT TH1  (4.7k <at> 25 °C) 1k Q7 BC327 E B Q5 BC327 E 1k 10 F 100 F B C E Q8 BC327 B+ K SD PROTECT Q9 BC337 LK3 More protection B C 4.7k TO CON3 OUTPUT 100k NP NP 9.1k C 100k C OVER VOLTAGE DETECT 10k A K ZD5 68V 1W ZD6 39V A 10k 10k 47k 10k B E 100nF BC327, BC337 B E Q6 BC337 C B UNDER VOLTAGE DETECT E 10k C –5.6V Fig.6: the additional protection circuitry on the amplifier PCB. TH1 provides over-temperature protection, ZD5, ZD6 & Q6 provide over and under-voltage protection, and Q7 & Q8 provide DC offset protection. If any of the fault conditions is met, Q9 turns on and pulls the CSD pin of IC1 to -5.6V via D5 and a 100Ω series resistor (shown in Fig.4). ence). D1 and D2 clamp any output excursions that would otherwise go beyond the B+ and B- supply rails (eg, due to the speaker coil inductance). Fault protection When power is first applied or if a fault occurs, the shutdown input (CSD) at pin 5 is held at -5.6V (or close to it). In that case, Mosfets Q1 and Q2 are both off and switching is disabled. And with no gate drive for Q2, LED1 is off too. IC1 is held in this state until the VAA, VSS, VCC and VB supplies reach sufficient voltage for it to operate. In addition, IC1 can be shut down by external protection circuitry when its CSD pin (pin 5) is pulled low via D5. The additional protection circuitry on the PCB is shown in Fig.6. When CSD is low, P-channel small-signal Mosfet Q4 turns on and this lights LED2 (PROTECT), provided link LK4 is installed. Shutdown also occurs if either Q1 or Q2 passes excessive current, eg, due to a shorted output. In operation, the output current is measured by monitoring the voltage across each Mosfet during the period it is switched on. The Mosfets specified (IRFB5615) have a typical on-resistance of 35mΩ at 25°C. 24  Silicon Chip the delay between one switching off and the other switching on) is set by the two divider resistors (5.6kΩ/4.7kΩ) on DT (pin 9). For this design, it is set at 45ns, the second-fastest option out of four. In the case of Q2, the current threshold before shutdown is set by resistors R7 and R8, at pins 7 and 8 of IC1. Pin 7 is the reference (5.1V), while pin 8 (OCSET) is the over-current threshold input. This is set at 1.08V by the 8.2kΩ and 2.2kΩ resistors and this in turn sets the current shutdown at about 30.8A (ie, 1.08V ÷ 0.035Ω) at 25°C (or slightly less as Q2’s temperature rises during operation). The high-side current limit is set by divider resistors R5 and R6 on IC1’s CSH input (pin 16). This circuit works in a different manner to the low-side current limiting circuit. In this case, diode D4 provides a reference voltage that’s about 0.6V above B+. That’s because VB is 15V above B+ and is applied to D4’s anode via a 10kΩ resistor. This reference voltage is applied to the top of the divider, the bottom end of which goes to the Vs rail (pin 13). As the current through Q1 increases, so does the voltage across it and so VS drops in relation to B+. As a result, the voltage at the CSH pin rises relative to VS until there is about 1V across Q1, at which point the over-current protection kicks in (for more detail on this, refer to International Rectifier application note AN-1138 at www.irf.com/ technical-info/appnotes/an-1138.pdf). The dead time for Q1 and Q2 (ie, Additional protection circuitry (see Fig.6) is used to prevent the amplifier from running should it overheat or develop a large DC offset, or if the supply voltage goes outside the normal operating limits. In any of these events, transistor Q9 switches on and pulls IC1’s CSD input low via diode D5 and a series 100Ω resistor. Jumper link LK3 provides forced shut-down of the amplifier. It’s there to allow the supply voltages to be checked after construction, before the amplifier is allowed to run. Once the supplies have been checked out, LK3 is removed. The over-temperature cut-out is provided using thermistor TH1. This thermistor has a resistance of 4.7kΩ at 25°C, dropping to about 690Ω at 75°C. Thermistor TH1 is monitored by transistor Q5. This transistor’s base is biased to 982mV below ground (ie, -5.6V x 1kΩ ÷ (4.7kΩ + 1kΩ)), while its emitter is 1.9V below ground with TH1 at room temperature. Q5’s emitter will rise to 0.6V above its base when TH1’s resistance drops to 690Ω, ie, when TH1’s temperature rises above a critical point. At that point, Q5 switches on and supplies current to Q9’s base via a 10kΩ currentlimiting resistor, thereby turning on Q9 and shutting down the amplifier. Q6 and ZD6 make up the undervoltage detection circuit. If the supply voltage drops much below 40V, ZD6 no longer conducts and Q6 turns off. This allows current to flow into Q9’s base via the 10kΩ pull-up resistor and a further 10kΩ series resistor and so Q9 turns on and shuts the amplifier down. By contrast, the over-voltage protection kicks in at around 60V, when ZD5 begins to conduct. This again supplies current to Q9’s base to shut the amplifier down. DC offset protection Q7 and Q8 monitor the amplifier’s output DC offset. As shown, the amplifier’s output is fed through a lowpass RC filter consisting of two 100kΩ resistors and a 100µF NP capacitor, to remove frequencies above 0.3Hz. This siliconchip.com.au Parts List: CLASSiC-D Amplifier 1 PCB, code 01108121, 117 x 167mm 1 heatsink, 100 x 33 x 30mm (eg, Jaycar HH-8566, Altronics H0560A cut to 30mm) 1 22µH 5A inductor (L1) (ICE Components 1D17A-220M [X-ON, Mouser] or Sagami 7G17A-220MR) 1 chassis-mount 45° 6.4mm single spade terminal (to secure TH1) 3 TO-220 insulating washers & bushes 1 solder lug 4 M205 PCB-mount fuse clips 1 NTC thermistor 4.7kΩ at 25°C (TH1) 2 5A fast blow M205 fuses (F1,F2) 1 vertical PCB-mount RCA socket (Altronics P0131) (CON1) and/or 1 horizontal PCB-mount RCA socket (Jaycar PS-0279) (CON1) 1 3-way PCB mount screw terminal (5.08mm pin spacing) (CON2) 1 2-way PCB mount screw terminal (5.08mm pin spacing) (CON3) 2 2-way pin headers (2.5mm spacing) (LK1,LK3) 1 3-way pin header (2.5mm spacing) (LK2) 1 polarised 2-way header (2.54mm spacing) (LK4) 2 3/16-inch x 20mm-long machine screws (to secure heatsink to PCB) 5 M3 x 10mm machine screws 11 PC stakes 1 50mm length of 0.7mm tinned copper wire 4 jumper shunts (shorting links) 4 M3 x 9mm tapped Nylon spacers 4 M3 x 5mm machine screws 1 8-pin DIL IC socket 1 25-turn 2kΩ trimpot (VR1) Semiconductors 1 IRS2092S Digital Audio Amplifier IC [SOIC-16] (IC1)* 1 TLE2071CP op amp (IC2)* prevents normal AC signal excursions from tripping the circuit. A second filter consisting of a 1kΩ resistor and 10µF capacitor follows. This is required to prevent false triggering due to high-frequency signals siliconchip.com.au 2 IRFB5615 150V 25A N-channel digital audio Mosfets (Q1,Q2)* 1 TIP31C NPN transistor (Q3) 1 BS250P P-channel DMOS FET (Q4) 3 BC327 PNP transistors (Q5,Q7,Q8) 2 BC337 NPN transistors (Q6,Q9) 1 3mm blue LED (LED1) 1 3mm red LED (LED2) 3 1N4004 1A diodes (D1,D2,D6) 2 MUR120 super-fast diodes (D3,D4) 1 1N4148 diode (D5) 2 15V 1W zener diodes (ZD1,ZD2) 2 5.6V 1W zener diodes (ZD3,ZD4) 1 68V 1W zener diode (ZD5) 1 39V 1W zener diode (ZD6) Capacitors 2 470µF 63V or 100V low-ESR PCB-mount electrolytic 1 100µF 50V non-polarised PCB-mount electrolytic 2 220µF 10V low-ESR electrolytic 4 100µF 25V low-ESR electrolytic 1 47µF 50V non-polarised PCB-mount electrolytic 1 10µF 16V PCB-mount electrolytic 1 10µF non-polarised PCB-mount electrolytic 3 1µF MMC 1 470nF 250VAC X2 MKP 2 100nF 250VAC X2 MKP 3 100nF 100V MKT 1 1nF 100V MKT 3 560pF MKT (Rockby 35636 or 32733) (supplied with PCB) 1 150pF 100V (minimum) ceramic or MKT Resistors (0.25W, 1%) 3 100kΩ 1 68kΩ (R1) 1 47kΩ (R4) 1 47kΩ 7 10kΩ 1 9.1kΩ 1 8.2kΩ (R7) 1 7.5kΩ (R9) 1 6.8kΩ (R6) 1 5.6kΩ finding their way into Q7 and Q8. If the amplifier’s output has a positive DC offset, Q7’s emitter is pulled 0.6V above its base (ground). As a result, Q7 turns on and so Q9 also turns on and the amplifier shuts down 4 4.7kΩ 4 4.7kΩ 1W 5% (R2A, R2B, R3A, R3B) 1 4.3kΩ (Rf) 1 3.3kΩ (R5) 2 2.2kΩ 1 2.2kΩ (R8) 1 1kΩ 1W 5% (R10) 2 1kΩ 1 330Ω 2 100Ω 2 22Ω 2 10Ω 1W 5% 2 10Ω 1 4.7Ω Speaker Protector 1 PCB, code 01108122, 76 x 66mm 2 5-way PCB-mount screw terminal block or 2 x 2-way and 2 x 3-way (CON1,CON2) 2 polarised 2-way headers (2.54mm pitch) (Input1 & Input2) 1 DPDT 24V 10A PCB-mount relay (RLY1) (Altronics S4313) 1 200mm length of medium-duty red hookup wire 1 200mm length of medium-duty black hookup wire 4 M3 x 9mm tapped Nylon spacers 4 M3 x 5mm machine screws Semiconductors 2 4N28 optocouplers (OPTO1, OPTO2) 1 STP16NE06 Mosfet (Q10) 2 1N4148 diodes (D6,D7) 1 1N4004 diode (D8) 1 15V 1W zener diode (ZD7) 1 3mm red LED (LED3) Capacitors 1 4.7µF 16V PC electrolytic Resistors (0.25W, 1%) 1 1MΩ 3 1kΩ 1 100kΩ 1 820Ω 5W 1 10kΩ 1 22Ω 1 4.7kΩ 1W * These parts are available from element14, Mouser and Digi-Key as before. Similarly, for a negative DC offset, Q8’s base is pulled 0.6V below its emitter and Q8 and Q9 turn on. Speaker protector Note that even though IC1 turns off November 2012  25 CLASSiC-D Loudspeaker Protector R12 1 + PROTECT INPUT 1 D6 1N4148 1k K K OPTO1 4N28 100k A 5 2 ZD7 15V 1W B+ (50V) 4.7k 1W 820  5W R11 0V CON2 RLY1*  K 4 D8 1N4004 A OUT– A 1 + PROTECT INPUT 2 D7 1N4148 1k K IN– CHANNEL OUT+ 1 OPTO2 4N28 2 IN+ OUT– 5 IN– CHANNEL 4 OUT+  A CON1 D 1k V+ R11 R12 50V 35V 25V 820  5W 4.7k 1W 330  1W 2.7k 0.5W 22  0.5W 22 4.7 F 1.5k 0.5W G 10k Q10 STP16NE06 A S 1M K LED 1N4148 A SC K PROTECT  LED3 * RLY1 HAS A 24V/650  COIL 2012 2 IN+ 1N4004 A K ZD1 A K K A STP16NE06 G D D S CLASSiC-D AMPLIFIER – SPEAKER PROTECTOR Fig.7: the CLASSiC-D speaker protection circuit suits mono, stereo or bridged mono amplifiers. If either fault input is triggered, it pulls the gate of Q10 low via its associated optocoupler and 1kΩ resistor. This turns off RLY1, disconnecting the speaker(s) and lights LED3. Once the fault(s) clear, Q10 turns on after a delay, switching RLY1 on (and LED3 off) and connecting the speaker(s) to the amplifier module(s). T HE SPEAKER PROTECTOR makes use of the fact that whenever the amplifier is in protection mode, the Protect LED (LED2) is lit. By monitoring this, the protector circuit can disconnect the speaker from the amplifier whenever LED2 lights up. Since there is a delay after power-up before LED2 turns off and since it turns back on for a short time when you switch the unit off, it also provides a “de-thump” feature. Fig.7 shows the stereo speaker protector circuit. For each module, an optocoupler (OPTO1 & OPTO2) connects in series with the protect LED of each amplifier module via LK4, which acts as a connector. When the protect LED turns on, the relevant optocoupler LED is also lit and this switches on the internal phototransistor. This in turn pulls the gate of Mosfet Q10 low via a 1kΩ resistor and 22Ω gate resistor. As a result, Q10 turns off and this turns the relay off, opening its COM and NO contacts and disconnecting the speaker from the amplifier. Conversely, if both phototransistors 26  Silicon Chip are off (ie, no amplifier protect LED is lit), Mosfet Q10’s gate is pulled up to 15V via a 100kΩ resistor. It takes about 4s for the 47μF capacitor to charge, after which Q10 turns on. This then turns on the relay which connects the speaker(s) to the amplifier module(s). Note that if there is only one amplifier module, the second input on the Loudspeaker Protector is left unconnected. The +15V supply rail for the optocouplers is derived from the B+ rail using 15V zener diode ZD7 and a 4.7kΩ 1W currentlimiting resistor. By contrast, the 24V relay coil is powered from the 50V supply via an 820Ω dropping resistor. This resistor forms a voltage divider with RLY1’s coil resistance to limit the coil voltage to about 24V. Diode D8 is included to quench any back-EMF spikes that may be generated when the relay switches off. LED3 turns on when Q10 and the relay are off (eg, if there is a fault condition). Conversely, when Q10 and the relay are on, there is virtually no voltage across LED3 and it turns off. siliconchip.com.au 1 THD vs Power, 1kHz, 8Ω, 22kHz BW 09/28/12 12:16:20 1 0.5 0.5 normal mode inverting mode 0.2 0.1 THD+N % THD+N % 0.05 0.02 0.05 0.02 0.01 0.01 0.005 0.005 0.002 0.002 0.001 .05 .1 x=138.9W .2 .5 1 2 5 10 20 Power (Watts) y=0.65784% 0.001 .05 .1 50 100 200 Fig.8: THD+N plotted against power level into an 8Ω resistive load. The power supply was set at ±55V and we used an Audio Precision AUX-0025 Switching Amplifier Measurement Filter in addition to a 20Hz-22kHz bandpass filter in the Audio Precision System Two. .5 1 2 5 10 20 Power (Watts) y=0.74525% 50 100 200 +3 Frequency Response, 10W, 80k BW 09/28/12 12:38:47 +2 8Ω normal mode 4Ω normal mode 8Ω inverting mode 4Ω inverting mode +1 0 Relative Power (dBr) 0.2 x=228.5W .2 Fig.9: THD+N plotted against power level into a 4Ω resistive load (conditions otherwise identical to Fig.8). Note that in both cases, there is higher distortion across most of the audio band in inverting mode compared to normal mode. This is due to op amp IC2. THD vs Frequency, 10W, 80kHz BW 09/28/12 12:37:20 0.5 0.1 THD+N % normal mode inverting mode 0.2 0.1 1 THD vs Power, 1kHz, 4Ω, 22kHz BW 09/28/12 12:23:28 0.05 0.02 0.01 -1 8Ω 4Ω -2 -3 -4 -5 -6 -7 0.005 -8 0.002 0.001 -9 20 50 100 200 500 1k 2k Frequency (Hz) 5k 10k 20k Fig.10: distortion versus frequency at 10W for 4Ω and 8Ω loads. As you would expect, distortion increases above the baseline for frequencies above about 1kHz. The 8Ω performance is better than 4Ω below 600Hz and above 10kHz but they are quite similar otherwise. its driver outputs should a significant DC offset occur, this will not necessarily save the connected loudspeaker. That’s because if one of the output Mosfets fails and goes short circuit, IC1 will be unable to turn it off and the full supply voltage will be applied to the loudspeaker, causing its voice coil to overheat and possibly catch fire. To deal with this possibility, we have produced an additional small PCB which acts in conjunction with one or two CLASSiC-D amplifier modules to protect the speaker(s), even if an output Mosfet fails. It uses a relay siliconchip.com.au -10 10 20 50 100 200 500 1k 2k 5k 10k 20k Frequency (Hz) 100k Fig.11: frequency response for the two most common load impedances. The input signal level and reference level is identical for both plots so this also demonstrates the relatively low output impedance of the amplifier. The difference is due to the output LC filter. to break the connection between the failed module and the speaker. The speaker protector circuit and its operation are described in the panel on the previous page (see Fig.7). Power supply The CLASSiC-D amplifier module is designed to operate from nominal ±50V supply rails but will operate over the range of ±40-60V. For testing, we used the Ultra-LD Mk.3 Power Supply, as described in the September 2011 issue. This uses a 300VA 40V-0-40V toroidal transformer, a 35A bridge rectifier and 15,000µF filter capacitor banks across each rail. While this has a nominal output of ±57V, it’s perfectly suitable for use with this amplifier module and will give higher output power than from a ±50V supply. A supply of ±57V will give an output power of about 150W into 8Ω and 250W into 4Ω with 1% THD + N. On the other hand, you could quite easily substitute a 35V-0-35V transformer (which is a bit easier to obtain) to get close to ±50V from the same supply module with slightly reduced output power. November 2012  27 Fig.12: waveform at idle (ie, no signal applied). Output output waveform, idle, post-filter This shows the switching frequency ofΩaround 500kHz Signal-to-Noise Ratio: 103dB (8Ω & 4 ) and the residual amplitude of about 0.5V RMS. Note Inputthe sensitivity: RMS the square-wave output that filter has~2V converted into something resembling a sinewave. Fig.13: filtered the8Ω amplifier (yellow, top) Yellow: the 1kHz 100Woutput outputof into , post-filter, 22kHz LPF along with 100W the distortion residual (green) at 100W into Red: 1kHz output into 8Ω, post-filter 8Ω (THD+N 0.026%). The (0.026% red traceTHD+N) shows the output of Green: distortion residual the amplifier after the LC filter but with no additional filtering; you can just see the high frequency “fuzz”. Fig.14: behaviour at >230W Clippingclipping behaviour, 230W into 4Ω into 4Ω (±55V) Note how the self-oscillation frequency drops at the output extremes and so the output tends to “bounce” off the rails when driven this hard. The distortion waveform is shown in green and is quite similar to that of a Class-AB design. Fig.15: this scope grab shows 10kHz output 10kHz before & the afterswitching LC filter output of the amplifier with a 10kHz sinewave input (blue) and the reconstructed waveform after the LC low-pass filter (red). Again note how the frequency shifts as the duty cycle changes, with it being highest around the zero crossing. We wouldn’t go any higher than ±57V. The filter capacitors on the CLASSiC-D amplifier module are only rated for 63V (like the capacitors in the Ultra-LD Mk.3 Power Supply) and due to mains voltage variations, they may already operate close to that limit with a 40V-0-40V transformer. If you want to build two (or four!) modules into one case, you can have them share a single power supply although that will reduce the continuous output power available (more so with 4Ω loads than 8Ω loads). It won’t affect the music power much though. Alternatively, you can use separate 28  Silicon Chip power supplies or a bigger transformer with a larger filter capacitor bank. For example, if you want to bridge two CLASSiC-D modules to get 500W into 8Ω and run them off a single power supply, you will need a transformer rated at 500VA or more. If you want to run the module from a lower voltage supply, you can do so but it will deliver less power. In addition, several components need to be changed if the supply voltage will be below 40V (more on this in Pt.2 next month). That’s all for now. Next month, we will present the two PCB overlays and give details on how to build, set-up and test the amplifier module. References & links (1). IR Application Note AN-1138 (IRS­ 2092S) – www.irf.com/technical-info/ appnotes/an-1138.pdf (2). IRS2092 Data – www.irf.com/product-info/datasheets/data/irs2092.pdf (3). Introduction to Electroacoustics and Audio Amplifier Design, Second Edition – http://users.ece.gatech.edu/ mleach/ece4435/f01/ClassD2.pdf (4). AN-1071 Class D Amplifier Basics – www.irf.com/technical-info/appnotes/ SC an-1071.pdf siliconchip.com.au