Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

automatic gain control circuit

220 views
Skip to first unread message

Fibo

unread,
Oct 15, 2015, 11:55:13 AM10/15/15
to
Hello,

I'm trying to come up with an automatic gain control circuit that can normalize a 50Hz sine wave of varying amplitude (50mV to 5V), to an output of the same sine wave but with an amplitude of 4.8V. (I'm looking at a max of 1kHz)

My first thought is to try a voltage controlled amplifier with a peak detector used in it's feedback circuit, the peak detector would feed an op-amp with a 4.8V reference that represents the highest peak output I would like and that op-amp would adjust the voltage controlled amplifier until that peak voltage is reached.

I'm trying to simulate this using TI's VCA810, but I haven't been able to get it to work.

Can anyone recommend a a circuit to achieve this AGC design? Does my approach make sense?

much thanks!

Jim Thompson

unread,
Oct 15, 2015, 12:27:24 PM10/15/15
to
On Thu, 15 Oct 2015 08:54:58 -0700 (PDT), Fibo <panf...@gmail.com>
wrote:
For a slowly varying input you can probably get it to work. You might
be better off with a CdS photocoupler in the feedback path of an
OpAmp.

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.

John Larkin

unread,
Oct 15, 2015, 12:28:49 PM10/15/15
to
On Thu, 15 Oct 2015 08:54:58 -0700 (PDT), Fibo <panf...@gmail.com>
wrote:

That should work if you close the loop carefully.

A better detector would help. An active full-wave rectifier followed
by an active lowpass filter would be a good start. Then, basically, a
PID controller. Working down to 50 Hz, your loop will be slow,
ballpark 1 Hz maybe.


Jim Thompson

unread,
Oct 15, 2015, 1:31:51 PM10/15/15
to
On Thu, 15 Oct 2015 09:27:18 -0700, Jim Thompson
<To-Email-Use-Th...@On-My-Web-Site.com> wrote:

>On Thu, 15 Oct 2015 08:54:58 -0700 (PDT), Fibo <panf...@gmail.com>
>wrote:
>
>>Hello,
>>
>>I'm trying to come up with an automatic gain control circuit that can normalize a 50Hz sine wave of varying amplitude (50mV to 5V), to an output of the same sine wave but with an amplitude of 4.8V. (I'm looking at a max of 1kHz)
>>
>>My first thought is to try a voltage controlled amplifier with a peak detector used in it's feedback circuit, the peak detector would feed an op-amp with a 4.8V reference that represents the highest peak output I would like and that op-amp would adjust the voltage controlled amplifier until that peak voltage is reached.
>>
>>I'm trying to simulate this using TI's VCA810, but I haven't been able to get it to work.
>>
>>Can anyone recommend a a circuit to achieve this AGC design? Does my approach make sense?
>>
>>much thanks!
>
>For a slowly varying input you can probably get it to work. You might
>be better off with a CdS photocoupler in the feedback path of an
>OpAmp.
>
> ...Jim Thompson

Found this....

<http://www.lynx.bc.ca/~jc/NSL32-SR3modeling.html>

If honey-do chores permit ;-) I'll see if I can roll a Spice model
from this information.

rickman

unread,
Oct 15, 2015, 1:40:09 PM10/15/15
to
On 10/15/2015 1:31 PM, Jim Thompson wrote:
> On Thu, 15 Oct 2015 09:27:18 -0700, Jim Thompson
> <To-Email-Use-Th...@On-My-Web-Site.com> wrote:
>
>> On Thu, 15 Oct 2015 08:54:58 -0700 (PDT), Fibo <panf...@gmail.com>
>> wrote:
>>
>>> Hello,
>>>
>>> I'm trying to come up with an automatic gain control circuit that can normalize a 50Hz sine wave of varying amplitude (50mV to 5V), to an output of the same sine wave but with an amplitude of 4.8V. (I'm looking at a max of 1kHz)
>>>
>>> My first thought is to try a voltage controlled amplifier with a peak detector used in it's feedback circuit, the peak detector would feed an op-amp with a 4.8V reference that represents the highest peak output I would like and that op-amp would adjust the voltage controlled amplifier until that peak voltage is reached.
>>>
>>> I'm trying to simulate this using TI's VCA810, but I haven't been able to get it to work.
>>>
>>> Can anyone recommend a a circuit to achieve this AGC design? Does my approach make sense?
>>>
>>> much thanks!
>>
>> For a slowly varying input you can probably get it to work. You might
>> be better off with a CdS photocoupler in the feedback path of an
>> OpAmp.
>>
>> ...Jim Thompson
>
> Found this....
>
> <http://www.lynx.bc.ca/~jc/NSL32-SR3modeling.html>
>
> If honey-do chores permit ;-) I'll see if I can roll a Spice model
> from this information.

I worked on a board that used a photocell gain control circuit. The AGC
loop was closed through software. The first pass oscillated like crazy
until we realized the coupler had ms of delay. Of course it oscillated!
We had to restrict the max gain setting to make it stable.

I'm not sure why a photocell is better than the VCA.

--

Rick

bitrex

unread,
Oct 15, 2015, 1:43:35 PM10/15/15
to
Wouldn't the LM13700 be pretty well suited to this? I think it has AGC
circuits right in the datasheet.

At these low frequencies the easiest way to build a hard peak-limiter
would be to have the rectifier/filter feed a a coupled LED/LDR in the
feedback loop of an opamp. Just wrap heat-shrink around them and seal it up.

bitrex

unread,
Oct 15, 2015, 2:03:22 PM10/15/15
to
I think the few commercially-available OTAs suitable for building a
quick-and-dirty VCA only have a very limited linear voltage input range;
a couple tens of millivolts. So noise could be a factor?

Tim Wescott

unread,
Oct 15, 2015, 2:14:14 PM10/15/15
to
What's the signal on the sine wave? If you're just trying to recover
phase or frequency information then skip the AGC altogether. Run the
thing into a good fast comparator and what comes out the other end will
be nicely squared up. Then if you must have a sine wave you can filter
the snot out of it.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

George Herold

unread,
Oct 15, 2015, 2:21:00 PM10/15/15
to
Coo, they aren't giving the VCA810 away.
For less than that you can buy an analog multiplier.
Scroll down here and they have an AGC circuit.
http://www.analog.com/media/en/technical-documentation/data-sheets/AD633.pdf

How are you resetting the peak detector?

George H.

Fibo

unread,
Oct 15, 2015, 4:02:38 PM10/15/15
to
Thanks for all the responses

- I'll probably pass on the OTA solution
- I'm guessing I would use the opto's resistance to change the gain... couldn't I also use a FET in the linear region in a similar way?

- full wave rectifier > LPF > PID, sounds like an interesting approach I'll look into something like this

- multiplier circuit might work too

The circuit would have to handle random signal wave forms as well as sine waves.

Fibo

unread,
Oct 15, 2015, 4:04:34 PM10/15/15
to
I hadn't gotten that far, but maybe just a resistor across the cap... or I might not need to reset it for my application, only when the circuit first turns on... the VCA810 is pricey but this is a one-off so it's tolerable

Tim Wescott

unread,
Oct 15, 2015, 4:25:58 PM10/15/15
to
A CdS photoresistor is going to be a heck of a lot linear than a FET in
the linear region -- you'll get to the same place with a lot less fuss
and muss. Of course if it's a one off then there's a lot of fuss and
muss to be avoided just by buying a VGA or a good multiplier.

What sort of response speed do you need? You need to filter out the
"bumps" from a 50Hz sine wave, which is going to significantly limit your
response speed. There are ways to speed this up (detect zero-crossings
and "filter" by integrating and dumping is one way), but they're error
prone unless you have the right signal.

And, of course, if you're starting with an amplitude-modulated signal,
then the worst thing in the world would be cycle-by-cycle AGC...

If the signal needs to handle random waveforms then make sure you know
_what_ you want to be constant -- the peak to RMS to average absolute
value ratios are all fixed for a sine wave, but are very much not so for
random waves.

tabb...@gmail.com

unread,
Oct 15, 2015, 4:59:21 PM10/15/15
to
ah, you can't just stick it into an oscillator then.

There are so many options. Are vogad ICs still available?


NT

piglet

unread,
Oct 15, 2015, 5:54:23 PM10/15/15
to
On 15/10/2015 21:59, tabb...@gmail.com wrote:
> There are so many options. Are vogad ICs still available?
>

50Hz is within audio range so LM1036 and similar "audio processors"
could do the variable volume (aka gain) function cost effectively.

piglet

Phil Hobbs

unread,
Oct 15, 2015, 6:16:39 PM10/15/15
to
How about a comparator followed by a LP filter? That would be about 25
cents.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510

hobbs at electrooptical dot net
http://electrooptical.net

David Eather

unread,
Oct 15, 2015, 7:46:32 PM10/15/15
to
On Fri, 16 Oct 2015 03:43:28 +1000, bitrex <bit...@de.lete.earthlink.net>
wrote:
Yes it does. But a better circuit might be the ancient NE or SE 571

Phil Allison

unread,
Oct 15, 2015, 9:53:27 PM10/15/15
to
Fibo wrote:
>
>
> I'm trying to come up with an automatic gain control circuit that can
> normalize a 50Hz sine wave of varying amplitude (50mV to 5V), to an
> output of the same sine wave but with an amplitude of 4.8V.
> (I'm looking at a max of 1kHz)

** In audio signal processing, that system is know as a "peak limiter".

The audio is first full wave rectified and used to charge a capacitor via a diode. The charging time constant is made much shorter than the discharging one - for example 2mS and 200ms - known as the "attack" and "release" times.

The cap voltage is used to control system gain, using a JFET attenuator or an app specific IC.

The system rests at high gain with no input, dropping to low gain a few mS after a strong signal appears, returning to high gain in about 600mS if the signal drops to the minimum.

There are errors in the scheme, a signal that rises faster than the attack time will overshoot and maybe clip while during the release time a small signal will be made smaller than the desired output.

Making the attack as fast as possible reduces the first error while making the release shorter causes significant waveform distortion at low frequencies.

With audio signals, if the attack is made longer than about 25mS, the same system expands the dynamic range of the input signal rather than compressing it.

The inherent errors are usually tolerable when applied to a voice or music signal, but may not be so tolerable in your application with its 40dB range requirement which exaggerates errors.


.... Phil
















0 new messages