Silicon ChipA Stereo Audio Compressor - January 2012 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Australia's energy needs are in the hands of the clowns
  4. Feature: Arduino: What’s All The Fuss About? by Jonathan Oxer
  5. Project: A Stereo Audio Compressor by John Clarke
  6. Project: Build A Simple AM Radio by John Clarke
  7. Project: Dorji 433MHz Wireless Data Modules by Stan Swan
  8. Project: 3-Input Stereo Audio Switcher by John Clarke & Greg Swain
  9. Feature: Playing USB-Stick & SD/MMC Card Music Without A PC by Ross Tester
  10. Vintage Radio: The AWA PA1002 50W Valve PA Amplifier by Rodney Champness
  11. Book Store
  12. Market Centre
  13. Advertising Index
  14. Outer Back Cover

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

You can view 26 of the 104 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 "A Stereo Audio Compressor":
  • Stereo Audio Compressor PCB [01201121] (AUD $15.00)
  • Stereo Audio Compressor front & rear panels [0120112P1/2] (PCB, AUD $15.00)
  • Stereo Audio Compressor PCB pattern (PDF download) [01201121] (Free)
  • Stereo Audio Compressor front & rear panel artwork (PNG download) [01201122/3] (Free)
Items relevant to "Build A Simple AM Radio":
  • AM Radio PCB [06101121] (AUD $10.00)
  • AM Radio PCB pattern (PDF download) [06101121] (Free)
  • AM Radio panels artwork (PDF download) (Panel Artwork, Free)
Articles in this series:
  • Amateur Radio (November 1987)
  • Amateur Radio (November 1987)
  • Amateur Radio (December 1987)
  • Amateur Radio (December 1987)
  • Amateur Radio (February 1988)
  • Amateur Radio (February 1988)
  • Amateur Radio (March 1988)
  • Amateur Radio (March 1988)
  • Amateur Radio (April 1988)
  • Amateur Radio (April 1988)
  • Amateur Radio (May 1988)
  • Amateur Radio (May 1988)
  • Amateur Radio (June 1988)
  • Amateur Radio (June 1988)
  • Amateur Radio (July 1988)
  • Amateur Radio (July 1988)
  • Amateur Radio (August 1988)
  • Amateur Radio (August 1988)
  • Amateur Radio (September 1988)
  • Amateur Radio (September 1988)
  • Amateur Radio (October 1988)
  • Amateur Radio (October 1988)
  • Amateur Radio (November 1988)
  • Amateur Radio (November 1988)
  • Amateur Radio (December 1988)
  • Amateur Radio (December 1988)
  • Amateur Radio (January 1989)
  • Amateur Radio (January 1989)
  • Amateur Radio (April 1989)
  • Amateur Radio (April 1989)
  • Amateur Radio (May 1989)
  • Amateur Radio (May 1989)
  • Amateur Radio (June 1989)
  • Amateur Radio (June 1989)
  • Amateur Radio (July 1989)
  • Amateur Radio (July 1989)
  • Amateur Radio (August 1989)
  • Amateur Radio (August 1989)
  • Amateur Radio (September 1989)
  • Amateur Radio (September 1989)
  • Amateur Radio (October 1989)
  • Amateur Radio (October 1989)
  • Amateur Radio (November 1989)
  • Amateur Radio (November 1989)
  • Amateur Radio (December 1989)
  • Amateur Radio (December 1989)
  • Amateur Radio (February 1990)
  • Amateur Radio (February 1990)
  • Amateur Radio (March 1990)
  • Amateur Radio (March 1990)
  • Amateur Radio (April 1990)
  • Amateur Radio (April 1990)
  • Amateur Radio (May 1990)
  • Amateur Radio (May 1990)
  • Amateur Radio (June 1990)
  • Amateur Radio (June 1990)
  • Amateur Radio (July 1990)
  • Amateur Radio (July 1990)
  • The "Tube" vs. The Microchip (August 1990)
  • The "Tube" vs. The Microchip (August 1990)
  • Amateur Radio (September 1990)
  • Amateur Radio (September 1990)
  • Amateur Radio (October 1990)
  • Amateur Radio (October 1990)
  • Amateur Radio (November 1990)
  • Amateur Radio (November 1990)
  • Amateur Radio (December 1990)
  • Amateur Radio (December 1990)
  • Amateur Radio (January 1991)
  • Amateur Radio (January 1991)
  • Amateur Radio (February 1991)
  • Amateur Radio (February 1991)
  • Amateur Radio (March 1991)
  • Amateur Radio (March 1991)
  • Amateur Radio (April 1991)
  • Amateur Radio (April 1991)
  • Amateur Radio (May 1991)
  • Amateur Radio (May 1991)
  • Amateur Radio (June 1991)
  • Amateur Radio (June 1991)
  • Amateur Radio (July 1991)
  • Amateur Radio (July 1991)
  • Amateur Radio (August 1991)
  • Amateur Radio (August 1991)
  • Amateur Radio (September 1991)
  • Amateur Radio (September 1991)
  • Amateur Radio (October 1991)
  • Amateur Radio (October 1991)
  • Amateur Radio (November 1991)
  • Amateur Radio (November 1991)
  • Amateur Radio (January 1992)
  • Amateur Radio (January 1992)
  • Amateur Radio (February 1992)
  • Amateur Radio (February 1992)
  • Amateur Radio (March 1992)
  • Amateur Radio (March 1992)
  • Amateur Radio (July 1992)
  • Amateur Radio (July 1992)
  • Amateur Radio (August 1992)
  • Amateur Radio (August 1992)
  • Amateur Radio (September 1992)
  • Amateur Radio (September 1992)
  • Amateur Radio (October 1992)
  • Amateur Radio (October 1992)
  • Amateur Radio (November 1992)
  • Amateur Radio (November 1992)
  • Amateur Radio (January 1993)
  • Amateur Radio (January 1993)
  • Amateur Radio (March 1993)
  • Amateur Radio (March 1993)
  • Amateur Radio (May 1993)
  • Amateur Radio (May 1993)
  • Amateur Radio (June 1993)
  • Amateur Radio (June 1993)
  • Amateur Radio (July 1993)
  • Amateur Radio (July 1993)
  • Amateur Radio (August 1993)
  • Amateur Radio (August 1993)
  • Amateur Radio (September 1993)
  • Amateur Radio (September 1993)
  • Amateur Radio (October 1993)
  • Amateur Radio (October 1993)
  • Amateur Radio (December 1993)
  • Amateur Radio (December 1993)
  • Amateur Radio (February 1994)
  • Amateur Radio (February 1994)
  • Amateur Radio (March 1994)
  • Amateur Radio (March 1994)
  • Amateur Radio (May 1994)
  • Amateur Radio (May 1994)
  • Amateur Radio (June 1994)
  • Amateur Radio (June 1994)
  • Amateur Radio (September 1994)
  • Amateur Radio (September 1994)
  • Amateur Radio (December 1994)
  • Amateur Radio (December 1994)
  • Amateur Radio (January 1995)
  • Amateur Radio (January 1995)
  • CB Radio Can Now Transmit Data (March 2001)
  • CB Radio Can Now Transmit Data (March 2001)
  • What's On Offer In "Walkie Talkies" (March 2001)
  • What's On Offer In "Walkie Talkies" (March 2001)
  • Stressless Wireless (October 2004)
  • Stressless Wireless (October 2004)
  • WiNRADiO: Marrying A Radio Receiver To A PC (January 2007)
  • WiNRADiO: Marrying A Radio Receiver To A PC (January 2007)
  • “Degen” Synthesised HF Communications Receiver (January 2007)
  • “Degen” Synthesised HF Communications Receiver (January 2007)
  • PICAXE-08M 433MHz Data Transceiver (October 2008)
  • PICAXE-08M 433MHz Data Transceiver (October 2008)
  • Half-Duplex With HopeRF’s HM-TR UHF Transceivers (April 2009)
  • Half-Duplex With HopeRF’s HM-TR UHF Transceivers (April 2009)
  • Dorji 433MHz Wireless Data Modules (January 2012)
  • Dorji 433MHz Wireless Data Modules (January 2012)
Items relevant to "3-Input Stereo Audio Switcher":
  • 3-Input Audio Selector (Set of 2 PCBs) [01101121/2] (AUD $30.00)
  • PIC16F88-I/P programmed for the 3-Input Stereo Audio Switcher [0111211A.HEX] (Programmed Microcontroller, AUD $15.00)
  • Firmware HEX file and ASM source code for the 3-Input Switcher [0111211A] (Software, Free)
  • 3-Input Stereo Audio Selector Main PCB pattern (PDF download) [01101121] (Free)
  • 3-Input Stereo Audio Selector Switch PCB pattern (PDF download) [01101122] (Free)
Items relevant to "Playing USB-Stick & SD/MMC Card Music Without A PC":
  • 3-pin JST plug to bare wires cable, 100mm (Component, AUD $2.00)

Purchase a printed copy of this issue for $10.00.

By JOHN CLARKE Do you hate the way the sound level on your TV suddenly jumps during the advert breaks? Or do you find that the sound levels vary widely when switching between digital TV stations? Or maybe you have problems listening to CDs or MP3s in your car or against the background din during a party? Are the soft parts too soft and the loud parts too loud? This Stereo Compressor will solve that problem. It reduces the dynamic range of the signal while still maintaining clean sound. The unit is also ideal for use with PA systems. 24  Silicon Chip siliconchip.com.au Features & Specifications Main Features • • • • Stereo compression Input level & volume controls Power switch & indicator LED Several power supply options Specifications Signal-To-Noise Ratio...................-75dB (20Hz - 20kHz filter) and -79dB “A” weighted with respect to 1V in and 1V out THD+N............ 0.005% with compression disabled; 0.007% <at> 10kHz & 2:1 compression; 0.17% <at> 1kHz & 2:1 compression; 1.6% <at> 100Hz & 2:1 compression Channel Separation......................................................... 58dB (unweighted) Frequency Response ....................................-1.5dB at 10Hz, -3dB at 33kHz Compression Ratio ................... typically 2:1 from +20dB to -20dB input with respect to 0.318V RMS at the compressor input – see Fig.3 Power Consumption............... 17mA at 15VDC; 40mA for supplies over 15V; (±40mA for supplies over ±15V) C OMPACT DISC PLAYERS and many MP3 players give great sound quality but they usually have a wide dynamic range. That means that the sound level can range from almost inaudible through to very loud, all without touching the volume control. That can be a problem in noisy environments. For example, in a car, while the loud passages can be heard, the soft parts may well be lost due to road and engine noise. A similar problem can occur with PA systems, where crowd noise can drown out quiet passages in the sound. In those situations, simply turning up the volume does not solve the problem. While the quiet bits may then be more audible, the loud sections can be ear-shattering and may even overload the amplifier, causing audible distortion. What we need to do instead is “compress” the dynamic range of the signal so that the loud parts are not quite so loud and the soft parts are not nearly so quiet. And that’s what this Stereo Compressor does – it continuously adjusts the signal level by amplifying the quiet passages and attenuating the louder passages, so that the overall volume range is much reduced. Listening to TV A common annoyance for TV viewsiliconchip.com.au ers is the way the average sound level suddenly jumps during advertising breaks or when you switch between digital stations. Some stations have quite low sound levels and so you have to turn up the volume. Then you switch channels and you get blasted! That’s bad enough but it’s much worse if you’re listening via headphones. Again, an audio compressor is the answer, assuming that you’re using an external amplifier. By making the volume more constant, it will enable you to set the volume to a level that’s comfortable at all times. It sure beats having to hurriedly hit the “mute” button each time there’s an ad break. PA systems & mood music Apart from its use in cars and for listening to TV via headphones, an audio compressor is a “must-have” item when it comes to PA systems and mood music. That applies whether you want to provide background music at a dinner party or you want to pipe music into a PA system at a restaurant. In each case, the problem is the same – all those people talking at once creates a high level of ambient noise which drowns out the soft passages in the music. Once again, an audio compressor is the answer to this problem. Not all audio compressors are as effective as this design though. One problem with some units is that they markedly increase the noise at low signal levels due to the much increased gain at those levels. However, this problem is largely avoided in our unit because it features a “downward expander”. This reduces the gain once the incoming signal drops below a certain level (or threshold point). As a result, the noise produced is considerably less than that from units that lack downward expansion. Presentation As shown in the photos, the Stereo Compressor is housed in a small slim­line plastic case. It has two rot­ary controls, one to adjust the input level (which sets the amount of compression) and the other to adjust the volume (or output level). A power switch and an indicator LED are also included on the front panel. Four RCA connectors on the rear panel are used for the inputs and outputs. Various power supply options are available for the Stereo Compressor. It can be powered from AC or DC supplies, eg, a DC or AC plugpack, a 12V battery in a car or from the supply rails of a power amplifier. Table 2 shows the various options. How it works Let’s now take a look at the circuit details – see Fig.1. There are two separate signal paths: via IC1a, IC2a & IC3a for the right channel and via IC1b, IC2b & IC3b for the left channel. These two signal paths are identical so we’ll just describe the operation of the right channel. The incoming audio signal is ACcoupled to op amp IC1a via a 10Ω resistor and a 10µF NP (non-polarised) capacitor. A 470pF capacitor bypasses RF (radio frequency) signals to ground, January 2012  25 26  Silicon Chip siliconchip.com.au CON1 SC 100k 10 F NP 100k 10 F NP LK4 10k S1b 4 V– 1 7 A K D2 1N4004 K A R2* 16V TRIM IN A A K K GND 4 15 14 10 OUT 2 ZD2 15V ZD1 15V INV 5 IN RECT 3 7 INV 12 IN RECT GAIN IC2a SA571 C RECT 8 THD 6 1 V+ TRIM IN OUT GAIN IC2b SA571 C RECT 9 THD 11 16 13 Vcc * FOR VALUES SEE TABLE 1000 F 16V 1000 F 470pF 10 F 1 F RB 1M 470pF 10 F 1 F TPR LEVEL R1* LOG VR1a 10k 10 F NP LOG VR1b 10k 10 F NP D1 1N4004 470pF 10k IC1a POWER S1a 2 3 470pF 10k IC1b IC1: TL072 10k 6 5 8 STEREO COMPRESSOR TPGND1 470pF 10 470pF 10 V– TPL RB 1M K A  LED1 4.7k 47k 2.2 F NP 4.7 F NP 47k 2.2 F NP 4.7 F NP 10 F 10 F 47k 10 F 47k 10k LOG VR2a 10k 10 F 10k LOG VR2b 10k 10 F 100 F 2 3 A 2 3 6 5 K 7 4 IC4 IC3b 8 6 IC3a 4 1 7 150 IC3: TL072 IC4: TL071 ZD1, ZD2 100k 1 F NP VOLUME 100k 1 F NP A K D1, D2 V– Vcc/2 V+ 100k 150 10 F NP V– Vcc/2 100k 150 10 F NP TPGND2 V– V– 35V 10 F K A LED CON4 LK2 RIGHT OUT LK3 LK1 LEFT OUT GND1 CON3 GND2 V+ Fig.1: the incoming audio signal to each channel is amplified by op amps IC1a & IC1b and then fed to IC2 which is an SA571 stereo compandor. IC2 performs the signal compression and its outputs then drive buffer stages IC3a & IC3b via output level control VR2. 2012 CON5 – DC/AC IN 0 + CON6 DC + IN – RIGHT IN LEFT IN CON2 35V 10 F V+ while pin 3 of IC1a is tied to ground via a 100kΩ resistor to set the bias for this stage. This 100kΩ resistor connects to either the signal ground or to a halfsupply ground, depending on the power supply configuration. In particular, note the two different ground symbols used in the circuit. If a dual-rail (±) supply is used to power the op amp, the bias for IC1a is set to 0V so that the op amp’s output can swing symmetrically above and below 0V. On the other hand, if a single-rail supply is used, the op amp is biased to allow its output to swing above and below the half-supply voltage. IC1a operates as a non-inverting amplifier with a gain of 2, as set by the 10kΩ feedback resistor between pins 1 & 2 and the 10kΩ resistor from pin 2 to ground. The 470pF capacitor across the feedback resistor rolls off the high-frequency response above 33kHz. IC1a’s output is AC-coupled via a 10µF NP capacitor to the top of VR1a. This potentiometer acts as a level control and is adjusted for optimal operation of the following compressor stage based on IC2a. Vcc 13 IN R3 20k 5(12) 6(11) R4 30k OP AMP VREF OUT 7(10) 1.8V C F2* 4 RDC * RB* 2(15) R1 10k RDC * RECTIFIER C DC * C F1* 1(16) GAIN R2 20k G C RECT* 3(14) * EXTERNAL COMPONENTS PIN NUMBERS IN BRACKETS ARE FOR SECOND CHANNEL Fig.2: the basic configuration of each compressor stage inside IC2. The gain element is placed in the feedback network of the op amp and is controlled by the filtered output from the rectifier. Fig.3: this graph plots the compressor’s output as a function of its input signal. It provides a nominal 2:1 compression but it has a non-linear response with resistor RB in (see text). Compressor Response (with respect to 1V) 10 0 Compressor circuit siliconchip.com.au -10 (smoothed) to provide a DC voltage that controls the gain element. If the signal level is low, then the DC -20 control voltage is low and the gain element’s resistance is high. As a result, the op amp operates with -30 high gain and so low-level signals are boosted. Conversely, if the input -40 signal level is high, the control voltage is also high and this reduces the gain element’s resistance to lower -50 the gain. So the overall effect is that low-level signals are boosted while high level -60 signals are reduced. Fig.3 plots the compressor’s output against its input signal level. It’s set up to -70 provide a nominal 2:1 com20 pression. Note, however, that at low signal levels the gain increase is non-linear and is reduced, due to the addition of resistor RB. Without this resistor, the compressor would operate with a nominal 2:1 compression for signals right down to -80dB (ie, 80dB below Compressor Output (dB) IC2 is an SA571 stereo compandor IC. The word “compandor” is a contraction of the words compressor and expander and it means that this IC can be used as either a signal compressor or a signal expander. In this circuit, the SA571 has been configured to operate as a compressor. Its basic operation is shown in Fig.2 (one channel only shown). It comprises two full-wave averaging rectifiers, two gain elements and a dual op amp for stereo applications. When used as a compressor, the gain element is placed in the feedback loop, between the op amp’s output and its inverting input. The input signal is applied to the inverting input via a 20kΩ resistor (R3), while the non-inverting input is biased above ground to allow a symmetrical output swing. In practice, the op amp’s output is biased to (1 + (2RDC ÷ R4)) x Vref. Vref is about 1.8V, R4 is 30kΩ and the external RDC resistors in our circuit are 47kΩ. As a result, the op amp’s output sits at about 7.44V. During operation, the full-wave averaging filter monitors the op amp’s output and rectifies the signal. This rectified signal is then averaged RB Out RB In 10 0 -10 -20 -30 -40 -50 -60 Compressor Input (dB) the 0dB reference) and this would lead to a significant increase in noise. The SA571 requires only a few external parts to produce a working compressor stage. As shown in January 2012  27 -70 WIRE EARTHING THE BODIES OF VR1 & VR2 LED1 VOLUME 10k 100 F LK4 D2 4004 R1 (SEE TABLE) 15V IC3 TL072 100k 150 150 TP GND2 100k 100k 10 F NP R2 (SEE TABLE) 16V 10 F Vcc/2 GND2 GND1 V– are tied together using link LK2 (see Table 2). This biases the op amp inputs at 0V so that the signal swings symmetrically above and below ground. 1000 F ZD1 470pF LK1 LK2 LK3 10 10 TP V– 1 F NP – 0 + Using an AC supply CON5 47k 470pF 10 F 10k 10 F NP 1000 F TP V+ 100k 470pF 10 F NP 10 F 10 F NP CON1 CON2 CON4 CON3 R in L in R out L out CON6 Fig.4: follow this parts layout diagram to build the PCB. Resistors R1 & R2 and links LK1-LK4 are chosen from Table 2. Fig.1, the signal from VR1a’s wiper is AC-coupled to IC2a’s pin 6 input, while the output at pin 7 is AC-coupled to the gain cell at pin 3 and the rectifier at pin 2. The two associated 47kΩ resistors are in the feedback path between the internal op amp’s output (pin 7) and its inverting input (pin 5) and are the RDC resistors shown in Fig.2. The smoothing (averaging) capacitor for the rectifier is at pin 1 while resistor RB (1MΩ) is connected to the V+ rail to provide non-linear compression at low levels (to reduce noise). A 470pF capacitor is used to decouple the distortion trim input at pin 8 (this input is not used here). IC2a’s output at pin 7 is AC-coupled to volume control VR2a. This sets the signal level applied to output buffer stage IC3a. IC3a’s pin 3 input is biased using a 100kΩ resistor to ground. As before, this ground point can be set to either 0V or to half-supply, depending on the power supply used. IC3a operates as a unity gain buffer stage. Its output appears at pin 1 and 28  Silicon Chip Fig.5: bend the leads for the LED as shown here before installing it on the PCB. The centre line of the lens must be 6mm above the board surface. 16V 4.7 F NP 10 F 100k 1 F NP D1 1M RB 150 IC2 SA571 470pF 470pF 10k 10k IC1 TL072 470pF IC4 TL071 10 F NP 10 F 10k 10k 47k 47k 10 F 10 F 10 F NP 2.2 F NP 47k 1M BOARD 8mm 15V RB 2.2 F NP 4.7 F NP 1 F 10 F 4004 TPL 1 F S1 A K ZD2 TPR STEREO COMPRESSOR VR2 2x10k LOG LED1 4.7k 10 F VR1 2x10k LOG R L 12110110 R OSSERP M O C 6mm TP GND1 100k LEVEL this is then fed to output socket CON4 via a 150Ω resistor and a 10µF NP capacitor. The 150Ω resistor isolates IC3a’s output from the capacitance of the output leads, to prevent instability. Power supply Power for the circuit can come from either a 12-30V DC source, a ±12-25V DC source or an 11-25V AC source. The current consumption is about 40mA. The simplest supply arrangement is to use a ±12-30V DC source (ie, a dualrail supply, as often found in stereo amplifiers). This is fed into CON5 and switched by S1a & S1b. Diodes D1 & D2 provide reverse polarity protection and the following 1000µF capacitors filter the supply rails to reduce ripple. Zener diodes ZD1 & ZD2 limit the supply rails to ±15V while resistors R1 & R2 limit the current through ZD1 & ZD2. The values of these resistors depend on the external supply voltage and are chosen from Table 2. With this supply arrangement, the two different grounds on the circuit An 11-25V AC supply can also be used to derive dual (±) supply rails. In this case, the “+” and “-” rails are connected together immediately following CON5 using link LK4. One side of the AC supply then goes to 0V, while the other goes to either the “+” input or the “-” input. Alternatively, the AC supply can be fed in via CON6. With this supply configuration, D1 & D2 function as half-wave rectifiers, with filtering again provided by the two 1000µF capacitors. D1 conducts on the positive half-cycles to produce the positive rail, while D2 conducts on the negative half-cycles to produce the negative rail. As before, the two grounds (GND1 & GND2) are connected using link LK2 and current-limiting resistors R1 & R2 are selected using Table 2. 12-30V DC supply The arrangement is a bit more complicated for a 12-30V DC supply. That’s because the signal can no longer swing below the 0V rail, since there’s no negative supply. As a result, the op amps must be biased to a half-supply voltage, so that the signal can swing symmetrically about this voltage. This half-supply voltage is derived using a voltage divider consisting of two 10kΩ resistors between the positive supply rail and ground. A 100µF capacitor filters this half-supply rail and this is then fed to the non-inverting input (pin 3) of IC4. IC4 is wired as a unity gain buffer stage. Its output at pin 6 provides the half supply via a 150Ω decoupling resistor. This half-supply rail is then used to bias op amps IC1 & IC2. In this case, links LK1 & LK3 are siliconchip.com.au mechanically robust, look good and the holes are all pre-drilled. The main PCB is designed to mount onto integral bushes within the box. Make sure the board fits correctly within the box and that the mounting holes line up with these bushes. The corner mounting holes should all be 3mm in diameter. Fig.4 shows the parts layout on the PCB. Begin by checking the PCB for any defects (rare these days), then install the six wire links and the resistors. Leave R1 and R2 out for the moment but don’t forget the link between them. Table 1 shows the resistor codes but you should also use a digital multimeter to check each one before installation. Diodes D1 & D2 and zener diodes ZD1 & ZD2 can go in next. These must be correctly orientated. Follow with PC stakes at the four six points (TP V+, TP V-, TPL, TPR, TP GND1 & TP GND2) and the 2-way (LK4) and 4-way (LK1-LK3) pin headers. The four ICs are next on the list. These can either be soldered direct to the PCB or mounted via DIL8 and DIL16 sockets. Take care with their orientation – the ICs all face in the same direction. Note also that IC1 & IC3 are both TL072s, while IC4 is a TL071 – don’t get them mixed up. Now for the capacitors. Install the ceramic capacitors first before moving on to the larger electrolytics. The 10µF “NP” (non-polarised) capacitors can be mounted either way around but the remaining electrolytics must all be installed with the correct polarity. The larger hardware items can now be installed. These include switch S1, the two pots (see below), the four RCA sockets and one of the power supply sockets (CON5 or CON6). Install CON6 if you intend using either a single rail DC supply or an AC supply. This view shows the fully-assembled PCB. Note the two wire links used to earth the metal bodies of the pots. used (but not LK2). LK1 connects the half-supply rail to the op amp signal grounds, while LK3 connects the op amp negative supply pins to the power supply ground. The supply itself is connected between the “+” and the 0V (ground) terminals of CON5 or it can be fed in via CON6. Regardless of the power supply configuration used, LED1 lights when power applied via on/off switch S1. This LED is powered from the nominal +15V rail via a 4.7kΩ current-limiting resistor (note: this rail will be at +12V if a 12V DC supply is used). The AC-coupling capacitors at the inputs and outputs of the op amps remove any DC component from the signal. In particular, they are necessary when the op amp outputs are biased to half supply. For the other supply options, the capacitors prevent DC coupling to the input stages of IC1a & IC1b and prevent DC flow in the level and volume controls (which would cause noise). Construction The assembly is straightforward, with all parts mounted on a PCB coded 01201121 and measuring 118 x 102mm. This is housed in a plastic instrument case measuring 140 x 110 x 35mm. The front and rear panels supplied with the case are replaced with PCBs with blue solder masks and screen printed lettering. These are Table 1: Resistor Colour Codes o o o o o o o o siliconchip.com.au No.   2   6   4   6   1   3   2 Value 1MΩ 100kΩ 47kΩ 10kΩ 4.7kΩ 150Ω 10Ω 4-Band Code (1%) brown black green brown brown black yellow brown yellow violet orange brown brown black orange brown yellow violet red brown brown green brown brown brown black black brown 5-Band Code (1%) brown black black yellow brown brown black black orange brown yellow violet black red brown brown black black red brown yellow violet black brown brown brown green black black brown brown black black gold brown January 2012  29 The rear panel provides access to the input and output RCA sockets, as well as to the power socket. Omit the power socket and fit a rubber grommet if you intend using a dual-rail supply. Alternatively, install CON5 instead if you intend using a dual-rail supply (ie, with “±” rails). A grommet is then installed at CON6’s location on the rear panel so that the external supply leads can be fed in. Before mounting the two pots, trim their shafts (using a hacksaw) to suit the knobs (about 13mm for the knobs specified). The pots are then pushed down so that they sit flush against the PCB and their leads soldered. Once they are in position, solder a length of tinned copper wire between each pot body and TP GND1. Note that it will be necessary to scrape away some of the coating from the pot bodies to get the solder to adhere. You will also need to wind up the temperature of your soldering iron if you have a soldering station. some other suitable 6mm spacer will make this job easier. R1, R2 & the links Table 2: Choosing R1 & R2 & Setting The Supply Links Resistors R1 & R2 can now be installed, depending on the power supply to be used with the device. Table 2 shows the resistor values for the various supply voltages. Links LK1-LK4 (in the form of jumper shunts) must also be selected and installed according to the power supply: • For a dual-rail supply, install LK2 and omit LK4; • For an AC supply, install both LK2 & LK4; and • For a single-rail DC supply, install LK1 & LK3 and omit LK4. Input Voltage R1 R2 Links Power Input Final assembly ±25VDC 270Ω 5W 270Ω 5W LK2 in, LK4 out +, 0, - ±20VDC 120Ω 1W 120Ω 1W LK2 in, LK4 out +, 0, - ±15VDC 10Ω 1/2W 10Ω 1/2W LK2 in, LK4 out +, 0, - ±12VDC 10Ω 1/2W 10Ω 1/2W LK2 in, LK4 out +, 0, - 25VAC 470Ω 5W 470Ω 5W LK2 & LK4 in +, 0 or CON6 20VAC 390Ω 5W 390Ω 5W LK2 & LK4 in +, 0 or CON6 18VAC 270Ω 5W 270Ω 5W LK2 & LK4 in +, 0 or CON6 15VAC 120Ω 1W 120Ω 1W LK2 & LK4 in +, 0 or CON6 11VAC 10Ω 1/2W 10Ω 1/2W LK2 & LK4 in +, 0 or CON6 +30VDC 390Ω 5W NA LK1 & LK3 in, LK4 out +, 0 or CON6 +25VDC 270Ω 5W NA LK1 & LK3 in, LK4 out +, 0 or CON6 +20VDC 120Ω 1W NA LK1 & LK3 in, LK4 out +, 0 or CON6 +15VDC 10Ω 1/2W NA LK1 & LK3 in, LK4 out +, 0 or CON6 +12VDC 10Ω 1/2W NA LK1 & LK3 in, LK4 out +, 0 or CON6 30  Silicon Chip Installing the LED LED1 is installed by first bending its leads down through 90° about 8mm from its body but check that it is correctly orientated before you do this (see Fig.5). The LED is then installed so that the centre of its lens is 6mm above the board, so that it will later protrude through its hole in the front panel. A 6mm-high cardboard spacer or With the PCB assembly now complete, it can be installed in its plastic case. Before doing this though, it will be necessary to remove the surplus mounting posts on the base, since they will otherwise foul the component leads under the PCB. This can be done by twisting them off using pliers but be sure to leave the four corner posts. As stated above, the front and rear panels supplied with the case are replaced with screen-printed (and solder masked) PCBs. It’s just a matter of slipping them into place (ie, at the front and rear of the main PCB), then slotting the assembly into the case and installing the four self-tapping screws at the corners. The assembly can now be completed by fitting the nuts to the pots and siliconchip.com.au Compression & Distortion Compromises Parts List If we feed a sinewave into the compressor, the amount by which it is distorted depends on its frequency. Lower frequencies suffer much greater distortion. The reason is that for low frequencies, the compressor actually responds to the slow changes in signal amplitude by changing its gain. After all, that is the job of the compressor. We can reduce the amount of low-frequency distortion by using longer attack and decay times. That way, the compressor doesn’t react so quickly to changes in signal level and so low frequencies are passed through more cleanly. But this impacts the function of the compressor and can result in undesirable behaviour, such as obvious “ramping” of the volume level over time. It also limits the extent to which the compressor can deal with sudden, loud sounds such as kick drums or microphone thumps. So the filter components have been chosen for the best balance between distortion and compression response time. The action of the compressor in dynamically varying its gain inevitably distorts the signal. In practice, music signals are much more complex than a simple sinewave and the distortion will be lower than the figures suggest. 1 PCB, code 01201121, 118 x 102mm 1 PCB, code 01201122, 134 x 30mm (front panel) 1 PCB, code 01201123, 134 x 30mm (rear panel) 1 instrument case, 140 x 110 x 35mm 4 PCB-mount single right-angle RCA sockets (CON1-CON4) 1 3-way screw terminal block, 5.04mm pitch (CON5) 1 PCB-mount DC socket (CON6) 1 DPDT PCB-mount right angle toggle switch (S1) 2 dual 10kΩ log 16mm potentiometers (VR1,VR2) 3 DIP8 IC sockets (optional) 1 DIP16 IC socket (optional) 1 4-way pin header strip 1 2-way pin header strip 2 jumper shunts 1 200mm length of 0.7mm tinned copper wire 4 No.4 x 6mm self-tapping screws 6 PC stakes switch Sl and pushing the two knobs onto the pot shafts. Leave the lid off for the time being – it’s attached after the unit has been tested. Connecting a power supply The supply connections depend on the type of power supply used: • If you have a dual-rail (split) DC power supply, connect it to the “+”, “0” & “-” terminals of CON5; or • If you have an AC supply or a single-rail DC supply (eg, a plugpack), connect it to the “+” & “0” terminals of CON5 or feed it in via CON6. Testing To test the unit, first apply power and check that the power LED lights. If it doesn’t, check the supply polarity and check that the LED is correctly orientated. Assuming all is well, the next step is to check the power supply voltages on the board. These will vary according to the supply used. For a single-rail DC supply, the voltage between pins 8 & 4 of both IC1 & IC3 and between pins 7 & 4 of IC4 should be at about 15V (note: this will be lower if the DC supply is less than 15V). In addition, the voltage between TP GND2 and TP GND1 should be 7.5V for a 15V supply (ie, half the supply voltage). Now check the voltage on pin 13 of IC2. It should be at +15V (or less if a lower supply voltage is used). If you are using a dual-rail supply, the voltages should be measured with respect to the 0V rail at TP GND1. In siliconchip.com.au this case, pin 8 of both IC1 & IC3, pin 13 of IC2 and pin 7 of IC4 should be at +15V. Similarly, pin 4 of IC1, IC3 & IC4 should all be at -15V. Once again, these voltages will be correspondingly lower if lower supply voltages are used. Using it The Stereo Compressor is designed to accept line level signals (ie, 774mV RMS). In addition, level control VR1 must be adjusted so that compressor stage operates correctly, while VR2 functions as an output level (or volume) control. In theory, VR1 should be set so that there is an average of 1.8VDC between TPL and TP GND1 for a typical signal into the left channel and 1.8VDC between TPR and TP GND1 for the right channel (note: a “typical signal” is the program material that will normally be fed into the unit). It’s just a matter of feeding in a suitable signal and adjusting the Level control while monitoring these test points using a multimeter. If the voltage at these test points is significantly less than 1.8V with VR1 set to maximum, then the gain of op amp stages IC1a & IC1b will have to be increased. This is done by reducing the 10kΩ resistor between pin 2 and ground for IC1a and between pin 6 and ground for IC1b. Once the signal levels are correct, the unit can be tested by connecting it to an amplifier and feeding in an audio signal. The volume control can then be adjusted to set the output level, Semiconductors 2 TL072 dual op amps (IC1,IC3) 1 SA571N Compandor (available from Futurelec) (IC2) 1 TL071 single op amp (IC4) 2 1N4004 diodes (D1,D2) 2 15V 1W zener diodes (ZD1,ZD2) 1 3mm green LED (LED1) Capacitors 2 1000µF 16V PC electrolytic 1 100µF 16V PC electrolytic 6 10µF NP PC electrolytic 9 10µF 35V PC electrolytic 2 4.7µF NP PC electrolytic 2 2.2µF NP PC electrolytic 2 1µF NP PC electrolytic 2 1µF 16V PC electrolytic 6 470pF ceramic (code 470p or 471) Resistors (0.25W, 1%) 2 1MΩ 1 4.7kΩ 6 100kΩ 3 150Ω 4 47kΩ 2 10Ω 6 10kΩ R1, R2 (see Table 2) Note: all PCBs are available from Silicon Chip Publications. while the level control will normally be left unchanged from its previous setting but can be tweaked to alter the SC compression curve if necessary. January 2012  31