Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Electret microphone attenuation

Status
Not open for further replies.

ccurtis

Well-Known Member
Hello fellows,

So, I have a module I purchased containing an electret mic and a Maxim 9814 agc amplifier chip (from adafruit). In very loud sound environments I need to reduce the output from the module below that achievable at the lowest gain setting of the module, without AGC compression. I do this by tying the + output of the mic element to ground through a large capacitor and a resistor in series as needed. I do it this way because tack soldering one wire to the mic element is physically easy compared to soldering to the surrounding, teeny tiny SMD devices, and because it works perfectly.

What I don't understand is why the resistor I need is quite a bit higher in value (determined by measurements) than an LTspice simulation dictates; 820 ohms (actual) vs 75 ohms (simulated) for 30dB attenuation (30 voltage ratio). I model only the electret mic element, coupling cap, and added series attenuator since the AGC amp chip has a high impedance which I simulate with a 100K load resistor per the datasheet. The mic element is fed by 2V though a 2.2K resistor. I simulate the JFET in the mic element with a constant current source of 500uA, and do an AC analysis. I come up with the same results with a transient analysis. I was careful to make measurements ensuring that the AGC amp was not limiting gain with AGC. Besides, the real world results are consistent with my measurements.

I'm obviously missing something in the Spice analysis or my interpretation of the results, but I cannot figure out what, and it just bothers the begeezus out of me. Any ideas?

LTspice asc file attached. Thanks.
 

Attachments

  • et attenuator.asc
    1.2 KB · Views: 216
Last edited:
In principle you are forming a potential divider, with the source impedance and load impedance.

The 2k2 is the DC supply for the mic and not it's impedance; that's functionally in parallel with the internal impedance of the mic itself (look up Thevenin equivalent).

Add a series resistor from the mic output to the next stage input.

You have the input load as 100K, so eg. a 10K would have minimal effect under normal conditions; but adding an extra load resistor after it would make attenuation much easier.
 
It would be a pain for me to insert anything in series given the tiny parts on the module. My concern here is not the implementation of the attenuation so much as why the simulation doesn't agree with measurement. Here, I also add the module schematic and mic data for reference.

1578698454468.png
 

Attachments

  • Microphone cma-4544pf-w datasheet.pdf
    332.8 KB · Views: 231
LTspice assumes that the microphone has a very low output impedance but it is actually about 3.3k ohms in parallel with your 2.2k resistor that powers it.
I measured my electret mic as being 3.3k ohms when powered from 9V through a 10k ohms resistor (total of 2.5k ohms) which is different from what you have.
 
Hey, AG. If I put 3.3K in parallel with the 2.2K, that gets me about 5 dB greater difference between sim and measured. I guess if there is anything that explains the difference, as far as the sim goes, it's the constant current source used to simulate the microphone. The rest of the sim circuit is pretty certain. No matter how I do it though, my understanding is the JFET in the mic is operated in the saturation (Idss) region, ie, constant current region. I guess somehow, in reality, the attenuator (cap in series with resistor) is lowering that current significantly (it is not so constant), but I don't understand why.
 
You are operating the electret mic below its recommended voltage. The datasheet says the output level drops -3dB when Vs is too low at 2V from when its is at the minimum Vs of 3V. An electret mic with such a low supply voltage produces severe distortion at sound levels that are not very high. Adding 3.3k parallel with the 2.2k that powers your mic increases its DC voltage and therefore also increases its output level above what you and the Sim program think.

Since I measured 3.3k ohms for my electret mic and measured 2.5k ohms when powered with a 10k resistor from 9V then the mic is not a constant current source that has an extremely high impedance.

Look at a datasheet for a Jfet to see that its Idss is listed only when Vds is 15V, not at a lower voltage. Measure the mic, don't let the Sim program guess it.
 
Man, I agree with your "measure the mic" statement, AG. I originally sim'ed the value for the resistor and used that in the circuit and the output went almost completely into the dumpster, prompting this adventure in the first place. You're right, at 2V the mic gain is starting to crap out. Anything below that, suggests it is operating in the "linear" region of the JFET, which is not a good thing.

Thanks for talking me through this. That helps a lot sometimes., which is why I came here.
 
Yeah, I know about that, and I use it as a sort of digital AGC, but not allowing compression to occur. Thing is, when this module is in a night club, it compresses like the dickens even at 40dB (lowest gain). I don't need (or want) the chip's AGC feature. I do like the gain selection though. I only wish I could select more, and lower, gains. I got to thinking I could put attenuation at the output of the module, but I just did some more calculations, and unfortunately, it HAS to compress (or clip) with such high output from the mic, even at 40dB gain. So, I have to cut the output of the mic element down somehow. I don't want it to compress. Compression is really a special kind of distortion. So, I kinda still want to attenuate the mic element like I am doing, but at 2V and 2200 ohms the mic is apparently operating at a knee on the JFET curve and the attenuator is taking it further down the knee.

I wonder now if replacing the 2200 ohm resistor with something smaller in value, much as I hate to mod the SMD parts, will help to bring the mic into a better place, so I can use the attenuator scheme I am using. The mic will still be operating on the knee, but maybe at least the attenuator won't take it down further. I guess, too, going to a plain ole op amp and gain selection resistors may be better.

Edit: Why do they ordinarily put a 2200 ohm resistor in there in anyhow? The thing (mic element) will operate at up to 10V volts or so and never draw more than 500uA (modulated a bit by the sound hitting it). It has its own impedance to develop a voltage across.
 
Last edited:
Yeah, I see that too, Ron. I reduce the gain with the gain control pin before the amp start to compress, anyhow. I keep the AGC turned on in case there is transient overshoot that I can't respond to fast enough.

I did some live tests at a night club tonight, and I am back now., but they are subjective tests because test equipment is not practical to use there, to say the least. I really cannot be sure if the mic is saturated, or the amp is saturated after I put that RC attenuation in, but it is saturating. 60dB RC attenuation of the mic (inserted as stated in the OP) isn't enough with 40db gain selected. It's loud at the night club and I can't duplicate that at home, and even if I could I can't tell if I am matching the level there. The manufacturer of the mic told me in an email that it can go to 115dB SPL with a max of 10% distortion at 1KHz, but I don't have a good idea what the SPL is in the night club. Internet says in places that 120dB SPL is rock concert stuff, so I would think the night club can be no worse, but I don't know. I'm right up close to the band. Trials and tribulations, but having fun. I can insert even a greater attenuation in, and try it again.
 
Last edited:
I need to reduce the output from the module
data sheet said:
Setting the AGC Threshold To set the output-voltage threshold at which the
microphone output is clamped, an external resistor-divider must be connected from MICBIAS to ground with the output of the resistor-divider applied to TH. The voltage VTH determines the peak output-voltage threshold at which the output becomes clamped. The maximum signal swing at the output is then limited to two times VTH and remains at that level until the amplitude of the input signal is reduced. To disable AGC, connect TH to MICBIAS.
I am not certain what you want but I think we are going about this wrong.
We have been trying to reduce the gain but the IC's job is to make the out put to be a certain level and it will do that if it can. The output signal is too strong for the next amplifier (if I understand the problem). So go to the resistor divider at MICBIAS to VTH to GND. Reduce the size of the bottom resistor. This should make the out put smaller.[/quote][/quote]
 
Hi Ron. I guess I didn't explain what I want to do clearly. Yeah, I can limit the output amplitude of the module using the chip's AGC by setting VTH and enabling it. However, although we do want to reduce the output from the module (you are correct), using VTH (the AGC threshold) to limit the output results in the input signal being compressed and, when compressed, the fidelity of the signal is shot. The amplitude excursions at the input are not duplicated at the output once the chip's AGC comes into play. We'd have a natural, widely swinging input and an output that maintains a constant amplitude. Ergo, we need to reduce the gain. Yeah, a compressed audio output sounds better than flat-out clipping the output, but it still sounds flat. We are dealing with music, here. Now, it doesn't have to be perfect, either, but compression is very noticeable. Stepping the gain in 10dB increments is also noticeable, but it's short lived noticeable because we do it quickly and we can live with that. But when the input level is great enough to exceed the maximum output level from the chip that we can tolerate with the gain all the way down to 40dB, we must cut the input level. We want this thing to work with sound levels in normal home music environments and night club environments. We use a micro to adjust the gain in steps using the micro to monitor the output level, to keep the output below a certain maximum amplitude. It works well in home environments, from normal volume to volume blasting very loud on the stereo, but night clubs are hitting its stops. The output of this system drives amplitude modulated brightness of lighting and compression looks awful. All the lights are on with only a small amount of modulation if AGC is used. It could very well be we are going about this wrong. Heck, I am not a genius, but open to suggestions.
 
Last edited:
Ideas from compressors and limiters I use. You probably don't need this but you can use a 1k to 10k pot on the output.
I think you can add a 10k to 100k pot on the input to limit the sound from the mic. That is more like what you want. (I hope)
1578853436347.png

I have racks full of compressor/limiters.
This one does not really have a "input lever" but "Threshold" is that function. If the knob is set at -20 then anything below that value is not effected. Above is effected.
"Ratio" sets the slope of compression. 1:1=no compression. "00" is very flat.
Attack and release sets how fast the machine responds.
"Output".
The "peak limiter" is very fast and only responds to really loud that will over drive the next amp.
"Expander/Gate" is used to kill the volume if no sound. I use this for plays where I might have 20 mics and most are not is use but night be soon.
1578853937348.png

I think if you had the meter that this machine has it would be easy to set up.
 
That's impressive, Ron. Yeah, a lot of expensive things would make my life easier. :) But seriously, thanks for your idea with the pots. I would have to do something like that for building more of these.

So, since my last post, I have done some work experimenting. What I believe I discovered is there is a lot of variance between the mics in two different modules. Unfortunately there is no part number marked on them, on the visible portion anyhow. I have another module that actually matches the sim very well. The first one I tried does not, but it is quite functional. But then, the module operates them at 2V and they are rated for 3V or more. It could quite possibly be that I made mistake in measuring the first one, too, though. I'll have to go back and redo those measurements. It's confusing making the measurements, because the test signal must be a real audio tone since this is a mic I am dealing with. And since I am adjusting for attenuation of 30dB and 60dB, I have to wear ear muffs or go deaf. Moderate tones don't provide enough signal to measure with such huge attenuations, even when amplified 60dB in the case of the 60dB attenuator; especially because there always some noise down there. There is some finagling involved too since I have to adjust the 30db attenuation first so I can use it to adjust the 60dB attenuator and it's easy to get confused about how much the signal should drop because I am changing the gain of the chip in the process.

If I do build more of these, I think it is best to use a plain ole op amp after a mic, instead of this module, allowing for greater range of gain control that is also digitally selectable so I don't have to go through this kind of exercise. Attenuating the mic output is not a good way to go. Instead of attenuation, just don't amplify it so much. 40dB is too much for a night club environment, and that 's the minimum gain of the chip in this module.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top