# Automatic gain control (AGC)

#### omar675

Joined Apr 5, 2018
5
Hello everyone
I have a project for my electronics course where iam supposed to build a speech amplifying circuit that has a constant output no matter how loud or low the input is (if i speak loud the circuit is supposed to lower the gain and if i speak with a low tone the circuit is supposed to increase the gain with both outputs being the same)
Now we have a circuit and we tried to simulate it using orcad we used different input voltages and we are supposed to get the same gain for all but we kept getting the wanted result for the upper not the lower part

#### Attachments

• 247.4 KB Views: 73
• 140.3 KB Views: 88

#### omar675

Joined Apr 5, 2018
5
Sorry i meant we get the wanted result in the lower region not the upper

#### AlbertHall

Joined Jun 4, 2014
12,346
That circuit won't keep the output at the same level though it will reduce the range of variation - it will compress the compress the audio range.
You might try a non-inverting integrator with gain between C1 and R5. You will have to play with the gain and integrator time constant to get suitable performance and stability.

#### crutschow

Joined Mar 14, 2008
34,403
The problem with that circuit is that the gate-source voltage is modulated by the signal, causing a variation in FET on-resistance between the positive and negative peaks of the signal, generating the observed asymmetry.

Here's a circuit that connects the FET to shunt the signal to ground so that can't happen.
It uses a P-FET instead of an N-FET.

What's the desired dynamic range of the AGC, i.e. the softest to the loudest signal.

Last edited:

#### DickCappels

Joined Aug 21, 2008
10,168
I would increase R2 so lower gain is possible.

#### crutschow

Joined Mar 14, 2008
34,403
I would increase R2 so lower gain is possible.
Why do you want a lower gain?
A lower gain increases the minimum input voltage that can be corrected by the AGC loop.

#### DickCappels

Joined Aug 21, 2008
10,168
Why do you want a lower gain?
A lower gain increases the minimum input voltage that can be corrected by the AGC loop.
From his correction below I take
It tyat the loop cannot turn down the gain sufficently.

Sorry i meant we get the wanted result in the lower region not the upper

#### crutschow

Joined Mar 14, 2008
34,403
From his correction below I take
It tyat the loop cannot turn down the gain sufficently.
I believe he was referring to the distortion where the bottom half of waveform is distinctly different from the top half.

#### DickCappels

Joined Aug 21, 2008
10,168
Now that you have said that the TS's comment is ambiguous. I agree he might be talking about distortion.

#### omar675

Joined Apr 5, 2018
5
Hello again
First, thank you all for the help
We got the circuit, modified it, and we tested it and got it working, as shown in the pictures i uploaded.
However, the speaker that is required to use is 8 ohms and since it will be connected parallel to the 10k resistor, it reduced the 10k value too much which caused the circuit to not function the way the way that we needed, I was adviced to use an amplifier, but i really didn't know how to use....
Sorry but some help would be really appreciated again

#### Attachments

• 287.8 KB Views: 45
• 233.8 KB Views: 42

#### AlbertHall

Joined Jun 4, 2014
12,346
LM386 is a simple to use audio amplifier. It can take the signal from your output and feed a speaker. From the datasheet: