• Register
  • Login
  • This is an audio compressor/AGC (automatic gain control) with an astonishing 75db input voltage range. A P-Channel JFET is used as a variable resistance element that is applied as a variable attenuator. Distortion is minimized by keeping the signal voltage across the JFET extremely low (1.3mV). This is an improvement over similar circuits that place the variable gain element in the op amp feedback circuit where it supports high signal voltages and subsequently introduces significant distortion.
    AGC attack time & recovery time may be adjusted by altering resistor values. Signal input levels cover the range of 1.5mV to 8.3V. The output signal level is close to the consumer audio standard of -10dbV.

    Schematic of Audio Compression Amplifier Circuit

    Audio Compressor AGC Schematic

    Circuit function

    The circuit consists of four basic sections: Variable attenuator (R2 & Q1), fixed gain amplifier (U1) and amplitude detection (Q2) & Q1 bias control.

    R1 provides a resistive load for the dynamic microphone – it may vary from about 150 to 600Ω for low impedance microphones to about 50K for high impedance microphones. If a transformer is used to convert the balanced line to unbalanced, R1 = square of the turns ratio times the microphone impedance.

    The attenuation caused by R2 and the dynamic resistance of Q1 is a function of the JFET DC gate voltage: +6V provides no attenuation and 0V provides maximum attenuation.

    The amplifier is a textbook non-inverting amplifier using a TL081 op amp. Note that there are many suitable operational amplifiers that may be used and some are better for audio than others. R4 & R5 set the single-supply amplifier bias point midway between 0 and 12V. C2 bypasses this point to ground potential and R3 provides a DC path for the extremely low op amp bias current (perhaps a few picoamperes).

    The amplitude detector is very crude as it detects only the positive going signal excursion. When this signal voltage exceeds 0.65V, Q1 turns on and starts to discharge C3 through R10 – the lower the value of R10, the faster the attack time. The attack time must not be so fast that it responds to every peak, nor so slow that it takes too long to bring the signal level down to normal.

    When no peaks are detected, C3 continues to charge via R9 thus reducing the attenuation of the variable attenuator. The resistance of R9 controls the recovery time. The attack time is generally one or two orders of magnitude faster than the recovery time. I experimented with a voltage clamp circuit that prevented the gate voltage from exceeding 6V, but found that it was unnecessary.

    The JFET (Q1) has a sloppy range for the Vgs off parameter (3 to 6V). This tends to vary the bias clamp voltage, attack time and recovery time. For repeatable results, it is recommended that devices be selected for a tight range of Vgs off.

    db website http://www.sengpielaudio.com/calculator-db-volt.htm

    This is a great reference website that covers db signal level units (dbV in this case) and db signal ratios (voltage gain and voltage attenuation).

    For a primer, check out this table of common ratios:

    Voltage gain Voltage attenuation
    1 db – 1.1 -1db – 0.9
    3 db – 1.4 -3db – 0.7
    6 db – 2 -6db – 0.5
    10db – 3 -10db – 0.3
    20db – 10 -20db – 0.1
    30db – 30 -30db – 0.03
    40db – 100 -40db – 0.01
    50db – 300 -50db – 0.003
    60db – 1000 -60db – 0.001

    Oscillographs

    79 Oscillographs

    Observe the nice sine waves – minimal distortion for both low and high input voltage signals.

    Photos

    Conclusions

    This was a fun experiment – the results far exceeded my expectations and I believe that it will likely become a favorite among audiophiles. Going with a split power supply (±15V) would enable it to output studio level signals with satisfactory headroom.

    For the future

    Intelligent gain control – a means of reducing short term cyclic gain variations (“breathing”).

    Undocumented words and phrases – for our ESL friends

    headroom (or headspace) –noun –literally, the space about one’s head such as in an automobile –in electronics it refers to excess signal level range that may be required for faithful reproduction of audio sound transients.

    
    subscribe to newsletter

    29 Responses to "Audio Compression Amplifier /AGC"

    1. We like to think that agc in audio equipment is novel and all that! I serviced a Kudelski Nagra battery tape recorder built around 1958 and it had only automatic gain when recording and running at 15 inches per second FULL TRACK Novel idea in any case

    2. Another audio line device that is used in AM transmitters is the “Limiter.” It is different from the compression amplifier in that it deals only with the instantaneous peak of the modulating signal level in order to prevent over-modulation. Over-modulation occurs when the carrier is fully suppressed –upon restoring the carrier, frequency splatter occurs that causes wide-band RFI –something that is not allowed.

    3. Jim, So for ±15v, would anything need to be done other than connecting TL081 pin 4 to -15v, connecting R3 to ground, and removing R4, R5, and C2?
      Thank you.

      • Eliminate C1,4,5 by replacing with jumpers
        Omit C2, R3,4,5
        The DC gain of the op amp = (R7 + R6) /R6 = 330.
        This gain also amplifies the input offset voltage so that it can interfere with the voltage threshold detector (Vbe of Q2). So make sure you use a device with low input offset voltage e.g. 0.1mV.

    4. Randy Constan says: on April 24, 2014 at 7:54 pm

      Thanks for an excellent article. I’ve used VACTROLS in the past for compression, but have always wanted to experiment with the FET method, and heard a lot of negatives about variations in which the FET was embedded in the actual gain determining resistor network of the OP AMP. This one seems to avoid that, and probably has less distortion. I also tend to believe that in a battery powered situation, your circuit would have good immunity to changing voltage as a battery discharges.

      I have a very specialized but a bit off topic reason for needing a circuit like this. Since it is a bit off topic, would you mind terribly pinging me at the email address I’ve provided? I suspect you may have a fresh opinion on something that has my mind going in circles.

      • Note that I am not the webmaster here and do not have access to your email addresse.

      • Randy Constan says: on April 28, 2014 at 4:58 pm

        Jim… I sent you my email addy to your gmail account. posting it visibly here would be an invitation to a spam harvesters. Feel free to delete this msg, but email me if you can.

      • That gmail account got crosslinked with my wife’s account when my granddaughters attempted to set up a facebook account for her. While it exists, it is hopelessly screwed up–thanks google…NOT! Try to find me on ebay.

      • Randy Constan says: on April 28, 2014 at 11:30 pm

        Done. When you see the email in my ebay message, just substitute the AT symbol for **AT**

    5. krokkenoster says: on April 25, 2014 at 10:03 pm

      Guys the TL 071 has a lower noise figure and lower offset as the TL081 I tried both and in a tape recorder the noise in that case was audible.

    6. Randy Constan says: on June 6, 2014 at 5:10 pm

      Jim,

      I’d like to use this circuit in a portable guitar amplifier, to prevent final stage distortion when the player gets near the max available power. The proper setting to make the AGC effect “kick in” just at the optimum time will be much easier to attain, if I could add some kind of simple LED indicator indicting when the circuit is beginning to have an effect. This might also be useful to the end user as a kind of “clipping” indicator, even though the actual effect will be to prevent clipping. Do you have any thoughts on the easiest way (meaning minimum parts) to accomplish this?

    7. Is it possible to use pots for attack & recovery time? If so the third pin of the pot must be grounded or no?

      • Connect the pots as rheostats (2 terminal devices) –leave one end open –make the pot values at least double the ‘center’ value so the resistance may be both increased or decreased –add fixed resistors in series with the pots to limit minimum resistances.

      • **Thanks..

    8. Great article ! I’m thinking of adding http://www.electroschematics.com/552/lm386-audio-amplifier/ this LM386 audio amplifier . Any advices or suggestions for successfully finishing this project will be accepted. Thanks in advance

      • Appears to be a perfect match–simply run the output of the compression amp level control into pin 3 of the LM386. Use audio taper potentiometer for best results. Use gain circuit B.

    9. Rodney Jackson says: on November 23, 2014 at 10:09 am

      This article is fantastic, as usual. Well done Jim. I might knock this circuit up and compare it to the earlier circuit I used. Just for comparison.

    10. for the LM386 amplifier the values for C1 and C3 i choosed 75uF and 360uF. Are they appopriate ?

    11. Hi,how the gain is controlling in audio compression circuit.plz i need more explination

    12. hi again! i want to use this compressor for my soundcard output line, not for mic. Do I have to change resistor values for proper impedance matching? The output impedance of my card is 200ohm and the input impedance is for instrument 1MOhm and for mic 3kOhm. (I gonna loop the signal back). And something else, the R1 is the virtual load right? should not be included in the real circuit, am i right?

      • Jim Keith Jim Keith says: on November 26, 2014 at 3:25 pm

        You have it correct –R1 is not required unless using a low Z studio mic that needs matching for specified frequency response. Also, audio amp outputs generally do not need matching unless attempting to obtain maximum output power.

    13. Jim Keith Jim Keith says: on November 26, 2014 at 3:27 pm

      Will be incommunicado for Nov 26 to 29…

      • thnx for your respond! Is there any chance to remember the phase difference and the iput/output impedance values?

      • Jim Keith Jim Keith says: on November 26, 2014 at 4:29 pm

        This is simply a non-inverting amplifier with low phase shift over the audio freq range. Input Z (neglecting R1) ranges from 150K (max atten) to 1.15M (min atten). Output Z is roughly 50Ω directly out of the op amp and need not be matched –this neglects the reactance of C5.

    14. Is it possible make the threshold value adjustable?

    15. Jim Keith Jim Keith says: on December 3, 2014 at 11:13 pm

      Yes, the threshold (output level) may be made adjustable to a certain extent. This circuit provides a 6db range. The drawback is that it reduces amplifier headroom so that it may add more distortion at transient signal levels. Most of the effective pot range will be at the lower resistance settings –log taper pot desirable.

    16. I want the input signal to be from my iphone. I”ll be using usb cable and connector but I”ll also need digital analog converter and low frequency filter, right ?

    What do you think about this article? Leave a comment!

    You may add a picture too (related to electronics)