Maker Pro
Maker Pro

recommended components for audio AGC?

C

Colin Howarth

Hi there,

I'm designing a sort of intercom system using microcontrolers and a
digital network (the uC's are
also doing other things of course :)

The basic idea is as follows:

simple electret setup

+10 V
|
|
10 k
|
|-------------||--------
| 1 uF
mic
|
|
GND


followed by some AGC

followed by the uC's 10-bit 15 ksps ADC

with some ADPCM compression.


A quick look at the output of the above electret circuit seems to imply
that a dynamic range of around 100 would be OK (ie. smallest amplitude
around 1 mA, largest around 100 mA). Input to the ADC
should be something like 2.5 V +/- 2 V.

the uC has a PWM output and, of course, some spare digital lines.

So, for the AGC I could use:

a) a multiplying DAC (digitally setable) followed by an opamp
b) a DAC (or the PWM) followed by a voltage-controlled (variable gain)
amplifer. (VCA or VGA)
c) digitally controlled programmable gain amplifier PGA


I' d like to keep the component count and cost down

I've looked at the following VCA/VGA/PGA:

AD603
LTC6910-1
LT1228

and MDAC

AD5300
AD5425


I suppose the LTC6910-1 (gain -1 to -100 in 7 steps) is nearly OK. It
would need another x25 amplifier, and is a bit coarse-grained though.

The AD603 also has around 0-40 dB gain range, and would also need
another x25, but it is
continuously variable. (also, more expensive).

Then there's the LT1228 which has a current setable gain
transconductance amplifier followed
by a CFA in the same package. This wouls seem to work, but is a bit
too expensive.

So, the questions:

1. Can the electret circuit be easily improved? What difference do
different R and C values make?
(As an aside, I have a 0.6 V p-p signal at around 780 kHz on the
output. Any ideas where that's
coming from?)

2. Would you suggest scenario a), b) or c) or something completely
different. (If you can do the AGC
with a FET, 2 diodes and a resistor, or something like that, I'd be
impressed ;-)

3. Which components could you recommend?

Thanks,

colin
 
M

martin griffith

Hi there,

I'm designing a sort of intercom system using microcontrolers and a
digital network (the uC's are
also doing other things of course :)

The basic idea is as follows:

simple electret setup

+10 V
|
|
10 k
|
|-------------||--------
| 1 uF
mic
|
|
GND


followed by some AGC
3. Which components could you recommend?

Thanks,

colin
sorry.... way OTT for me
none of the snipped bitz!
Have a look at
Analog Devices AD2165

from the
Blurb
The SSM2165 is a complete and flexible solution for conditioning
microphone inputs in computer audio systems. It is also
excellent for improving vocal clarity in communications and
public address systems.

/Blurb




martin

Serious error.
All shortcuts have disappeared.
Screen. Mind. Both are blank.
 
J

John Larkin

Hi there,

I'm designing a sort of intercom system using microcontrolers and a
digital network (the uC's are
also doing other things of course :)

The basic idea is as follows:

simple electret setup

+10 V
|
|
10 k
|
|-------------||--------
| 1 uF
mic
|
|
GND


followed by some AGC

followed by the uC's 10-bit 15 ksps ADC

with some ADPCM compression.

Sounds like it would be easier to use an ADC with more bits.

John
 
J

John Woodgate

I read in sci.electronics.design that Colin Howarth
A quick look at the output of the above electret circuit seems to imply
that a dynamic range of around 100 would be OK (ie. smallest amplitude
around 1 mA, largest around 100 mA).

Currents?? You must be a sultana.
 
N

NCSRadio

Colin Howarth said:
Hi there,

I'm designing a sort of intercom system using microcontrolers and a
digital network (the uC's are
also doing other things of course :)
2. Would you suggest scenario a), b) or c) or something completely
different. (If you can do the AGC
with a FET, 2 diodes and a resistor, or something like that, I'd be
impressed ;-)

I've done it with a JFET, a diode, 3 Rs and a C and believe me,
you DON'T WANT to do it that way! The problem is variation of Id vs Vgs
from part to part. For a one off, it worked great after I selected the
proper resistor
values. I needed it for production, however. I ended up with two SMT
trimpots (it's
a dual channel product) that have to be adjusted in each unit.
AAAARRRRGGGHHHH!

Shoulda read Win Hill's book a little more carefully, not just lift a
schematic!!!

On Rev A, I will use a PIC's A/D to measure the output voltage and SPI to a
digital pot
as a voltage divider to attenuate the signal. I think the advantage of
using a PIC is you can
easily adjust the AGC characteristics (attack and decay time among others)
as needed. Also,
the PIC can read my two volume control pots for volume control as well as
AGC. So I can
replace two trimpots, two JFETS and maybe 2 Rs with a PIC and a dual
digi-pot.

Hope this helps.

Carey Fisher
 
C

Colin Howarth

I read in sci.electronics.design that Colin Howarth


Currents?? You must be a sultana.

Excuses:

1. Damn! Someone's swapped the A and V on my keyboard again!

2. It's the latest design methodology. You convert everything into
current equivalents.

3. It was a typo. I'm using a Patagonian keyboard, and the A and V are
right next to each other.

colin
 
J

John Woodgate

I read in sci.electronics.design that Colin Howarth
Excuses:

1. Damn! Someone's swapped the A and V on my keyboard again!

2. It's the latest design methodology. You convert everything into
current equivalents.

3. It was a typo. I'm using a Patagonian keyboard, and the A and V are
right next to each other.
OK, now we've established that, the dynamic range is determined by **the
incoming sound pressures**, not chosen by the designer. A typical
electret mic has a sensitivity of around -46 dB(V) (= 5 mV) at 1 Pa,
which is 94 dB (20μPa) or 94 dB SPL.

You won't ever get much quieter that 34 dB SPL, giving an output of -106
dB(V) (5 μV). This determines how low-noise your amplifier needs to be,
depending on what signal-to-noise ratio you will accept for such quiet
sounds. On the other hand, if you put the mic next to a kick-drum, you
may get a sound pressure level of 144 dB SPL, giving an output of +4
dB(V) (= 1.5 V). (In fact, designers often assume an absolute maximum
output voltage of 5 V; all these voltages are r.m.s. values.)

That tells you how much signal your amplifier needs to handle, and the
two voltages together (or their decibel equivalents) indicate a dynamic
range of 110 dB or 300 000 times.

Of course, your bounds on SPL may be closer together, but the above
method can still be used with different numbers.

You probably won't want (and/or cannot easily realise) an AGC stage with
110 dB of control range. Typical range is around 40 dB, the rest being
taken up by manual gain settings. And you do not necessarily want a
'radio' type AGC characteristic, where the output voltage is very nearly
independent of the input voltage. If you have this, you lose 'auditory
perspective' - you can't distinguish between nearby sounds and those
further away. Instead, you have a lower AGC loop gain than for a 'radio'
system, so that the output voltage rises 1 to 3 dB per decade rise in
input voltage, depending on the AGC range you choose. This 'sounds' more
realistic.

Hey, this is electroacoustics, not politics or philosophy!
 
M

martin griffith

I've done it with a JFET, a diode, 3 Rs and a C and believe me,
you DON'T WANT to do it that way! The problem is variation of Id vs Vgs
from part to part. For a one off, it worked great after I selected the
proper resistor
values. I needed it for production, however. I ended up with two SMT
trimpots (it's
a dual channel product) that have to be adjusted in each unit.
AAAARRRRGGGHHHH!

Shoulda read Win Hill's book a little more carefully, not just lift a
schematic!!!

On Rev A, I will use a PIC's A/D to measure the output voltage and SPI to a
digital pot
as a voltage divider to attenuate the signal. I think the advantage of
using a PIC is you can
easily adjust the AGC characteristics (attack and decay time among others)
as needed. Also,
the PIC can read my two volume control pots for volume control as well as
AGC. So I can
replace two trimpots, two JFETS and maybe 2 Rs with a PIC and a dual
digi-pot.

Hope this helps.

Carey Fisher
Hi Carey,
Yep, I remember your original post.
Just to put the cat amongst the pigeons
Have a look at
http://www.wavefrontsemi.com/products.html
and the AL3101 DSP, it may be a better way to approach things, cos it
is dedicated to audio and sourceforge has a compiler at
http://sourceforge.net/projects/bkasm/





martin

Serious error.
All shortcuts have disappeared.
Screen. Mind. Both are blank.
 
C

Colin Howarth

I read in sci.electronics.design that Colin Howarth

OK, now we've established that, the dynamic range is determined by **the
incoming sound pressures**, not chosen by the designer.

Ah you learn something every day (if you keep away from the OT threads ;-)

So my very first post should have said:

A quick look at the output of the above electret circuit seems to show
that I have a dynamic range of around 40 dB (ie. smallest,
noise-limited measureable amplitude of around 1 mV, largest measured
loud noise, 100 mV).

?
A typical
electret mic has a sensitivity of around -46 dB(V) (= 5 mV) at 1 Pa,
which is 94 dB (20μPa) or 94 dB SPL.
You won't ever get much quieter that 34 dB SPL, giving an output of -106
dB(V) (5 μV). This determines how low-noise your amplifier needs to be,

not just the amp :)
depending on what signal-to-noise ratio you will accept for such quiet
sounds. On the other hand, if you put the mic next to a kick-drum, you
may get a sound pressure level of 144 dB SPL, giving an output of +4
dB(V) (= 1.5 V). (In fact, designers often assume an absolute maximum
output voltage of 5 V; all these voltages are r.m.s. values.)

no kick-drums around here.
That tells you how much signal your amplifier needs to handle, and the
two voltages together (or their decibel equivalents) indicate a dynamic
range of 110 dB or 300 000 times.
Of course, your bounds on SPL may be closer together, but the above
method can still be used with different numbers.

OK, I'm tending towards the following:

electret -> opamp -> RC filter -> TLC7524 8-bit multiplying DAC (at
2.50 EUR) -> opamp -> ADC.

This will probably be single-supply, maybe 12 V, so opamps biased at 6
V. So, if I expect max input of 200 mV then first stage gain would be
x30 then MDAC attenuation of 1/256 (to 255/256) giving around 25-30 mV
followed by a second stage gain of around x200.
You probably won't want (and/or cannot easily realise) an AGC stage with
110 dB of control range. Typical range is around 40 dB, the rest being
taken up by manual gain settings. And you do not necessarily want a
'radio' type AGC characteristic, where the output voltage is very nearly
independent of the input voltage. If you have this, you lose 'auditory
perspective' - you can't distinguish between nearby sounds and those
further away. Instead, you have a lower AGC loop gain than for a 'radio'
system, so that the output voltage rises 1 to 3 dB per decade rise in
input voltage, depending on the AGC range you choose. This 'sounds' more
realistic.

Hey that's clever, making quiet noises quieter than loud ones! :)

I'll do that bit in software (you see why it's good to have a uC in
there (fewer pins to solder than a DSP, by the way)).
Hey, this is electroacoustics, not politics or philosophy!

Electroacousticians seem to use dB a lot. Do you say, "damn, that guy
earns 6 dB more than me - and he only does -6 dB as much work too!"

BTW, any ideas on the original first question?

1.a Can the electret circuit be easily improved? What difference do
different R and C values make? (I didn't notice much difference between
10 nF, 100 nF and 1000 nF )

1.b I have a 0.6 mV [typo corrected] p-p signal at around 780 kHz on
the output. Any ideas where that's coming from?

But I suppose the filtering will get rid of that anyway. Oh, and BTW
(2) where would be the best place for the RC filter?

Thanks,


colin
 
J

John Woodgate

I read in sci.electronics.design that Colin Howarth
about 'recommended components for audio AGC?', on Sat, 25 Sep 2004:


[snip]
Ah you learn something every day (if you keep away from the OT threads ;-)

So my very first post should have said:

A quick look at the output of the above electret circuit seems to show
that I have a dynamic range of around 40 dB (ie. smallest,
noise-limited measureable amplitude of around 1 mV, largest measured
loud noise, 100 mV).

I don't see any way of making those deductions from the circuit diagram.
?


not just the amp :)

I don't know what you mean by that. The amplifier immediately following
the mic determines the noise performance.
[snip]

OK, I'm tending towards the following:

electret -> opamp -> RC filter -> TLC7524 8-bit multiplying DAC (at
2.50 EUR) -> opamp -> ADC.
[snip]

Electroacousticians seem to use dB a lot. Do you say, "damn, that guy
earns 6 dB more than me - and he only does -6 dB as much work too!"

Yes, and don't forget that 'Money is Power', so 6 dB is 4 times, -6 dB
is 1/4!
BTW, any ideas on the original first question?

1.a Can the electret circuit be easily improved? What difference do
different R and C values make? (I didn't notice much difference between
10 nF, 100 nF and 1000 nF )

The R value depends on the FET head amplifier in the capsule. Follow the
manufacturer's data. The C value depends on what impedance it is
connected to. You op-amp circuit probably has a high input impedance, so
even the 10 nF gives you adequate low-frequency response.
1.b I have a 0.6 mV [typo corrected] p-p signal at around 780 kHz on
the output. Any ideas where that's coming from?

Not really. Local radio station?
But I suppose the filtering will get rid of that anyway. Oh, and BTW
(2) where would be the best place for the RC filter?

Either built round the first op-amp or immediately following it. The
second is likely to be easier.
 
C

Colin Howarth

I read in sci.electronics.design that Colin Howarth
about 'recommended components for audio AGC?', on Sat, 25 Sep 2004:


[snip]
Ah you learn something every day (if you keep away from the OT threads ;-)

So my very first post should have said:

A quick look at the output of the above electret circuit seems to show
that I have a dynamic range of around 40 dB (ie. smallest,
noise-limited measureable amplitude of around 1 mV, largest measured
loud noise, 100 mV).

I don't see any way of making those deductions from the circuit diagram.

Ah. I built the circuit and measured the output using an oscilloscope
happened to be lying around :)
I don't know what you mean by that. The amplifier immediately following
the mic determines the noise performance.

Oh, there's loads of other noise around. Mains, for instance.
1.a Can the electret circuit be easily improved? What difference do
different R and C values make? (I didn't notice much difference between
10 nF, 100 nF and 1000 nF )

The R value depends on the FET head amplifier in the capsule. Follow the
manufacturer's data. The C value depends on what impedance it is
connected to. You op-amp circuit probably has a high input impedance, so
even the 10 nF gives you adequate low-frequency response.
1.b I have a 0.6 mV [typo corrected] p-p signal at around 780 kHz on
the output. Any ideas where that's coming from?

Not really. Local radio station?
But I suppose the filtering will get rid of that anyway. Oh, and BTW
(2) where would be the best place for the RC filter?

Either built round the first op-amp or immediately following it. The
second is likely to be easier.

Thanks for all the useful info.

colin
 
Top