Silicon ChipCD Compressor For Cars Or The Home - June 2000 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: GST and price changes
  4. Feature: Oooh, Aaaah! - Sony's New Digital Handycam by Ross Tester
  5. Review: PC-Controlled Blood Pressure Monitor by Ross Tester
  6. Project: Automatic Rain Gauge With Digital Readout by John Clarke
  7. Project: Parallel Port VHF FM Receiver by Mark Roberts
  8. Product Showcase
  9. Order Form
  10. Vintage Radio: A Japanese 110V AC/DC set by Rodney Champness
  11. Project: Li'l Powerhouse Switchmode Power Supply; Pt.1 by Peter Smith & Leo Simpson
  12. Project: CD Compressor For Cars Or The Home by John Clarke
  13. Review: TiePie Handyprobe HP2 by Peter Smith
  14. Book Store
  15. Back Issues
  16. Market Centre
  17. Advertising Index
  18. Outer Back Cover

This is only a preview of the June 2000 issue of Silicon Chip.

You can view 29 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 "Automatic Rain Gauge With Digital Readout":
  • PIC16F84(A)-04/P programmed for the Automatic Rain Gauge [RAINA.HEX] (Programmed Microcontroller, AUD $10.00)
  • PIC16F84 firmware and source code for the Automatic Rain Gauge [RAINA.HEX] (Software, Free)
  • Automatic Rain Gauge PCB pattern (PDF download) [04105001] (Free)
  • Automatic Rain Gauge panel artwork (PDF download) (Free)
Items relevant to "Parallel Port VHF FM Receiver":
  • Windows 95/98 software for the PC-controlled VHF FM Receiver (Free)
Items relevant to "Li'l Powerhouse Switchmode Power Supply; Pt.1":
  • Li'l PowerHouse Power Supply PCB pattern (PDF download) [04106001] (Free)
  • Li'l PowerHouse Power Supply panel artwork (PDF download) (Free)
Articles in this series:
  • Li'l Powerhouse Switchmode Power Supply; Pt.1 (June 2000)
  • Li'l Powerhouse Switchmode Power Supply; Pt.1 (June 2000)
  • Li'l Powerhouse Switchmode Power Supply; Pt.2 (July 2000)
  • Li'l Powerhouse Switchmode Power Supply; Pt.2 (July 2000)
Items relevant to "CD Compressor For Cars Or The Home":
  • CD Compressor PCB pattern (PDF download) [01106001] (Free)
  • CD Compressor panel artwork (PDF download) (Free)

Purchase a printed copy of this issue for $10.00.

Squash dem highs, boost dem lows Do you have problems listening to CDs in your car? Are the soft parts too soft and the loud parts too loud? This CD Compressor will solve that problem. It reduces the dynamic range of the signal while still maintaining the very clean sound of CDs. You can also use it when dubbing CDs onto cassettes or feeding them through a PA system. By JOHN CLARKE 62  Silicon Chip C OMPACT DISCS give great sound quality but they can be a problem in a car. The loud bits can be too loud and the soft bits can be lost in the general cabin noise from the engine, the road and wind roar. To solve the problem you need to “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. In operation, the CD Compressor continuously adjusts the signal level by amplifying the quiet passages and attenuating the louder passages, so that the overall volume is much more con­stant. The degree to which the signals are amplified and attenu­ated can be adjusted to suit the ambient noise. One problem with many CD compressors is that they can give increased noise at the lower signal levels because of the in­creased gain. This problem is largely avoided in this design because it features a “downward expander” which reduces the gain below a certain adjustable threshold point. As a result, noise is considerably reduced compared to compression without the downward expansion. Tape recording A CD compressor is also a boon when you want to dub your CDs onto cassettes. Although it’s possible to copy them direct without using a compressor, the results are often quite poor – most cassette decks can only really handle a dynamic range of about 40dB and that is far less than many CDs; low level signals will be lost in the background noise, while loud passages will be distorted as the signal is clipped by the saturation Main Features • • • • • • • • • Compact size Stereo operation Adjustable compression ratio Downward expander to reduce noise at low levels Fast attack rate to prevent overload Slow decay rate for low distortion Low noise operation Mute facility & bypass switch 12V automotive (DC) or AC plugpack supply limit of the tape. Generally, only a mild amount of compression is required to give a huge improvement in the recording quality. In effect, the compressor reduces both the noise and the distortion. The noise is reduced because low-level signals are amplified to a level above the noise floor produced by the tape. At the same time, the distortion is reduced because high-level signals are attenuated to prevent tape saturation. PA systems and mood music An audio compressor is also a “must-have” item when you want to provide low-level “mood” or background music at a dinner party. Or maybe you want to pipe music into a restaurant via the PA system. Again, the problem is the same – all those people eating and talking provide a high noise level and the soft pas­sages of the CD get completely drowned out. With a CD compressor, the music can heard all the time without being too obtrusive in the louder passages. The SILICON CHIP CD Compressor is housed in a small slim­line plastic case which can be easily fitted into a car or at­tached to a lounge-room hifi system. In has two rotary controls to adjust the amount of compression (or compression ratio) and the volume. The compression adjustment range is from 1:1 (no compression) all the way up to 3:1. At high compression ratios, the volume is relatively constant and the dynamic range is very narrow, so that the compressor behaves like an automatic level control (ALC). The volume control adjusts the output level by about 15dB. Also on the front panel are three toggle switches, labelled “In/Out”, “Mute” and “Power”. As implied, the In/Out switch switches the compression in or out, while the Mute switch is used to “kill” the signal at the outputs if required. Block diagram Fig.1 shows the block diagram for the CD compressor. It uses two voltage controlled amplifiers (VCAs) – one for each channel – plus several amplifier and control blocks. IC1 is the VCA for the left channel while IC2 is the VCA for the right channel. These stages are basically variable gain amplifiers, their gain at any one instant depending on the vol­tage applied to their control inputs. As a result, an audio signal applied to their inputs can be amplified or attenuated, depending on the control voltage. Note that both the left and right channel VCAs use the same control Fig.1: block diagram of the CD Compressor. The left and right channel signals are fed to separate voltage controlled amplifiers (VCAs) which continuously vary their gain to compress the output signals. The control voltage for the VCAs is derived by mixing the inputs and then feeding them to precision rectifier and logarithmic amplifier stages. JUNE 2000  63 Fig.2: the top waveform in this scope shot shows a 1kHz input signal. It begins as a 250mV signal and then “bursts” to 1V RMS, representing a 12dB range. The lower trace shows the compressor’s output at 2:1 compression ratio. The attack time is about 5ms and is the time taken for the burst signal to settle to its compressed level. voltage, so that their gains track each other. Following each VCA is an amplifier stage (IC3b & IC3c) and a volume control (VR1a & VR1b) to set the output level. Let’s now briefly describe how the control voltage is derived. As well as passing to the VCA inputs, the signals at the left and right channel inputs are also fed to mixer amplifier IC3a to produce a composite mono signal. This signal is then fullwave rectified and the resultant waveform fed to a logarith­mic amplifier stage based on op amps IC4c & IC4d and transistors Q1 and Q2. The signal output from this stage is the logarithm of the rectified signal at its input. From here, the signal is buffered (IC5a) and filtered, with a capacitor used to store the average value and produce a smooth DC voltage. The attack rate for the filter is set by resistor R1, while the decay rate is set by R2. The logarithmic (log) amplifier stage is included for two reasons. First, the gain of the VCAs changes in logarithmic fashion if they are controlled using a linear control voltage. However, that’s not what we want here. Instead, we want the VCAs to provide a linear gain response and this is achieved by con­trolling them with a logarithm of the composite input signal level. 64  Silicon Chip Fig.3: the top trace of this scope shot shows the falling edge of the tone burst signal depicted in Fig.2. The lower trace shows the output from the compressor and also indicates the decay time; ie, the time taken for the level to settle after the sudden drop in input signal level. This decay time is about 30ms. The second reason is so that the filter following the log amplifier can provide a linear dB response over time. Without the log amplifier, the filter would take a long time to settle after a large drop in signal level at the input but would be much faster for small reductions in signal level. The log amplifier helps to ensure a linear filter response for both large and small signal level changes. Following the filter stage, the signal is again buffered (this time using IC5b) and then fed to a “threshold and ratio control” block (IC5c, IC5d, Q5, VR6 & VR7). This stage sets the compression ratio (ie, the amount of compression) and passes the control voltage on to the VCAs. Circuit details Refer now to Fig.4 for the circuit details. It uses two Analog Devices SSM2018 VCAs (IC1 & IC2) which have excellent noise and distortion figures. There are also 12 op amps but these are contained in just three TL074 quad op amp packages so it’s not as complicated as it looks. Before we go further, some readers might wonder why we did not use another Analog Devices chip, the SSM­2120 or SSM2122, to do virtually the whole circuit instead of using quite a few separate op amps. The answer is that we would have liked to have tak­en that ap­proach but the SSM2120/2122 chip has been discontinued. Note also that there are two versions of our new CD Com­pressor circuit, one for use with an AC plugpack and the other for use with a 12V DC supply; ie, suitable for cars. Fig.4 shows the AC version, with the values shown in brackets for the DC version. The left and right channel VCA circuits are identical, so we’ll consider only the left channel. As shown, the left audio input signal is applied to pins 6 & 4 of IC1 via a 10µF bipolar capacitor and an 18kΩ series resistor. This resistor and the 15kΩ resistor between pins 3 & 14 set the gain of the VCA to 0.83 when the control input at pin 11 is at 0V. However, for the 12V DC version, the gain is reduced to 0.31 to prevent clipping with the maximum 2V input signal from a CD player. The 47pF capacitor between pins 5 & 8 is included to compensate the amplifier and prevent instability. Similarly, the capacitor between pins 3 & 14 provides high frequency rolloff. Trimpot VR2 provides adjustment for “control feedthrough”. This is set to minimise any control signal feed­through from pin 11 to the pin 14 output of the VCA. As an aside, the feedthrough has already been laser-trimmed on the chip by the manufacturer but some further improvement can usually be achieved using the trimpot. The 120kΩ (68kΩ) resistor at pin 12 sets the quiescent current for the class-B output stage at pin 14. Again, the IC is laser-trimmed at the factory, in this case to obtain the best distortion characteristics when the current into pin 12 is 95µA. This means using a 120kΩ resistor when the supply is ±12V (as for the 12V AC-powered version) or a 68kΩ resistor when the circuit is powered from a 12V DC supply (±6V). The compressed audio output signal appears at pin 14 of IC1 and is fed to op amp IC3b. This stage is wired as an inverting amplifier with potentiometer VR1a in the negative feedback loop between pins 8 & 9. This pot allows the gain to be adjusted between -1 and -5.55 and basically functions as a volume control by setting the output level. Following IC3b, the signal is coupled to the output via a 100Ω resistor, a 10µF capacitor and a set of relay contacts. The relay is included to provide muting at switch-on and also to allow the user to mute the output at any time. The associated 10kΩ resistor to ground provides a charging path for the 10µF capacitor. VCA control OK, so much for the VCAs and the audio output stages. Let’s now take a look at how the control voltage is derived for the VCAs. Actually, there’s quite a lot of circuitry involved here, involving no less than nine op amp stages: IC3a, IC4a-IC4d and IC5a-IC5d. IC3a is the mixer which combines the left and right channel audio signals. As shown on Fig.4, these signals are both fed to the pin 2 inverting input via a 10µF capacitor and series 10kΩ resistor. IC3a operates with a gain of -1.5 for the AC-powered ver­sion and -0.33 for the 12VDC version. The higher gain of the AC-powered version means more signal for the following stages and this gives better compression control. The feedback capacitor between pins 1 & 2 of IC3a rolls off its response above about 19kHz. The output appears at pin 1 and is AC-coupled to the precision rectifier which comprises IC4a, IC4b and diodes D1 & D2. This stage operates as follows. When the input signal goes positive, pin 1 of IC4a goes low and forward biases D2. As a result, the gain is set Parts List 1 PC board, code 01106001, 133 x 103mm 1 ABS instrument case, 140 x 110 x 35mm 1 front panel label, 131 x 31mm 1 DPDT toggle switch (S1) 2 SPDT toggle switches (S2,S3) 2 12V reed relays (relays 1 & 2) 2 16mm black knobs 1 4-way RCA socket strip 1 2.5mm DC socket 1 10kΩ 16mm dual-gang log pot (VR1) 5 20kΩ horizontal mount trimpots (VR2-VR6) 1 10kΩ 16mm linear pot (VR7) 1 500mm length of 0.8mm tinned copper wire 1 300mm length of red mediumduty hookup wire 1 300mm length of black mediumduty hookup wire 12 PC stakes Semiconductors 2 SSM2018P VCAs (IC1,IC2) 3 TL074, LF354 quad op amps (IC3-IC5) 1 7555 CMOS timer (IC6) 2 BC549 NPN transistors (Q1,Q2) 1 BC547 NPN transistor (Q3) 1 BC557 PNP transistor (Q4) 6 1N914, 1N4148 diodes (D1-D6) Capacitors 1 470µF 25VW electrolytic 1 220µF 50VW electrolytic 8 10µF 63VW electrolytics 9 10µF bipolar electrolytics 1 1µF 16VW PC electrolytic 2 0.1µF MKT polyester 1 680pF ceramic 3 560pF ceramic 1 390pF ceramic to -1 by the 20kΩ input and 20kΩ feedback resistors. The output signal appears at the anode of D2 and is fed to the inverting input (pin 13) of IC4b via a 10kΩ resistor. IC4b operates with a gain of -2 for this signal path, as set by the 20kΩ feedback resistor and the 10kΩ input resistor. This means that the overall gain of the signal through IC4a & IC4b is -1 x -2 = +2. However, there’s a complicating factor here. Pin 13 of IC4b is also fed 1 330pF ceramic 2 47pF ceramic 1 10pF ceramic Resistors (0.25W, 1%) 4 10MΩ 2 18kΩ 1 1MΩ 15 10kΩ 1 470kΩ 2 4.7kΩ 1 100kΩ 2 3.9kΩ 1 47kΩ 6 2.2kΩ 1 33kΩ 3 1kΩ 1 22kΩ 6 100Ω 4 20kΩ Extra parts for AC plugpack version 1 12V AC or DC 300mA plugpack 1 7812 +12V regulator (REG1) 1 7912 -12V regulator (REG2) 2 1N4004 1A diodes (D7,D8) 1 470µF 25VW electrolytic capacitor 1 10µF 16VW PC electrolytic capacitor 1 560pF ceramic capacitor 2 330pF ceramic capacitor 2 1MΩ 0.25W 1% resistors 2 120kΩ 0.25W 1% resistor 3 15kΩ 0.25W 1% resistor Extra parts for 12V DC version 1 16V 1W zener diode (ZD1) 1 .0022µF MKT polyester capacitor 2 .001µF MKT polyester capacitor 2 470kΩ 0.25W 1% resistors 2 5.6kΩ 0.25W 1% resistors 1 4.7kΩ 0.25W 1% resistor 1 3.3kΩ 0.25W 1% resistor 2 2.2kΩ 0.25W 1% resistors 1 100Ω 0.25W 1% resistor 1 10Ω 0.25W 1% resistor directly with the mixer signal via a second 20kΩ resistor and so operates with a gain of -1 for this signal path. Adding the two gains therefore gives us a total gain of +1 for positive-going signals. When the input to the precision rectifier swings negative, D1 is forward biased and clamps pin 1 of IC4a to 0.6V (ie, one diode drop) above ground. This effectively disables IC4a and so IC4b simply amplifies the output of IC3a with a gain of -1. Because JUNE 2000  65 66  Silicon Chip Fig.4: the circuit diagram for the CD Compressor. IC1 & IC2 are the VCAs and these drives op amps IC3b & IC3c. Most of the rest of the circuit is used to produce the control voltage for the VCAs. JUNE 2000  67 Fig.5: follow this wiring diagram to build the 12V AC-powered version. This is the version to build if you don’t intend using the unit in a car. the input signal is negative, the signal at pin 14 is positive. As a result, pin 14 of IC4b always swings positive and op amps IC4a & IC4b together operate with an absolute gain of 1. This means that the stage operates as a precision full-wave rectifier. Trimpot VR4 adjusts the offset voltage at pin 12 of IC4b. It is set so that the full-wave rectified output is symmetrical for both positive and 68  Silicon Chip negative input swings, at low signal lev­els. Op amps IC4c and IC4d comprise the logarithmic amplifier referred to earlier in the block diagram description. This cir­ cuit is based on the inherent logarithmic relationship between the collector current and the base-emitter voltage of a bipolar transistor. As can be seen, transistor Q2 is connected as a grounded base amplifier. It forms part of the negative feedback loop for op amp IC4d, along with the 10kΩ and 1kΩ feedback resistors and the base-emitter junction of transistor Q1. Q2’s collector operates with a constant current of 12µA via the 1MΩ (470kΩ) resistor connected to the positive supply rail. This sets Q2’s base-emitter voltage to a fixed value. By con­trast, Q1’s base-emitter voltage depends on the collector current Table 1: Capacitor Codes           Value IEC Code EIA Code 0.1µF   100n   104 .0022µF   2n2  222 .001µF   1n0  102 680pF   680p   681 560pF   560p   561 390pF   390p   391 330pF   330p   331 47pF   47p   47 10pF   10p   10 which flows via the 3.9kΩ resistor at pin 9 of IC4c. And that, in turn, depends on the output level from IC4b in the precision rectifier. IC4d’s output depends on the difference between the base-emitter voltage of Q2 and the base-emitter voltage of Q1. It also depends on the gain of this stage which is set by the 10kΩ and 1kΩ feedback resistors connected to Q1’s base. Q1’s collector current varies with the input voltage and this affects its base-emitter voltage in a logarithmic fashion. This means that IC4d’s pin 7 output will be the log of the input. It will be at 0V when the currents through the collectors of Q1 and Q2 are equal at 12µA. Trimpot VR5, along with op amp IC4c, allows the offset voltages to be A compact, low-profile instrument case houses the PC board (AC-powered version shown). Note the use of shielded cable to wire the input sockets. removed and ensures that the log amplifier oper­ates correctly over several decades of signal level. Note that this type of log amplifier will have a tempera­ture dependent output since the base-emitter voltage of a tran­sistor varies by about 2mV/°C. This variation is compensated for by the reverse temperature characteristics of the two VCAs (IC1 & IC2). Attack and decay Following the log amplifier, the control signal is filtered using IC5a, Table 2: Resistor Colour Codes  No.    4    3    3    2    1    1    1    1    4    2    3  15    2    3    2    1    8    3    7    1 Value 10MΩ 1MΩ 470kΩ 120kΩ 100kΩ 47kΩ 33kΩ 22kΩ 20kΩ 18kΩ 15kΩ 10kΩ 5.6kΩ 4.7kΩ 3.9kΩ 3.3kΩ 2.2kΩ 1kΩ 100Ω 10Ω 4-Band Code (1%) brown black blue brown brown black green brown yellow violet yellow brown brown red yellow brown brown black yellow brown yellow violet orange brown orange orange orange brown red red orange brown red black orange brown brown grey orange brown brown green orange brown brown black orange brown green blue red brown yellow violet red brown orange white red brown orange orange red brown red red red brown brown black red brown brown black brown brown brown black black brown 5-Band Code (1%) brown black black green brown brown black black yellow brown yellow violet black orange brown brown red black orange brown brown black black orange brown yellow violet black red brown orange orange black red brown red red black red brown red black black red brown brown grey black red brown brown green black red brown brown black black red brown green blue black brown brown yellow violet black brown brown orange white black brown brown orange orange black brown brown red red black brown brown brown black black brown brown brown black black black brown brown black black gold brown JUNE 2000  69 Fig.6: this is the wiring diagram for the 12V DC-powered version. Take care to ensure that all parts are correctly placed and that the polarised parts go in the right way around. transistors Q3 & Q4, resistors R1 & R2 and capacitor C1. At first glance, this may appear to be an op amp driving a complementary emitter follower but in fact it is more like an active filter which controls the attack and decay times for the compressor. In practice, R1 and C1 provide the attack time while R2 and C1 set the decay time. When the voltage on pin 12 of IC5a is greater than the voltage across C1, pin 14 goes high and turns on tran70  Silicon Chip sistor Q3. This rapidly charges C1 via Q3’s 1kΩ emitter resistor (ie, via R1). The rate of charge depends on the difference between the voltage at pin 12 and the voltage across C1. If the difference is small, then the current through R1 will also be small and C1 will charge relatively slowly. Conversely, if the difference is large, there will be more voltage across R1 and C1 will charge at a faster rate. The idea behind this is to prevent overload when rapid, large signal changes occur. At the same time, it prevents sudden gain changes in the VCA for small changes in signal level. The discharge cycle for C1 is quite different to the charg­ing cycle. When the signal at pin 12 of IC5a goes lower than the voltage across C1, pin 14 goes low. Q3 now turns off and Q4 turns on and discharges C1 via the 1MΩ resistor connected to the nega­ tive supply rail. Because C1 is only one or two volts above or below ground at most, the discharge occurs in a relatively linear region of the exponential charge/ discharge curve. As a result, we get an equivalent linear rate of change in gain (in dB) for the two VCA’s. IC5b amplifies the voltage on C1 by a factor of two and applies the resultant signal to trimpot VR7 – the ratio control potentiometer – via a 22kΩ resistor. The signal on the wiper of this pot is the control signal and this is applied to the pin 11 control inputs of the two VCAs (IC1 & IC2). In operation, VR7 allows the control voltage to be adjusted from 0V where there is no compression through to the maximum control voltage where the compression is about 3:1. Downward expander IC5c and IC5d make up the “downward expander” circuit. IC5c monitors the control voltage from IC5b at its inverting (pin 6) input and a threshold voltage set by VR6 is fed to its non-inverting (pin 5) input. Its output appears at pin 7 and drives unity gain buffer stage IC5d which has diode D5 in the negative feedback loop. When the control voltage from IC5b is above the threshold voltage on pin 5, pin 7 of IC5c is low and so is pin 8 of IC5d. Diode D5 will therefore be reverse-biased and so IC5d’s output has no effect on the control voltage applied to the VCAs. However, if IC5b’s output voltage dips down to the threshold voltage, pin 7 of IC5c begins to go high. IC5d’s output also starts going high and this forward biases D5 which pulls the control voltage applied to VR7 high via a 2.2kΩ resistor. In practice, this means that the control voltage applied to VR7 can not drop below the set threshold. What happens is that if pin 6 of IC5c continues to go low, IC5d pulls the control voltage on VR7 even higher. As a result, the gain at very low signal levels is further reduced with a consequent reduction in noise. Muting IC6, switch S2 and relays 1 & 2 form the muting circuit. This circuit automatically mutes the signal at switch-on and switch-off to prevent unwanted noise and also allows the user to manually switch the muting in. Let’s see how this all works. Performance Of Prototype Compression Ratio: adjustable from 1:1 to 3:1 Distortion: .04% THD at 100Hz to 10kHz with 1V input and 1:1 compression; .08% THD at 1kHz; .06% at 10kHz; 1.6% at 100Hz with 1V input and 2:1 compression Temperature Drift: 1dB change over a 40°C temperature variation (worst case maximum compression) Frequency Response: -3dB at 10Hz and 22kHz into 4.7kΩ load (worst case maximum volume setting) Attack & Decay Times: 5ms & 30ms – see oscilloscope traces (Figs.2 & 3) Frequency Response: -3dB <at> 10Hz and 22kHz Separation Between Channels: 88dB <at> 100Hz; 67dB <at> 1kHz; 50dB <at> 10kHz 12VDC version Signal-To-Noise Ratio: 92dB wrt 2V 20Hz to 20kHz bandwidth (96dB A-weighted) at 1:1 compression; 82dB wrt 2V 20Hz to 20kHz bandwidth (87dB A-weighted) at 2:1 compression and 1mV (-66dB) downward expansion threshold; 71dB and 82dB A-weighted at 100µV (-86dB) downward expansion threshold Compression Linearity: within 1dB over an 80dB range at 2:1 com­pression Signal Handling: 2.16VAC RMS before clipping with 13.8V supply and minimum volume setting (worst case at 1:1 compression) 12VAC version Signal-To-Noise Ratio: 100dB with respect to 2V 20Hz to 20kHz bandwidth (103dB A-weighted) at 1:1 compression; 85dB wrt 2V 20Hz to 20kHz bandwidth (90dB A-weighted) at 2:1 compression and 1mV (-66dB) downward expansion threshold; 80dB and 85dB A weighted at 100µV (-86dB) downward expansion threshold Compression Linearity: within 1dB over an 85dB range at 2:1 com­pression Signal Handling: 2.2VAC RMS before clipping and minimum volume setting (worst case at 1:1 compression) When power is applied, the pin 2 trigger input of IC6 is initially pulled low via a 1µF capacitor. As a result, pin 3 is high, the relays are off and no audio signals appear at the outputs (ie, the signal is muted). The 1µF timing capacitor now charges via a 470kΩ resistor. When the voltage across it reaches 2/3Vcc (ie, 2/3rd of the supply voltage), pin 3 goes low and turns on the relays. This closes the relay contacts and allows the audio signals to pass through to the output sockets. The circuit can be manually muted at any time by closing switch S2. This quickly discharges the 1µF capacitor to below 1/3Vcc via a 100Ω resistor and so pin 3 switches high and turns off the relays. Similarly, the contacts of S1b close when the power switch is turned off to perform the same job. Diode D5 quenches any high voltage spikes that would other­wise be generated when the relays turn off, to prevent damage to IC6. Power supply As mentioned earlier, power for the CD Compressor can come from either a 12VAC plugpack or a 12V DC supply as in a car. We’ll look at the AC-powered version first, which is shown at bottom lefthand corner of Fig.4. Power from the 12VAC plugpack is switched via S1 to half-wave rectifiers D8 and D7. D8 provides a nominal +17V supply rail, while D7 provides a -17V rail. These rails are then fil­tered using 470µF capacitors and regulated to +12V and -12V using 3-terminal regulators REG1 and REG2. JUNE 2000  71 AUDIO PRECISION GAIN AMPL(dBV) vs AMPL(Vrms) 10.000 12 FEB 100 00:40:22 0.0 -10.00 -20.00 -30.00 -40.00 -50.00 -60.00 -70.00 -80.00 300u 1m 10m The 12V DC supply circuitry is shown at the bottom right­hand corner of Fig.4. 12V is applied via power switch S1 and a 10Ω decoupling resistor. Zener diode ZD1 clamps any spike voltag­es above 16V, a necessary precaution when using an automotive power supply rail. A half-supply ground is derived using IC3d. The 2.2kΩ resistors at pin 5 split the 12V supply in half, with decoupling provided by a 10µF capacitor. This gives us nominal +6V, 0V (at the midpoint) and -6V rails. The 0V rail is buffered using op amp IC3d and its output connects to the earth rail. The 100Ω resistor at the output isolates the op amp from capacitive loads. Construction Construction is straightforward, with most of the parts assembled onto a PC board coded 01106001. This is fitted into a compact plastic case measuring just 140 x 110 x 35mm high. Start by checking the PC board for any etching defects by comparing it with the published pattern (Fig.8). This done, check that the four corner mounting holes are drilled to 3mm and that the two half-moon cutouts have been made on either side of the board to clear the mounting bosses in the case. It may also be necessary to enlarge the holes for the two potentiometers and for the PC stakes at the external wiring points. Fig.5 shows the parts layout diagram for the AC-powered version 72  Silicon Chip 0.1 1 2 Fig.7: this graph shows the input versus output characteristics of the compressor at three different compression ratios. The horizontal axis represents the input signal level, ranging from 300µV to 2V (a level change by a factor of 10 represents 20dB). The vertical axis is the corresponding compressor output with the volume set at maximum. The steepest sloping line is for 1:1 compression. This is simply a straight line and shows a 10dB increase in signal output level for every 10dB increase at the input (ie, the signal is not compressed). The central line shows the 2:1 compression slope and this provides a 5dB change in signal for a 10dB input change. Note that the downward expansion point is set at about 1.5mV (62dB below 2V) and the signal is reduced at a rapid rate for input levels below this. The remaining curve shows the 3:1 compression slope, where the signal is reduced to a 20dB range for a 60dB input. only, while the DC version is shown in Fig.6. We recom­mend that you build the AC version if you don’t intend using the CD Compressor in a car. Start the assembly by installing all the wire links and the ICs. Make sure that the ICs are all correctly oriented and that the correct device is used in each location. The resistors can be installed next. Most of these are mounted end-on to save space, which means that you will have to bend one of their leads through 180° so that they go through the holes in the board. Table 2 shows the resistor colour codes but it’s also a good idea to check them on a multimeter, just to make sure. Now install the transistors and diodes, followed by the capacitors and trimpots. Note that the electrolytic capacitors marked BP or NP are not polarised and can be installed either way around. Finally, complete the board assembly by installing the two PC-mount pots, the relays and PC stakes at the external wiring points. Take care with the two pots; VR1 (Level) is a 10kΩ log type, while VR7 (Ratio) is a 10kΩ linear type. Case preparation Work can begin on the front panel, using the label as a template for drilling out the holes. You will need to make five holes, three for the toggle switches and two for the pot shafts. The rear panel requires holes for the 4-way RCA socket panel and the power socket. Note that the centre-line for the RCA sockets is located 8mm down from the top edge of the rear panel, to allow room for the wiring. This means that the top edge of the RCA socket panel requires trimming, so that it doesn’t interfere with the lid. Once all the drilling has been completed, attach the front panel label, then mount the rear-panel hardware. This done, cut the pot shafts to match the knobs, then fit the front panel over them and slide the entire assembly into the case. The PC board can then be secured using self-tapping screws into the matching pillars in the base. Finally, mount the toggle switches on the front panel and complete the wiring, as shown in Fig.5 or Fig.6. Note that shielded cable is used for the signal inputs between the RCA sockets and the PC board but the signal outputs and all other wiring can be run using light-duty hookup wire. Do not forget to solder a length of tinned copper wire along the RCA socket earth tabs, as shown. It’s also necessary to earth the body of the volume control pot using a short length of tinned copper wire back to an adjacent PC stake. Scrape away the plating on the pot body using a sharp utility knife before sol­dering to it. Testing Now for the smoke test. First, check your work carefully, then apply power, connect the negative lead of your multimeter to the COM stake on the PC board and check the supply voltages. If you built the AC-powered version, there should be +12V on pin 2 of IC1 & IC2, pin 4 of IC3-IC5 and on pins 4 Fig.8: these are the full-size artworks for the front panel and the PC board. Check your board carefully for etching defects before installing any of the parts. & 8 of IC6. Alternatively, there should be +6V present on all these pins for the 12V DC version. The negative supply can be checked now. There should be -12V (-6V for the DC version) on pins 10 & 16 of IC1 & IC2 and on pin 11 of IC2-IC5. IC6 should have 0V on pin 1 for the 12VAC version and -6V for the 12VDC version. If everything checks out so far, set VR6 fully clockwise and set all the remaining trimpots to their midpoint positions. This done, switch your multimeter to read in millivolts DC and attach the probes between pin 1 of IC4a and pin 14 of IC4b. Adjust VR4 so that the reading is as close to 0mV as possible under no-signal conditions (ie, do not apply any audio signals to the inputs). This sets the precision rectifier so that it gives a symmetrical output for both positive and negative signal swings at low levels. Now connect your multimeter be- tween pin 7 of IC4d and ground and adjust VR5 anticlockwise until the voltage suddenly jumps nega­tive to about -10V (-5V for the 12VDC supply version), then back off slightly until the meter shows a voltage of about -1V to -2V – ie, rotate the pot anticlockwise to find the point where it exactly jumps fully negative and then rotate the pot back very slightly from this point. The dynamic range for the log amplifier is now at maximum. VR6, VR2 and VR3 are set by testing the unit with a CD player and audio amplifier. To do this, connect the leads from the CD player to the left and right inputs and connect the outputs from the compressor to the amplifier. Now set the ratio control fully clockwise, apply power and adjust VR6 anticlockwise so that any background noise is reduced to an acceptable level. Next, toggle the In/Out switch between its two settings and check for noise clicks in the loudspeakers when this is done (you may need to turn the volume up on the amplifier to hear any clicks). Adjust VR2 (left channel) and VR3 (right channel) to minimise any clicking noises that you do hear when the In/Out switch is toggled (this adjustment minimises the control feedthrough into the audio signal). Using it In use, the compression ratio should generally be set to the minimum possible before low-level signals are lost in the background noise. Some readers may also wish to alter the attack and decay times for the compressor. As mentioned earlier, resistor R1 (1kΩ) sets the attack time, while R2 (1MΩ) sets the decay rate. Gener­ally, a fast attack time is recommended to prevent transient overload of the signal. At the same time, a slower decay rate is recommended to minimise distortion. If the decay rate is too slow, you may find that the sound has a characteristic “pumping” effect due to the gain increasing too slowly after shutting down on a transient signal. This pumping action is more prevalent with high compression ratios. To increase the decay time, increase R2’s value and to decrease the decay time, reduce R2. Similarly, the attack time can be increased by increasing R1. Note that increasing the compression ratio will also reduce the volume because the louder passages are attenuated. The over­all level can be restored SC using the volume control. JUNE 2000  73