a ONE TECHNOLOGY WAY AN-382 APPLICATION NOTE * P.O. BOX 9106 * NORWOOD, MASSACHUSETTS 02062-9106 * 617/329-4700 Applications of the SSM2120 Dynamic Range Processor by Joe Buxton The functional circuit in Figure 1 shows the basic connections for the VCA and level detector sections of the SSM2120. The circuitry within the dotted boxes is included in the SSM2120, and all the other components are external. This circuit represents only half of the SSM2120. The additional VCA and level detector are functionally identical and differ only in the pin numbers. A companion product to the SSM2120 is the SSM2122, which integrates the two VCAs without the level detector side chains for applications where only the VCAs are needed. Any of the following discussion regarding the VCA section of the SSM2120 equally applies to the SSM2122. The SSM2120 is a versatile integrated circuit that can be used for a variety of audio dynamic range processing functions. It integrates two voltage controlled amplifiers (VCAs) and two level detector side chains in a single 22- pin package. With this combination, the SSM2120 is easily configurable as a stereo compressor/limiter, an automatic gain control amplifier, an expander, a noise gate, or simply as a dual VCA and dual level detector. An evaluation board 1 was developed that employs sufficient flexibility to configure the SSM2120 in all the above applications, providing a demonstration of the full capabilities of the part. This application note references the evaluation board and should be read in conjunction with the data sheet to develop a full understanding of the SSM2120. 200 10pF 7 -VC SIGNAL INPUT 36k SIG IN 36k SIG OUT 4 8 SIGNAL OUTPUT 2200pF SSM2120 47 +VC VCA 5 200 1k 39k 1 V+ SIGNAL INPUT THRESH IIN 10k 9 1F FULL WAVE RECTIFIER REC IN IREF CON OUT 3 Q2 Q1 2V SSM2120 LOG AV 2 LEVEL DETECTOR 10F 1.5M V- Figure 1. SSM2120 Basic Circuitry NOTE 1 The blank evaluation PCB is available to qualified OEMs at no charge. It was designed to accompany this application note; however, it is not necessary since this was written as a general tutorial on the SSM2120. V- CONTROL VOLTAGE OUTPUT The VCAs are current-in, current-out devices requiring an external amplifier on the output to convert the current back into a voltage. Normally, 36 k resistors are used on the input and in the feedback of the output amplifier, resulting in unity gain with a 0.0 V control signal applied. In all the application circuits, a series combination of a 2200 pF capacitor and a 47 resistor at the signal input is required for stable operation. The SSM2120 has complementary control ports, which follow a 6 mV/ dB gain law. The minus control port (-V C) produces attenuation for positive dc inputs, and the positive control port (+V C ) produces gain. gain of 40. As a result, the voltage at CONOUT follows a ratio of 120 mV/dB. This amplifier was not designed to be unity gain stable as the open-loop gain and phase curves in Figure 2 show. In fact, the closed-loop gain should never be less than 40. To this end, a capacitor should not be added in parallel with the amplifier's feedback resistor. The reason for this is simple: At high frequencies, the capacitor's impedance reduces the closed loop gain below 40. Depending on the size of the capacitor, this could occur within the frequency range of the amplifier, resulting in oscillations. The basic schematic for the evaluation board is shown in Figure 3. The silkscreen and layout for both sides are shown in Figures 4 through 6. By combining the VCA and level detector functional blocks in different manners, all of the following circuits can be designed. The demo board uses the OP275, a high performance dual audio amplifier, as current-to-voltage converters at the output of the SSM2120 VCAs. Several jumpers are used on the board to provide flexibility for different configurations. These jumper positions can be hard wired for one type of circuit, or use pin sockets and wire jumpers for flexibility. In each of the following applications, the jumper positions are called out on the circuit diagram. The level detectors include a full wave rectifier, a logging circuit, and a unipolar drive amplifier, allowing detection of signals over a 100 dB dynamic range. In normal operation with 15 V supplies, a 1.5 M resistor is connected between the LOGAV pin and the negative supply. Doing so sets up a 10 A reference current in the transistor Q2. Meanwhile, a matched logging transistor Q1, which is diode connected, develops a forward drop based on the input current. The higher the input current, the larger the diode drop will be. The voltage at the LOGAV pin is then the difference in the forward junction drops of these two matched transistors, which is proportional to the input current. Deriving the formula for the voltage at LOGAV results in: V LOGAV V+ |I | kT = ln IN q I REF SIG 1 OUT OP275 C4 1 If the input current matches the reference current of 10 A, then the forward drop across Q1 equals the forward drop across Q2, and the voltage at LOGAV will be zero. For a typical input resistor of 10 k , 10 A rms of current corresponds to a -20 dBV input (0 dBV = 1 V rms), which gives a control voltage of 0.0 V. To either side of zero, the V LOGAV follows a 3 mV/dB control law. REF LEVEL 0.000dB 0.0deg /DIV 20.000dB 45.000deg V+ 2 -IN OUT 7 3 +IN -IN 6 4 V- +IN 5 R21 R5 J3 V- J4 V+ R16 D1 R2 V+ V- R17 R8 R1 GAIN - dB 40 90 PHASE 20 45 0 0 V+ 21 C5 3 CONOUT 1 SIGOUT 2 20 4 SIGOUT 1 +VC2 19 R9 5 +VC1 CFT 2 18 6 CFT 1 -VC2 17 R10 R4 7 -VC1 SIGIN 2 16 R12 J7 R33 V- R23 R11 V- SIG 1 IN V+ R22 R29 J13 J14 R24 R25 C12 R14 C2 V+ 8 SIGIN 1 R31 C13 9 RECIN 1 CONOUT 2 14 10 IREF LOG AV 2 13 11 V- THRESH 2 12 R18 R15 C14 R32 D3 R20 C7 1M V+ R19 V- 10M D4 R30 C8 0.1F 100k FREQUENCY - Hz SIG 2 IN RECIN 2 15 R27 10k J12 R26 R13 C3 V- 1k GND C16 10F V- V- C1 -45 -20 2 LOG AV 1 1 J5 135 THRESH 1 GND 22 V- J6 PHASE - Degress GAIN C11 0.1F SSM2120 V+ 60 POWER SUPPLIES V+ V+ C15 10F C6 0.1F R7 R3 180 SIG 2 OUT C10 J1 J2 MARKER 917 731.294Hz 32.025dB MAG (UDF) MARKER 917 731.294Hz 23.893deg PHASE (A/R) 80 V+ 8 OUT R6 D2 The LOGAV pin is buffered by an amplifier to give it a low impedance output capable of driving a load. This amplifier is normally configured with a noninverting C9 0.1F J11 J10 V+ R28 J9 J8 Figure 2 Open-Loop Gain and Phase of Control Amplifier Figure 3. Evaluation Board Schematic -2- V- Figure 4. Silkscreen Figure 6. Bottom Side Layout as the threshold. Signals below the threshold are increased, while those above are decreased. This type of compressor is distinct from other types (such as the limiter discussed below) that only function above or below the threshold. Linear compressors are typically used in encode/decode systems such as the companding noise reduction system described below. NO COMPRESSION 20 2:1 COMPRESSION 2:1 4:1 10:1 AGC 0 0dBV -20dBV -20dBV 100dB 50dB -50dBV -80dBV INPUT COMPRESSED OUTPUT OUTPUT - dB 20dBV -20 -40 -60 -80 -100 -100 -80 -60 -40 -20 INPUT - dB a. 0 20 b. Figure 7. Linear Compressor Functionality Figure 7a shows an example of a 2:1 compression ratio. The compression ratio is defined as the ratio of change in input level (in dB) to the change in output level. Thus, for the 2:1 ratio shown, an input signal with 100 dB of dynamic range is reduced to 50 dB. Figure 7b shows the transfer function for different compression ratios. As the ratio increases, the dynamic range of the output decreases. A linear compressor with a high ratio is generally referred to as an AGC circuit (Automatic Gain Control) where the output level is nearly constant regardless of the input. Notice that all the curves in Figure 7b pass through -20 dBV, which is unity gain. This is not an arbitrary choice. As explained in the preceding Figure 5. Topside Layout Linear Compressor A compressor is a common audio function to reduce wide dynamic range signals to a narrower signal range as shown in Figure 7. Compressing a signal is helpful, for instance, to prevent low level signals from being masked by the system noise, such as storing audio on an analog tape. A linear compressor "rotates" the transfer function around the unity gain point, also referred to -3- section, a -20 dBV input to the level detector corresponds to CONOUT = 0 V. With a control voltage of zero volts, the VCA will have a gain of unity. This unity gain point can easily be adjusted to any input level as described in the following section. of attenuation. Now all that is left to do is choose R1 + R3 such that they form a resistor divider with R11 that results in a 60 mV/2.4 V attenuation ratio. Since R11 is normally 200 , R1 + R3 should be 7.8 k , which is exactly the result that the above formula gives. The SSM2120 is programmable for different compression ratios by simply adjusting one resistor. As explained above, the level detector has a sensitivity of 3 mV/dB, which is amplified by the control op amp (set to a gain of 40) to 120 mV/dB. Thus, for every 10 dB rise in input rms level, the dc voltage at the CONOUT pin rises by 1.20 V. This voltage can then be scaled and fed into the VCA's control port to provide gain or attenuation as shown in Figure 8. The series resistance of R1 + R3 determines the compression ratio according to the following formula: Different compression ratios can be obtained by just changing the value of R1 + R3. R1 and R3 could actually be just one resistor; however, they are split in half in order to insert a capacitor for filtering. Thus, R1 and R3 should each be equal to half the sum of the two. Like all VCAs, the SSM2120 is sensitive to noise on the control ports, which feeds through, causing excessive noise and distortion in the audio signal. The capacitor reduces the noise significantly, preserving the performance of the SSM2120. The actual value of the capacitor should be as large as possible without affecting the attack time of the control signal (i.e., the time constant at 1/(R1 iR3 x C1) should be less than the attack time). CR R1 + R3 = R11 20 - 1 CR - 1 For applications that require an adjustable compression ratio, a potentiometer should be inserted in place of the jumper labeled J6, which is in series with R1 and R3. To determine the value of the potentiometer and of R1 + R3, first determine the minimum and maximum compression ratios desired. Once these compression ratios are determined, calculate the corresponding resistances according to the above formula. R1 + R3 should be set to the smaller of the two resistance values, which occurs at the highest compression ratio desired. (For an AGC circuit with an infinite compression ratio, R1 + R3 = 3.8 k .) The potentiometer should then be set to the difference in the two calculated resistances. For example, a 2:1 compression ratio requires a 7.8 k resistor. Thus, the pot should be at least 7.8 k -3.8 k = 4.0 k . A standard 5 k would easily do the job. The reason for not simply replacing R1 and R3 with a potentiometer is the filtering. A capacitor should be placed between the two 1.9 k resistors to reduce noise on the VCA's control port. where CR is the compression ratio. R9 200 C4 10pF 5 +VC SIGNAL INPUT SIG IN R12 36k SIG OUT 8 C3 2200pF R6 36k 4 SIGNAL OUTPUT SSM2120 -VC 1/2 OP275 7 R13 47 R11 200 +15V R5 100k J1 J7 J4 OPTIONAL SEE TEXT R16 -15V 39k R17 1k R7 39k R14 10k +15V R2 10k J6 1 C2 10F THRESH V+ IREF IIN 9 FULL WAVE RECTIFIER RECIN 2V D2 3 Q2 R1 Q1 SSM2120 D1 CONOUT LOG AV V- R3 Figure 9 shows the actual performance of a compressor on the evaluation board. The first graph shows the transfer function for different compression ratios. A few C1 2 SHORT OPEN J6 J7 D1 D2 J1 J4 J2 J3 J5 C5 10F R8 1.5M V- OPTIONAL Figure 8. Linear Compressor Circuitry An example of setting this compression ratio best illustrates the logic behind this formula. Let's choose a common compression ratio of 2:1 as an example. In this case when the input increases by 20 dB, the output should only increase by 10 dB. To accomplish this, the control voltage must be sufficient to produce 10 dB of attenuation in the VCA. Because of the 120 mV/dB relationship, a 20 dB increase in the input results in a 2.4 V increase in the voltage at CONOUT. Since the control input (-V C) has a 6 mV/dB control law, 60 mV should be applied to the -V C pin to achieve 10 dB Figure 9a. Compressor Transfer Function (VSY = 15 V, fIN = 1 kHz) -4- +2.4 V at CONOUT. The two voltages sum and cancel each other out, leaving CONOUT with zero volts and the VCA at unity gain. Further adjustment of the potentiometer can change the threshold across the entire dynamic range of the part. This same technique can also be used in the expander circuit discussed below. Automatic Gain Control A small subsection of the general compressor is an AGC circuit, where the output has constant amplitude regardless of the input. The basic compressor circuit shown in Figure 8 realizes an AGC circuit with only a couple minor changes resulting from gain limitations in the VCA. The first change is to set R1 + R3 to 3.8 k according to the compressor formula. The second change involves properly setting the threshold control. The maximum usable gain of the VCA should be limited to 40 dB; however, for a -80 dBV input and a -20 dBV unity gain point, the required gain is 60 dB. To only require 40 dB of gain, t he unity gain point should be lowered to -40 dBV by adjusting the threshold control. At the high end, 60 dB of attenuation is required, which is fine since the SSM2120 has a 100 dB attenuation range. The graph in Figure 10 shows flat response of the entire 100 dB input range. Notice, however, that the output level is -20 dBV and not the -40 dBV that the threshold was adjusted to. The extra 20 dB of gain is realized by increasing the VCA's output resistor (R6) from 36 k to 360 k . Figure 9b. Compressor THD + N vs. Frequency (VSY = 15 V, Compression Ration = 2:1, VIN = 0 dBV, with 80 kHz Low-Pass Filter) characteristics are worth pointing out. The bowing of the 2:1 and 4:1 curves below -70 dBV is due to nonlinearities in the VCA control port when trying to realize significant amounts of gain above 20 dB. For the 4:1 compression curve, the transfer function shows some flattening above +10 dBV, which is due to nonlinearities for large amounts of attenuation. The second graph shows the distortion performance of the VCA with 2:1 compression. In doing this sweep, ample time must be allowed for proper settling of the level detector and VCA before the measurement is made. The distinct rise in distortion below 100 Hz is due to control feedthrough. Above this frequency, the averaging capacitor (C5) filters the LOGAV voltage resulting in a dc control signal. However, as the frequency drops below 100 Hz the capacitor can no longer entirely filter the signal, resulting in a low frequency, low amplitude sine wave applied to the control port. Thus, the distortion increases. This can be improved by increasing the averaging capacitor or the filtering cap (C1) at the expense of an increased attack time. This above section has discussed the most general type of compressor, which is equal compression over the entire input dynamic range. In practical applications, many compressors only start compressing the signal once the input level passes a certain threshold. These types of circuits are discussed in the "compressor/ limiter" section below. Figure 10. AGC Transfer Function (VSY = 15 V, fIN = 1 kHz) Linear Expander The complement to a compressor is an expander. Instead of reducing the dynamic range of an audio signal, an expander increases the dynamic range, as the name implies. Figure 11 illustrates this process. As a continuation of the example above, if the audio signal was compressed by 2:1 and stored on an analog tape, expansion recreates the original signal with its dynamic range of 100 dB. The actual circuit is identical to that for the compressor except that the +V C port is controlled as opposed to the -V C port as shown in Figure 12. Deriving the formula for the expander is very similar to the thought process for the compressor above. For example, a 4:1 expansion ratio implies that a Adjusting the Unity Gain Point (Threshold) Looking at the example in Figure 7, the compressor curves pass through unity gain at -20 dBV. With the addition of the potentiometer, R5, shown as optional in Figure 8, this threshold is easily adjusted. The voltage at the wiper of the potentiometer has a one-to-one correspondence with the voltage at CONOUT. This voltage is summed with LOGAV to produce the CONOUT voltage. To increase the unity gain point by 20 dB to 0.0 dBV, the potentiometer needs to be adjusted to produce a voltage of 2.4 V at the wiper. This voltage produces a corresponding -2.4 V at CONOUT. When the input signal reaches 0 dBV, the level detector develops a voltage of -5- 5 dB increase in the input signal results in a 20 dB increase in the output signal, which means that 15 dB of gain is needed. Going through the derivation results in the following formula: Figure 13a shows the transfer function for different expansion ratios revealing linear response over the entire input range. The distortion performance in Figure 13b is very similar to the compressors performance shown above. Again the distortion increases at low frequencies due to control feedthrough. 20 R1+ R3 = R11 - 1 ER - 1 where ER is the expansion ratio. 4:1 2:1 20 2:1 EXPANSION 0 OUTPUT - dB 20dBV 0dBV -20dBV -20dBV 50dB 100dB -50dBV INPUT -80dBV NO EXPANSION -20 -40 -60 -80 -100 EXPANDED OUTPUT -100 -80 -60 -40 -20 INPUT - dB a. 0 20 Figure 13a. Expander Transfer Function (VSY = 15 V, fIN = 1 kHz) b. Figure 11. Linear Expander Functionality R11 200 C4 10pF 7 -VC SIGNAL INPUT SIG IN R12 36k SIG OUT 8 C3 2200pF R6 36k 4 +VC R13 47 SIGNAL OUTPUT SSM2120 1/2 OP275 5 J7 +15V R9 200 R2 10k R7 39k R17 1k R14 10k J5 Figure 13b. Expander THD + N vs. Frequency (VSY = 15 V, Expansion Ration = 2:1, VIN = -5 dBV, with 80 kHz Low-Pass Filter) 1 C2 10F THRESH V+ IREF IIN 9 RECIN 2V Q2 Companding Noise Reduction System The above two circuits can be used in conjunction to form a companding noise reduction system. The block diagram for such a system is shown in Figure 14, where the blocks for compressor and expander are exactly the circuits shown above. The purpose of such a system is to reduce the effects of a noisy storage medium, such as tape. As the graph in Figure 14 shows, the input signal has a wide dynamic range with a low noise floor. The SSM2120 is used to compress this signal such that its minimum signal level is well above the noise floor of the tape. For playback, the signal is passed through the expander half of the SSM2120, and the original dynamic range is restored. Notice that the noise floor of the tape is pushed down to below the minimum signal, greatly reducing tape hiss. Table I lists some common compression and expansion ratios and the resistor values required to achieve these. Please note, this table replaces the one shown in the data sheet. D2 Q1 SSM2120 D1 CONOUT 3 FULL WAVE RECTIFIER LOG AV V- R1 R3 2 SHORT OPEN J5 J7 D1 D2 J1 J2 J3 J4 J6 C1 C5 10F R8 1.5M V- Figure 12. Linear Expander Circuitry Again, R1 and R3 should be the same value and equal to half the sum of the two (R1 = R3 = 1/2 (R1 + R3)), and R11 should be no larger than 200 . Capacitor C1 should be chosen to provide the maximum filtering without increasing the attack time. As with the case of a compressor, a potentiometer can replace J5 and be inserted in series with R1 and R3 if an adjustable expansion ratio is needed. Picking the value of the potentiometer follows the same process as described for the compressor. -6- Table I. Input Signal Increase (dB) Gain (dB) (Reduction or Increase) Compressor Output Signal Increase (dB) Expander Output Signal Increase (dB) Compression/ Expansion Ratio R1 + R3 Compressor R1 + R3 Expander 20 20 20 20 20 20 20 20 6.67 10.00 13.33 15.00 16.00 17.33 18.00 20.00 13.33 10.00 6.67 5.00 4.00 2.67 2.00 0.00 20.00 20.00 20.00 20.00 20.00 20.00 20.00 N/A 1.5:1 2:1 3:1 4:1 5:1 7.5:1 10:1 AGC 11,800 7,800 5,800 5,133 4,800 4,415 4,244 3,800 7,800 3,800 1,800 1,130 800 415 244 N/A AUDIO IN COMPRESSOR TAPE OR OTHER STORAGE MEDIUM EXPANDER +20dBV AUDIO OUT +20dBV 0dBV 100dB -80dBV NOISE FLOOR 50dB TAPE NOISE 100dB -80dBV NOISE Figure 14. Companding Noise Reduction System Figure 15b. Companding Noise Reduction THD + N vs. Amplitude (VSY = 15 V, fIN = 1 kHz, with 22 kHz Low-Pass Filter) Figure 15a shows the actual performance of the overall transfer function of this system. As expected, the input versus output is 1:1 except at the extreme ends where nonlinearities in the control path limit the system linearity. This graph was generated for a 2:1:2 compression/ expansion ratio. Distortion is graphed versus input level for a 1 kHz input signal in Figure 15b. For inputs below -10 dBV, noise dominates the distortion measurement. The overall performance is very good especially considering that the signal passes through two dynamic processing stages. Downward Expander/Noise Gate A downward expander is essentially a modification of the basic expander circuit discussed above and is used to reduce the noise during quiet sections of an audio signal. Instead of expanding the entire dynamic range of the audio input, a downward expander only affects that portion of the signal that is below a selected threshold as shown in Figure 16. As you can see, the transfer function is unity gain until the signal falls below a certain threshold, -40 dBV in this example. Below that point, the signal is expanded downward, pushing the noise floor down below an audible level. Because of this action, this circuit is also referred to as a noise gate. 20 2:1 EXPANSION -40dBV THRESHOLD 0 80dB OUTPUT - dB +20dBV 100dB -40dBV -60dBV NOISE -80dBV EXPANDED OUTPUT INPUT Figure 15a. Companding Noise Reduction System Transfer Function (VSY = 15 V, f IN = 1 kHz) a. -20 THRESHOLD -40 -60 2:1 -80 -100 -80 -60 -40 -20 INPUT - dB b. Figure 16. Downward Expander/Noise Gate -7- 0 20 to a voltage at LOGAV of -60 mV, which is multiplied by 40 to give -2.4 V at CONOUT. Setting the threshold control to -2.4 V produces a positive voltage at CONOUT of +2.4 V. These two voltages cancel out, producing a net voltage of zero. For any signals below -40 dBV, the voltage at CONOUT will go negative, and for inputs above -40 dBV, the voltage at CONOUT wants to go positive. However, since a pull-up resistor is not in place, the voltage remains at zero. Looking at the circuit in Figure 17, you can see that it is very similar to the basic expander circuit with two notable exceptions. A trimming potentiometer is added to control the threshold of expansion, and the resistor R2 has been removed. As the schematic shows, the output CONOUT uses a single PNP transistor to sink current, and it does not have a complementary NPN transistor for sourcing current. The reason for this construction is apparent from the functionality of the circuit. For the SSM2120 VCA to be unity gain above the threshold, the control port needs to see zero volts. With R2 in place, the CONOUT voltage would go positive for large signals. For example, a 0 dB input produces a 2.4 V output. However, with R2 removed, CONOUT is not able to pull high and thus remains at zero. Only until CONOUT pulls downward, does a negative voltage appear on +V C . The voltage at CONOUT is graphed as a function of the input voltage to further illustrate this point. R11 200 C4 10pF 7 -VC SIGNAL INPUT SIG IN R12 36k SIG OUT 8 C3 2200pF R6 36k 4 +VC R13 47 SIGNAL OUTPUT SSM2120 Figure 18a. Downward Expander Transfer Function (VSY = 15 V, fIN = 1 kHz) 1/2 OP275 5 R9 200 J7 R5 100k J2 R14 10k J4 V- 39k C2 10F R7 39k R17 1k 1 V+ J5 THRESH IREF 9 FULL WAVE RECTIFIER RECIN 2V CONOUT IIN R1 R3 3 Q2 C1 Q1 SSM2120 LOG AV V- 0.0V 2 SHORT OPEN J2 J4 J5 J7 D1 D2 J1 J3 J6 C5 10F R8 1.5M -40dBV 0dBV INPUT Figure 18b. Downward Expander THD + N vs. Amplitude (VSY = 15 V, fIN = 1 kHz, with 22 kHz Low-Pass Filter, 2:1 Expansion with -20 dBV Threshold) V- Figure 18a shows the actual response of the circuit for various threshold settings. R1 + R3 is set to 3.8 k for 2:1 expansion below the threshold, and the control pot is adjusted for three different threshold settings. The distortion versus amplitude curve in Figure 18b shows good performance. As before, noise dominates the measurement below -10 dBV. Figure 17. Downward Expander/Noise Gate The threshold potentiometer controls the level below which expansion occurs. Because the trim potentiometer is connected between ground and the minus supply, it is always trying to force the output positive, but the output is not able to go positive. Instead, through superposition, the level detector voltage, LOGAV, must be negative enough to force CONOUT negative. Remember that the voltage at LOGAV is multiplied by a gain of 40 to CONOUT, and the threshold control voltage is unity gain to the output. By comparing these two voltages, the threshold point can be determined. As an example, let's pick a threshold of -40 dBV for the downward expansion. An input of -40 dBV corresponds Compressor/Limiter A compressor/limiter is similar to a linear compressor except that it only takes effect after a certain threshold is reached. In this case, when the threshold is exceeded, the SSM2120 starts to compress the audio to prevent clipping and its associated high distortion. A typical transfer function of this type of circuit is shown in Figure 19 with different amounts of compression. The most ex- -8- treme case is hard limiting, which means that once the threshold is passed, the output level does not increase at all. The control voltage curve that realizes a limiter is shown along with the circuit in Figure 20. Notice that the control voltage is held at ground until the threshold is reached. Above this point, the positive control voltage on the VCA's -V C input results in attenuation. As before, by selecting the proper scaling resistor, any amount of compression can be obtained. signal level is 0 dBV. If the audio equipment can handle over 20 dBV signals, then the top 20 dB is wasted. However, by adding 20 dB of gain, the entire curve is raised to take full advantage of the headroom. At the same time, the low level signals are also amplified, improving noise immunity. The fixed gain can easily be added by adjusting either the input (R12) or output (R6) resistors. For example, lowering R12 to 3.6 k results in +20 dB of fixed gain. Optimizing this adjustment is discussed in the section headed "Optimizing VCA Performance." The top curve in Figure 19 shows the case of adding "make-up gain." When an audio signal is compressed, the top end of the dynamic range of the audio system may not be fully utilized. Make-up gain increases the overall level to bring up the maximum audio signal to just below clipping. Take the example of the 2:1 compressor/limiter curve shown in Figure 19. The maximum 4:1 COMRESSION -20dBV THRESHOLD +20dBV 0 100dB OUTPUT - dB -20dBV -80dBV -80dBV 2:1 COMPRESSION WITH 20dB MAKE UP GAIN 20 -10dBV -20dBV 2:1 4:1 -20 AGC/LIMIT -40 THRESHOLD -60 -80 LIMITED OUTPUT INPUT Notice in the circuit that two diodes have been included as well as the pull up resistor on the output. The resistor enables CONOUT to swing positive, and the diodes prevent the control voltage from going below ground. The threshold control works much the same as for the downward expander circuit. The main difference is that now the threshold voltage is between ground and the positive supply. Thus, this voltage tries to force CONOUT to a negative voltage. When CONOUT is negative, diode D1 is on, causing the voltage at V1 to follow CONOUT plus approximately 0.6 V. Not until the voltage at CONOUT reaches ground does the voltage at V1 rise high enough to turn D2 on. Once this occurs, the voltage on the cathode of D2 follows CONOUT. The actual diodes used are not critical and 1N914 types work fine. Just remember that any mismatches in the diodes result in errors in the threshold level. For best accuracy, matched diodes should be used. -80 -60 -40 -20 INPUT - dB a. 0 20 Figure 21a shows that the measured transfer function is very close to the ideal curves of Figure 19. The distortion performance in Figure 21b is very similar to the performance of the expander circuit. b. Figure 19. Compressor/Limiter R9 200 C4 10pF 5 +VC SIGNAL INPUT SIG IN R12 36k SIG OUT 8 C3 2200pF -VC R13 47 SIGNAL OUTPUT SSM2120 2:1 COMPRESSION 1/2 OP275 7 R11 200 J7 20dB MAKE-UP GAIN R6 36k 4 R5 100k J3 R14 10k HARD LIMIT THRESHOLD V+ J1 R16 39k C2 10F R17 1k R7 39k 1 V+ J6 R2 1k THRESH IREF 9 FULL WAVE RECTIFIER RECIN CONOUT IIN D1 3 D2 R1 2V Q1 SSM2120 LOG AV 2 SHORT OPEN J1 J3 J6 J7 J2 J4 J5 C5 10F Figure 21a. Compressor/Limiter Transfer Function (VSY = 15 V, fIN = 1 kHz) V1 Q2 R3 V- C1 R8 1.5M V- 0.0V -20 INPUT - dBV Figure 20. Compressor/Limiter Circuitry -9- from -40 dBV to +20 dBV. First, RJ1, 2 should be connected to V+ and RJ3, 4 should be connected to V-. Remember, the threshold corresponds to the point where CONOUT = 0.0 V. A +20 dBV input produces +4.8 V at CONOUT. To set the threshold at this point, the voltage at the wiper of the pot needs to be +4.8 V to produce a net voltage at CONOUT of 0 V. For a -40 dBV threshold, the voltage at the wiper needs to be -2.4 V. These voltages correspond to the wiper being at extreme ends of the pot as shown in Figures 22b and 22c. Now the resistor divider networks need to be solved for the two resistors' values. Remember that the THRESHOLD input is a virtual ground whose potential is within 200 mV of ground at all times. For practical purposes, the point can be assumed to be at ground at all times. The resulting error from this assumption is typically less than 1 dB. Solving for the resistor values by using multiple iterations in SPICE results in RJ1, 2 = 43 k and RJ3, 4 = 68 k . Figure 21b. Compressor/Limiter THD + N vs. Amplitude (VSY = 15 V, fIN = 1 kHz, with 22 kHz Low-Pass Filter, 2:1 Compression Above -20 dBV Threshold) Combining a Limiter with a Downward Expander The above two circuits can easily be combined to result in a circuit that utilizes both downward expansion for low level signals and compression or limiting for high level signals. Both level detector sections are used with only one of the VCAs. The second VCA can either be used for a different function or left unused. One of the level detectors is configured as a downward expander and the second as a compressor/limiter. The outputs of the detectors feed into the respective complementary control ports of the one VCA. To accomplish this on the demo board a jumper wire needs to be connected between the output of the second level detector and the control port of the opposite VCA. Optimizing the Usable Range of the Level Detector In some situations, it may be desirable to change the usable voltage range of the level detector making it more sensitive at the low end or more linear at the high end. This is easily done by adjusting the value of the 10 k input resistor to RECIN. The level detector is actually detecting the amount of current into its RECIN input, and the resistor is needed as the voltage-to-current converter. Changing this resistor optimizes the level detector for different input voltage ranges. The level detector has a sensitivity that ranges from 10 nA to 1 mA. For a 10 k resistor, this corresponds to a voltage range of 100 V to 10 V. At the two ends of the range, the linearity does suffer. Thus, if the application requires accuracy for small voltage inputs and is not concerned with the high end of the range (such as for a downward expander), the resistor should be reduced. For example, to detect signals down to 10 V, the resistor should be changed to 1 k . The opposite is true if accuracy is needed for only high level signals (such as for a compressor/limiter). In this case, the resistor should be increased. In either case, the ratio is still 3 mV/dB at V LOGAV and 120 mV/dB at V CONOUT . Limiting the Threshold Adjustment Range In many applications, the threshold for compression or expansion may be adjustable by the end user of the audio equipment. In such cases, the threshold adjustment range can easily be limited by adding resistors in series with the trimming potentiometer as shown in Figure 22a. The resistors are labeled RJ1, 2 and RJ3, 4 to signify that they are used in place of the jumpers, J1 or J2 and J3 or J4. As with the jumpers, the connection of the resistors can be to either supply or ground depending on whether the application is for a compressor or an expander. Changing the value of the resistor will change the dc output level at CONOUT for a given input voltage. Instead of a -20 dBV input corresponding to CONOUT = 0.0 V, a 1 k input resistor results in a -40 dBV input An example best illustrates how to determine the values of the two resistors. Take the case of the compressor/ limiter shown in Figure 20 with an adjustable threshold V+ OR GND V+ RJ1, 2 RJ1, 2 R5 100k V+ RJ1, 2 39k R16 39k +4.8V THRESHOLD 100k 39k THRESHOLD -2.4V RJ3, 4 RJ3, 4 GND OR V- a. THRESHOLD 100k RJ3, 4 V- V- b. c. Figure 22. Adjusting the Threshold Adjustment Range -10- Adjusting the resistors is also helpful in producing a fixed gain or attenuation in the part. The VCA performs best when its operated with a control input of zero volts, keeping the VCA in unity gain. However, if the optimal system condition is to have a nominal gain of 20 dB, then this fixed gain should be produced by scaling the input and output resistors. This could occur when the input level is a maximum of 0 dBV and the desired output level is 20 dBV. In this case, the input resistor should be decreased to 3.6 k and the output left at 36 k . giving CONOUT = 0.0 V. Remember, the input current that corresponds to zero volts out is always 10 A. Whatever voltage, resistor combination provides 10 A will result in zero volts out. Optimizing VCA Performance Another degree of flexibility with the SSM2120 is the adjustment of the input and output resistors. In all the above applications, these resistors default to 36 k . However, by increasing or decreasing these resistors, the VCA can be optimized for the audio signal level. For example, if the audio level has a maximum level of 0.0 dBV, the input and output resistors can be lowered to 3.6 k . The main consideration to keep in mind is that the maximum current into the VCA is 400 A. Therefore, just divide the peak input voltage by 400 A to arrive at the input resistor value. Operating the VCA close to its peak input level ensures the maximum signal to noise ratio. One comment should be made about the two 200 resistors from the VCA's control ports to ground. These resistors are needed to divide down the control voltage at CONOUT and scale it for the VCA. A user may be tempted to increase these resistors depending on the resistor divider requirements. However, these resistors should never be increased above 200 . Doing so increases the distortion and noise of the VCA. -11- -12- PRINTED IN U.S.A. E2060-9-9/95