Maker Pro
Maker Pro

Modifying AGC circuit

Hi there! I am fairly new to analog circuits, so I hope you can help me with a few questions about a circuit for automatic gain control that I found on http://electronicdesign.com/analog/effective-agc-amplifier-can-be-built-nominal-cost.

My microcontroller ADC needs to tap the speaker wire output from the car head unit, and I was hoping that I could use this circuit to present a stable input to the ADC regardless of the head unit volume setting.

1. Since my car audio head unit is bridged (like most car head units), should I use a 1:1 transformer between the speaker wire and the AGC circuit or is it ok to connect it directly to the speaker wire?

2. Would it be possible to run this circuit on 3.3V instead of 5? Do I need to change some compoents?

3. Do I need to use resistors (R1 for instance) with high watt rating or can I stick to standard ceramic caps?

figure_01.gif
 
A classic old circuit from the wayback machine. If you really want to build something from scratch, this will work. FYI, adafruit, ebay, et al have low cost AGC modules. Some are based on a single-chip AGC part made by Maxim.

1. A transformer will work, but you don't need one. Each of the two individual signals that make up a bridged output contain *all* of the audio. The two signals are 180 degrees out of phase with each other, but either one can be tapped for what you are doing. The outputs sit on a DC pedestal approx. equal to 1/2 the battery voltage, so you need a coupling capacitor in front of R1.

2. 3.3 V operation will be pushing the limits of an LM358. That part is over 45 years old, born way before the 3.3 V logic craze. The circuit will work fine on 12 V, so why do you think you need 3.3 V operation? If it is because your uC runs on 3.3 V, you can scale the AGC output with P1.

3. None of the resistors need to be high power, and ceramic caps will work fine. Note that those are two different things.

ak
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
The LM358 Datasheet specs the minimum supply voltage @ +- 1.5V.

I don't understand your questions regarding the Caps though. I don't see any ceramic caps in that circuit. The caps are all labeled 10uF and appear to be Electrolytics or possibly Tantalum. Though I see no need for Tantalum caps for this application.

Chris
 
AnalogKid: I would actually prefer an IC if possible, but I though that I could not have such high voltage input range (40mv to 20V) on such ICs? I would be greateful if you have links to any of the ebay/adafruit AGC modules, that would certainly make it easier for my project.

I have both 12V and 3.3 available, so I guess I can use any of them if I go for the LM358.

Would it be OK to use a 10uF coupling capacitor in front?

CDRIVE: That was actually a typo, I really meant to write resistors instead of caps.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
Would it be OK to use a 10uF coupling capacitor in front?

CDRIVE: That was actually a typo, I really meant to write resistors instead of caps.
Yes, 10uF would be OK. Make sure the (-) negative terminal of the cap is connected to the junction of R1 & R2.
Your resistors would be most commonly Metal Film variety; not ceramic.
Chris
 
The lousy old dual opamos in an LM358 and its sister the quad opamps in an LM324 are no good for audio:
1) They are low power so are missiog enough bias current therefore they produce crossover distortion.
2) They are noisy (hiss).
3) They have trouble with high level frequencies above only 2kHz.
 
Great input, thanks! I will order parts and try out this circuit with the OPA134.
One last quesion CDRIVE: If I understand AnalogKid correctly, I can use ceramic caps instead of electrolytics. Is it ok to use ceramic cap for the 10uF coupling capacitor in front as well?

My head must have been completely off when I wrote about ceramic caps when actually meaning oridnary resistors ;) But at least AK confirmed that I can use ceramic caps instead of electrolytics.
 
Ceramics will work fine. But for the average hobbyist, a 10 uF ceramic is much more expensive than an equivalent aluminum electrolytic.

This circuit has fast attack and slow release. That is, it responds very rapidly when the signal is too high, but takes much longer to turn up the signal if it is too low. Also, this circuit makes its decisions based on the positive peaks of the audio waveform, as if the audio had been half-wave rectified, as opposed to better limiters that respond to the RMS value of the audio.

ak
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
Quite frankly ceramic caps >0.5uF are news to me. I had no idea that they even existed. Technology is rapidly passing me by.:(
That said I see no reason why you couldn't use them, including for the additional DC blocking cap on the input.

BTW, you do realize that unlike the LM358 the OPA134 requires a dual (+ -) supply? Speaking of which, R3 and R4 form a voltage divider used to bias the LM358's output at 1/2 of Vcc. This is done to insure that the output signal swings equally above and below the 1/2 Vcc bias point. Since the OPA134 uses split supply's it doesn't require the offset bias the LM358 does. The OPA's output pin will sit near 0V with no input signal and swing above (+V) and below 0V (-V). In other words the output pin produces true AC.

Chris
 
Chris -

One of my favorite surface mount caps is a 10 uF 50 V XR7 ceramic in a 1206 package. That little puppy could decouple *anything*. Now you get all of that in an 0805 or smaller, but 15 years ago it saved ma a lot of grief. We also used big flat 400 volt SMT ceramics in a MIL power supply that forbade tantalums. They worked fine, but were very sensitive to board flexion. Would not go there again.

ak
 

Attachments

  • THAT_Analog_Engine_Selector.pdf
    23.5 KB · Views: 75

CDRIVE

Hauling 10' pipe on a Trek Shift3
AK, you're definitely more current than I am and it should be you that guides him to the best components for his project. Heck, if I hang with this thread much longer I might start posting Vacuum Tube AGC's! :eek:

Chris
 
Quite frankly ceramic caps >0.5uF are news to me. I had no idea that they even existed. That said I see no reason why you couldn't use them, including for the additional DC blocking cap on the input.
Ceramic caps are not used for low level coupling:
1) They are microphonic and might cause noises or acoustical feedback.
2) They cause low frequency distortion because their value changes when the signal voltage changes, then they pass half the low frequency waveform but attenuate the other half causing even harmonics.

BTW, you do realize that unlike the LM358 the OPA134 requires a dual (+ -) supply? Speaking of which, R3 and R4 form a voltage divider used to bias the LM358's output at 1/2 of Vcc. This is done to insure that the output signal swings equally above and below the 1/2 Vcc bias point. Since the OPA134 uses split supply's it doesn't require the offset bias the LM358 does. The OPA's output pin will sit near 0V with no input signal and swing above (+V) and below 0V (-V). In other words the output pin produces true AC.
Absolutely not!
Any opamp can work with a single supply when its (+) input biased at half the supply voltage. The OPA134 output will be at half the supply voltage and will swing up and down making AC.
But the minimum supply for an OPA134 is more than 5V.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
Absolutely not!
Any opamp can work with a single supply when its (+) input biased at half the supply voltage. The OPA134 output will be at half the supply voltage and will swing up and down making AC.
But the minimum supply for an OPA134 is more than 5V.
I stand corrected but your statement isn't 100% correct either. What you describe is not AC. It's modulated DC that never swings below 0V. It isn't true AC until it's coupled through a cap. Then the signal will swing above and below 0V which agrees with the definition of AC.

Thanks for the info on large uF ceramic caps. I know very little about them, so I'll take your word for it.

Chris
 
Chris -

One of my favorite surface mount caps is a 10 uF 50 V XR7 ceramic in a 1206 package. That little puppy could decouple *anything*. Now you get all of that in an 0805 or smaller, but 15 years ago it saved ma a lot of grief. We also used big flat 400 volt SMT ceramics in a MIL power supply that forbade tantalums. They worked fine, but were very sensitive to board flexion. Would not go there again.

ak
Maybe you will.. you can get flexiable versions now for automotive use. :)
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
OMG! I just discover ceramic caps >0.5µF and within minutes I discover flexibles too!!

Chris
 
I stand corrected but your statement isn't 100% correct either. What you describe is not AC. It's modulated DC that never swings below 0V. It isn't true AC until it's coupled through a cap. Then the signal will swing above and below 0V which agrees with the definition of AC.
How about a bridged car amplifier? It uses a single supply and has both amplifiers biased at half the supply voltage. The speaker gets AC and its wires do not swing above and below ground even without a coupling capacitor.
 
Top