• Register
  • Login
  • Search 4 million + Products
    this message might be for you!

    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


    79 Oscillographs

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



    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.

    ask a question

    62 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. 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. 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


      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. 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 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. 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 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. 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 ?

    17. Hi Jim,

      Thanks for making your circuit and comments available. I’m feeding the output of a simple MP3 player into the input of our phone system ‘music on hold’ line. Not sure of the impedance of either but I assume the MP3 is low Z and the phone board is a 1 volt consumer input. I want to compress the input to work within the narrow phone audio bandwidth. If you think your circuit (or something else) will do that, let me know and I’m on it.

      Being an ME not an EE I’m talented at using electrons to make beautiful curls of smoke. Consider that in your response.

      Best, Bob

    18. The signal levels are close enough to work well. Note that this circuit does not ‘compress’ or shape the audio bandwidth –what this circuit does is to provide a relatively constant signal output voltage level regardless of the input level. Don’t worry about audio bandwidth because the telephone transmission line (600Ω) will limit the frequency response.

      • Thanks Jim. I appreciate the cogent response.

      • Keith Hi!The input impedance of the Studer reel to reel tape recorder was 600 ohms! The mic input of Uher was 200 ohms Revox was the same as the parent Studer I own them that is why I know.These were all studio machines!The impedance do not have such a role in frequency response

      • Jim Keith says: on December 29, 2014 at 4:14 pm

        Agree! What I was attempting to say is that is is unnecessary to shape the frequency response to match that of the relatively poor 600Ω telephone transmission line –a long line will do its own thing, but short lines are excellent…

    19. Mustafa Kaan ÇAN says: on January 15, 2015 at 8:19 pm

      Hey Jim,
      I can’t make this design work on any simulations, opamp seems to be stuck in SAT. What may be wrong? Please help.

      • Jim Keith says: on January 15, 2015 at 9:46 pm

        Cannot guess –simulators are often more cranky than the real world. My suggestion is to remove the JFET and get it working as a simple non-inverting amplifier –proceed from there…

      • Jim Keith says: on January 15, 2015 at 11:30 pm

        Make sure that the op amp Vcc and Vss are properly defined –common problem

    20. Hey all,
      Does anyone has the formulas for calculating the schematic ? I need them for my documentation in a school project.
      Thanks in advance!

      • Jim Keith says: on February 4, 2015 at 3:47 pm

        All the math is very simple:
        The DC operating point is set at half of Vcc via the ratio of R4 to R4 + R5. C2 is the bypass capacitor and R3 conducts the op amp input bias current. C1 acts as a high pass filter –the 3db point is where the XC1 = R3.

        The minimum attenuation of the input variable attenuator = R3 /(R2 + R3) = 1.2db.

        Maximum attenuation = min RDSon of Q1 / R2 = 125Ω / 150K = -61.6db.

        Av of amplifier = (R7 + R6) R6 = 50db

        Lower 3db point of amp is where XC4 = R6, upper 3db point is where XC7 = R7

        Values of R8, R9, R10 & C3 were determined empirically –or whatever seemed to work OK.

        Hope that this is helpful.

      • Thanks Jim. Those are the calculations i needed.

    21. Can you suggest how I can use your circuit to connect either a dynamic mic (aprox 1.5 to 2.5mV) or an electret mic (aprox 25 mV)along with the required electret biasing? I need to connect both to the same input lines.


    22. Henry Hargreaves says: on February 24, 2015 at 4:48 pm

      I have tried to build the circuit and am getting some strange results. Essentially the problem is, when i input a sine wave >200Hz with a pk-pk voltage of anything greater than 500mV the output becomes very distorted. At high frequencies this problem does not occur or if the pk-pk voltage of the input is brought right down, again the problem is no longer present. If possible i would very much appropriate it if you could have a look at the pictures attached and tell me if you can see if i have made a mistake.

      Output https://www.dropbox.com/s/55nh9bke57l0gep/Untitled.png?dl=0

      My circuit: https://www.dropbox.com/s/q40j2tfp39tv2s1/IMG_20150223_203327.jpg?dl=0

      • Try increasing the value of C3 substantially –if the gate voltage to the FET changes significantly between pulses, it could react in this fashion –especially at low frequencies. I do not think that I tested my circuit at all frequencies and signal levels. Of course you could reduce the amplitude of the input signal as 500mV is quite large.

    23. hey i am not being able to find the Q175 component can someone suggest me an alternative to that JFET?

    24. The J175 P-channel junction FET is available from DigiKey:

      Also check out the 2N5460.

      I have used the 2N5462 in the past.

      All (3) of these are available on ebay.

    25. hi! I am not able to find IC TL081 could you suggest any alternate op-amps that could work here? I used IC OP07CP the simulation results show that the output gets clipped once the i/p voltage crosses 900mV.

    26. I the first paragraph of the circuit you refer to Q1 as a P-Channel JFET but the schematic shows it as an N-Channel. Which is correct? Just and old audio engineer here with an expiring mind…

      • Jim Keith says: on May 4, 2015 at 4:01 am

        Yes, it is a P-Channel device and yes, I always seem to get my FET symbols backwards–my apology

    27. how to adjust the peak detector voltage (ex: 1.5v). When it crosses only gain should be adjusted?

    28. Sergey Moryakov says: on August 5, 2015 at 5:04 pm

      Clear and helpful, thanks!

    29. Good job. How to adjust it for single 5V power supply system?

    30. How about a Corrected Schematic (FET P vs N and of course, a CURRENT Op amp IE LM324 quad, single voltage). LEHenson (at) msn com AE6JI need for an Electronics teaching program. 73’s

      • Jim Keith says: on November 29, 2015 at 2:32 pm

        Check out the updated schematic with the correct P Channel JFET symbol. On the op amp, the TLO81 is a more recent device than the old LM324 and is superior for audio applications –reduced crossover distortion and better frequency response. Of course, there are many other suitable and perhaps newer devices that will work well.

    31. Hi! What changes if any to use 9V battery instead of 12V?

    32. prakashilumi-co says: on March 10, 2016 at 3:00 pm

      I would like to apply 3.3V to the circuit, can anyone know what all are the changes and calculations needs to be done.

      • This can be made to work if we can find /select an N-Channel device that pinches off @ 3.3V. The output level will remain the same, but the available headroom will suffer. By substituting an LM339 or equiv comparator for Q2 the output level may be reduced (or even made settable via a pot)–in that case, the headroom will be preserved. Note that a low voltage op amp must be selected–I have little experience with low voltage op amps.

      • woops, I meant P-Channel. The J176 has a gate-source cut off voltage range of 1 to 4V. A selected device is required.

      • singh-gurbaj5124871gmail-com says: on April 15, 2016 at 7:19 pm

        Hey jim, I have a doubt, while using sine wave as input, it has zero dynamics, there is no need for compression only amplifier is enough, so when i use .wav as input it is not working as ac transfer characteristics of amp gives gain only till 1k freq but i need at least 10k. Please help….

      • It seems to me that C7 may be unnecessarily large for high frequency response–I may not have actually measured frequency response. Reduce the size or eliminate C7 to see what happens.

    33. prakashilumi-co says: on March 14, 2016 at 8:50 am

      Hey Thanks.
      1. I have selected MMBFJ177 (Vgs (off) 0.8 to 1.5V) mosfet, can you please verify whether this will work or not for 3.3V operation

      2. The Max attenuation formula I think is, Maximum attenuation = min RDSon of Q1 / (R2 + min RDSon of Q1), can you please verify

    34. cdevilscute624gmail-com says: on March 14, 2016 at 9:23 am

      hey can you please help me out with the part of the circuit where the signal gets compressed and how to control the compression ratio and the attack time of the signal.
      Moreover could you suggest me some good articles for understanding the basics of compression
      Please reply as soon as possible

    You need to log in if you need to post comments on ElectroSchematics.com or register if you do not have an account.