Author Topic: Simple AGC for audio - preferably SMD  (Read 26296 times)

0 Members and 1 Guest are viewing this topic.

Offline 6SN7WGTBTopic starter

  • Regular Contributor
  • *
  • Posts: 181
  • Country: gb
Simple AGC for audio - preferably SMD
« on: May 06, 2022, 04:25:54 pm »
Am playing about with some pantry AM transmitters. Getting the best out of them requires a fairly constant input level to modulate the RF - that apparent compression not being much of an issue on AM.

The audio feed is a low level - a few hundred mV RMS (generally line level sources), but obviously subject to content.

What I want is a simple AGC that will deliver a pretty much constant 200mV output. Low distortion required, else I will trade the problem I have now (over-modulation creating distortion) for another.

Ideally I'd like to make it SMD due to space. Power is single rail 9V, but circuit can include 78L05 or similar. Audio ground will be same as battery and circuit ground.

I've looked at companders (like NE57x range) but these don't quite tick the box.

I'm thinking a FET acting as a voltage-controlled resistor feeding an op-amp?

Thank you.

 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17813
  • Country: fr
Re: Simple AGC for audio - preferably SMD
« Reply #1 on: May 06, 2022, 06:18:38 pm »
A typical, low-cost integrated solution is something like the MAX9814.
As with most other semiconductors these days, availability is questionable. But if you wanna experiment with it, there are breakout boards available for cheap on Aliexpress, eBay and probably elsewhere.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 7179
  • Country: de
Re: Simple AGC for audio - preferably SMD
« Reply #2 on: May 06, 2022, 07:03:26 pm »
I've looked at companders (like NE57x range) but these don't quite tick the box.

Why not? The NE570/572 would fit exactly to my mind. Playing around with a FET won't be any better.
 

Offline 6SN7WGTBTopic starter

  • Regular Contributor
  • *
  • Posts: 181
  • Country: gb
Re: Simple AGC for audio - preferably SMD
« Reply #3 on: May 06, 2022, 07:25:17 pm »
Perhaps I am missing something, but the companders apply some limiting and some expansion, but don't actually hold at a desired level?
 

Online TimFox

  • Super Contributor
  • ***
  • Posts: 11998
  • Country: us
  • Retired, now restoring antique test equipment
Re: Simple AGC for audio - preferably SMD
« Reply #4 on: May 06, 2022, 07:51:48 pm »
A compander is a direct (instantaneous) mapping from input to output.
A compressor usually has an attack and decay time included.
You can't hold the audio input to an AM transmitter literally constant, but radio stations do compress the dynamic range, usually by decreasing the gain at high signal levels.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 7179
  • Country: de
Re: Simple AGC for audio - preferably SMD
« Reply #5 on: May 06, 2022, 07:57:47 pm »
Perhaps I am missing something, but the companders apply some limiting and some expansion, but don't actually hold at a desired level?

You specified "low distortion required". That leaves clipping out, yes?
Which leaves compression: detecting peak level and using that to control an AGC.
This is exactly what the NE/SA572 does. No one is saying that you need to use the expander as well. It can be used solely as a compressor. The compression factor can be set to your wishes.
And I'm quite certain it will do it much better than your FET. It's what it was built for.

« Last Edit: May 06, 2022, 07:59:21 pm by Benta »
 

Offline 6SN7WGTBTopic starter

  • Regular Contributor
  • *
  • Posts: 181
  • Country: gb
Re: Simple AGC for audio - preferably SMD
« Reply #6 on: May 06, 2022, 07:58:49 pm »
Yes, you're right, I perhaps worded my reply badly. Of course the processed audio won't be 100% flat else it will be a very odd experience.

What I should have said was that I do need a hard limit on upper level to prevent over-modulation, and the compression won't do that?

Equally I don't want just a limiter. else the quiet stuff will be lost/RF will be wasted.

However, I'm no expert, hence the reason for my post...
 

Offline 6SN7WGTBTopic starter

  • Regular Contributor
  • *
  • Posts: 181
  • Country: gb
Re: Simple AGC for audio - preferably SMD
« Reply #7 on: May 06, 2022, 08:00:35 pm »
Perhaps I am missing something, but the companders apply some limiting and some expansion, but don't actually hold at a desired level?

You specified "low distortion required". That leaves clipping out, yes?
Which leaves compression: detecting peak level and using that to control an AGC.
This is exactly what the NE/SA572 does. No one is saying that you need to use the expander as well. It can be used solely as a compressor. The compression factor can be set to your wishes.
And I'm quite certain it will do it much better than your FET.

Indeed, as I need the audio I can't go for the sort of hard clipping one might use for driving disco lights or similar.

OK, will take another look at the NE/SA572.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 7179
  • Country: de
Re: Simple AGC for audio - preferably SMD
« Reply #8 on: May 06, 2022, 08:10:02 pm »
There are a lot of permutations here, but nothing stops you from combining compression with "soft" clipping.
As an example, set the nominal output voltage from the compressor at 100 mv (-6 dB). Then start soft clipping at ~180 mV using a FET or whatever. That would ensure good sound quality without the risk of over-modulating.
 

Online TimFox

  • Super Contributor
  • ***
  • Posts: 11998
  • Country: us
  • Retired, now restoring antique test equipment
Re: Simple AGC for audio - preferably SMD
« Reply #9 on: May 06, 2022, 08:53:03 pm »
In professional broadcasting, where there are legal limits on over-modulation, it is common to use a compressor (so that teenagers do not suffer from dynamic range with their boomety-boom) and a limiter (to avoid illegal modulation).
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 7179
  • Country: de
Re: Simple AGC for audio - preferably SMD
« Reply #10 on: May 06, 2022, 09:03:38 pm »
In professional broadcasting, where there are legal limits on over-modulation, it is common to use a compressor (so that teenagers do not suffer from dynamic range with their boomety-boom) and a limiter (to avoid illegal modulation).

It's actually quite the reverse.
In professional broadcasting, a lot of care is taken to provide best audio quality... meaning no compression and full dynamic rate transmitted.
Over-modulation is not possible.
Where compression happens is during the commercial spots. This makes the spot overly load and penetrating, as more audible power (in the same transmission envelope) can be modulated.
Peak modulation power (or frequency excursion in FM) is always the same.
« Last Edit: May 06, 2022, 09:08:18 pm by Benta »
 

Online TimFox

  • Super Contributor
  • ***
  • Posts: 11998
  • Country: us
  • Retired, now restoring antique test equipment
Re: Simple AGC for audio - preferably SMD
« Reply #11 on: May 06, 2022, 09:21:05 pm »
When my local high-quality classical FM station goes on a two-week fundraising period (something unknown in Europe), I switch to my CD collection and am reminded how much more dynamic range there is in classical CDs.
Over-modulation is always possible, depending on the audio source and the system gain.  With only digital sources, the maximum output level should be well-determined, but I remember college broadcasting from LPs.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 7179
  • Country: de
Re: Simple AGC for audio - preferably SMD
« Reply #12 on: May 06, 2022, 09:35:49 pm »
When my local high-quality classical FM station goes on a two-week fundraising period (something unknown in Europe), I switch to my CD collection and am reminded how much more dynamic range there is in classical CDs.
Over-modulation is always possible, depending on the audio source and the system gain.  With only digital sources, the maximum output level should be well-determined, but I remember college broadcasting from LPs.

You're waffling instead of just saying "this time perhaps I'm not right and someone else is".
Over-modulation is never possible, this would give the AM or FM transmitter power stage major problems.
Enjoy your CD collection.
 

Online TimFox

  • Super Contributor
  • ***
  • Posts: 11998
  • Country: us
  • Retired, now restoring antique test equipment
Re: Simple AGC for audio - preferably SMD
« Reply #13 on: May 06, 2022, 10:24:46 pm »
Nonsense.  You should be more careful with the word "never".
The FCC requires a limiter before an FM transmitter to avoid overmodulation.
With an FM transmitter, over-driving the transmitter will produce illegal frequency deviation, but have no effect on the power stage.
Limiting the input to an FM transmitter is very important, since modern US FM transmissions include the multiplexed-stereo signal and an "HD" or hybrid-digital subchannel as well as the baseband, and the peak levels of the total waveform are what cause overmodulation.
With an AM transmitter, over-driving may cause the output stage problems on the positive peaks, and the negative peaks will give substantial distortion due to clipping.
Whatever can go wrong, will go wrong, and over-driving something is rarely a good idea.
(In my experience with AM broadcasting, we kept a simple CRO on the RF output to see the "dashes" caused by negative overmodulation.)
Since overmodulation is possible, yet bad, radio stations employ peak limiters to avoid it.  They may also compress the signal to reduce the dynamic range to cope with SNR problems.
« Last Edit: May 06, 2022, 10:50:41 pm by TimFox »
 

Offline boB

  • Frequent Contributor
  • **
  • Posts: 341
  • Country: us
    • my work www
Re: Simple AGC for audio - preferably SMD
« Reply #14 on: May 06, 2022, 10:38:00 pm »

Check out  parts from THAT Corp.

Log amp and VCA will do the trick in addition to an op-amp or two.

They may (they used to) also have both in a single package but haven't looked at their SMT offerings since I used to design in their parts around 30 years ago...

http://thatcorp.com/THAT_Dynamics_Processing_ICs.shtml

boB  🌜


K7IQ
 
The following users thanked this post: SiliconWizard

Online CaptDon

  • Super Contributor
  • ***
  • Posts: 2619
  • Country: is
Re: Simple AGC for audio - preferably SMD
« Reply #15 on: May 07, 2022, 12:43:15 am »
O.P., you then mention "But I don't want the soft parts to be missing" or what ever. Can you say 'COMPANDER"?? It will compress on the peaks and expand the quieter parts!!! In A.M. broadcasting we had the much sought after C.B.S. Laboratories 'Level Devils' the Volumax and its mate. The one device acted like an operator with his hand on the volume control always shooting for that 0Vu 100% modulation and had a slower response time. It could EXPAND or REDUCE much like a volume control with a careful hand. The mate which I think was called Audimax would push some limiting and compression on peaks. In A.M. the F.C.C. allows something like 110% or 115% positive peaks but never more than 100% negative peaks where the carrier cuts off. Some of the transmitters even had sort of a keep-alive circuit that NEVER allowed the carrier to cut off although the negative audio peaks started to look and sound a bit weird. Prior to the Orban Optimod A.M. which could do all kinds of magic including independent audio band limiting we would use the strongest vacuum tube on the side of the modulator that produced a rise in R.F. final plate voltage and a weaker tube on the side of the modulator responsible for downward R.F. final plate voltage. We were getting 105% forward with 99% negative modulation on our R.C.A. BTA-5 20 years before Gates/Harris did it with PWM in the MW-5 series. Those sought after level devils and Orban Optimods still sell for thousands of bucks today as does the much sought after LA-4A limiter. I suggest you look for a DBX-160 limiter/compressor or the stereo Phonic PCL-3200. They are limiters but you will like their effect when adjusted properly!!! I use the Phonic ahead of a wireless uplink to prevent clipping of the wireless FM bandpass and clipping in the receiver which feeds a local CATV head end. Cheers mate!
 
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 

Online David Hess

  • Super Contributor
  • ***
  • Posts: 19229
  • Country: us
  • DavidH
Re: Simple AGC for audio - preferably SMD
« Reply #16 on: May 07, 2022, 02:15:15 am »
I'm thinking a FET acting as a voltage-controlled resistor feeding an op-amp?

An FET can work as the gain control element.  If necessary a pair of identical FETs can be used in a feedback circuit to compensate for the non-linearity of the gain control signal but that should not be necessary.  Resistive feedback from the drain to the gate can cancel drain non-linearity reducing distortion.

A more modern solution is to use something like an LM13700 or LT1228 operational transconductance amplifier.  Beyond that there are a number of 2 and 4 quadrant analog multipliers which are suitable like the AD633.
 
The following users thanked this post: boB

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1950
  • Country: gb
Re: Simple AGC for audio - preferably SMD
« Reply #17 on: May 07, 2022, 02:32:51 am »
As a compromise between functionality and fidelity, you could look at compressors used for guitar.  Plenty of schematics for compressors/limiters about, some based on JEFT, others LM13700 (or some other operational transconductance amp).  Some of the more extreme ones can give a pretty consistent output level for large inputs - not particularly usable for guitar, but a good limiter without clipping.
 

Offline boB

  • Frequent Contributor
  • **
  • Posts: 341
  • Country: us
    • my work www
Re: Simple AGC for audio - preferably SMD
« Reply #18 on: May 07, 2022, 04:21:58 am »

Then again, you can use a light bulb or LED and a photo sensitive resistor in a closed box.

boB  🌜
K7IQ
 

Offline 6SN7WGTBTopic starter

  • Regular Contributor
  • *
  • Posts: 181
  • Country: gb
Re: Simple AGC for audio - preferably SMD
« Reply #19 on: May 07, 2022, 08:37:24 am »
All fascinating stuff, but as I started out with, this is a very lower power pantry transmitter that is being used to feed vintage radio.

I need something super small (already have the Tx built), low current (PP3 battery supply, Tx using 15mA) and clearly not of broadcast quality. Although AM broadcast quality I thought was indeed quite compressed and frequency limited,  but I’m not a broadcaster.

From what I’m reading a compander/or would appear suitable. Good enough for Government work as they say.

I don’t have the experience to design from first principles, so if anyone could point me to a schematic that is in the right ball park, I can modify it suitably. I have looked at some NEC data sheets but couldn’t see enough detail.

Hope I’m not appearing as “just tell me the answer” since I’m prepared to experiment/modify once I’m on the right track.
 

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 3181
  • Country: gb
  • Recovering Electrical Engineer
Re: Simple AGC for audio - preferably SMD
« Reply #20 on: May 07, 2022, 01:12:54 pm »
How about a SSM2167 compressor limmiter with noise gating all in one?
A THAT4301/5 is a multiputpose AGC/ compressor/expander. BTW That corp. Has many interesing app notes on this subject.
 
The following users thanked this post: 6SN7WGTB

Offline 6SN7WGTBTopic starter

  • Regular Contributor
  • *
  • Posts: 181
  • Country: gb
Re: Simple AGC for audio - preferably SMD
« Reply #21 on: May 07, 2022, 05:29:41 pm »
Thanks. The SSM2167 looks very interesting, and single rail. Perfect voltage, low current, and the downward expander to suppress noise might be a nice to have here.

I think that 4301/5 is dual rail which won't work here.

It did occur to me that with the sort of RMS limit I want - ca. 300mV,  a pair of back-to-back 1N4148s would offer crude soft-ish clipping. Tried them on the 'scope and it looks quite promising for the lo-fi application I have.

Might try that 'chinagraph pencil' approach before trying to design the pen that works underwater...
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17813
  • Country: fr
Re: Simple AGC for audio - preferably SMD
« Reply #22 on: May 07, 2022, 05:38:41 pm »
If it's "lo-fi" as I suspected, why not consider the MAX9814 (or something similar) as I suggested? It's dirt cheap and with 0.04% THD+N, I guess it should be adequate. It's marketed as a microphone AGC, but no reason you can't use that for any kind of signal as long as it's within specs. But maybe there's some spec that doesn't meet your requirements.

The THAT parts are very good, but meant for professional audio gear.
 
The following users thanked this post: 6SN7WGTB

Offline 6SN7WGTBTopic starter

  • Regular Contributor
  • *
  • Posts: 181
  • Country: gb
Re: Simple AGC for audio - preferably SMD
« Reply #23 on: May 07, 2022, 07:14:54 pm »
Yes, certainly a valid option.

Having perused the datasheets I think the SSM2167 gets my vote as it appears to offer lower overall gain, noise floor expander, doesn't have the unnecessary complexity of the MIC bias, appears more easily configurable (noise gate, gain, compression, etc.) and the application note is more comprehensible to me at least.

I think I stand a better chance of producing a working circuit with it.

Thanks to all for a very illuminating set of options that I simply would not have found under my own steam.
 
The following users thanked this post: boB

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 8796
  • Country: ca
    • LinkedIn
Re: Simple AGC for audio - preferably SMD
« Reply #24 on: May 08, 2022, 12:57:42 am »
Here you go, some example circuits:

https://www.eevblog.com/forum/projects/audio-level-limiter-almost-good/msg3766358/#msg3766358

Note that all the components that these are built with are available in SMD.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->