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 Interfacing

Status
Not open for further replies.
Two resistors set the gain of the 3rd opamp. A 120k negative feedback resistor from its output to its (-) input and another resistor maybe 30k from its (-) input to 0V. The input is its (+) input. Then its gain is (120k/30k) + 1= 5 times. INCREASE the 30k for less gain. Disable the 4th opamp by connecting its (+) input to 0V and connect its (-) input to its output.
 
Audioguru, I have another question...

I've been testing a couple of different electret mics with just the preamp part of your circuit - so I have disconnected the link from C4 to R9, and I take the output after C4 and run it through my scope. I am seeing quiescent voltage at 0V, with a range of -2.2V to +1.5V, but I see clipping at the ranges (so at -2.2V and +1.5V) for loud sounds. If I take the preamp out of the picture and just take the output after C1 to the scope, I see much lower voltage of course, but I can't see any clipping. Unless I'm just not seeing it because of the scale on the scope, it looks to me that the mic is not clipping and that the preamp is. Is that likely, or is it more likely the mic and I'm just not seeing it? If it is possibly the preamp, can you suggest how to stop the clipping?

Actually, I have another question - just to satisfy my curiosity. As I mentioned earlier, my background is software, and I dabble in hardware - I (try to) build robots. In the scenario above (preamp only, no peak detector), I noticed that if I take the output before C4, the scope shows quiescent voltage at 2.3V (vs 0V if I take the output after C4), and the clipping happens at a few mV above 0V and at about 3.75V. Why is that? I don't understand what taking C4 out is doing in that circumstance.
 
Ok, maybe I understand a little - not the clipping (yet), but the capacitor (C4). C4 prevents blocks DC but allows AC, so by removing C4 I've allowed the DC to flow - and that biases the output. Since the offset voltage is half Vin, allowing DC to flow biases the output by 2.5V. Am I close?
 
if your supply is +5.0V then yes, R2 and R3 bias the input at +2.5V so the output can swing equally up to about +4V and down to about +1V depending on the opamp part number.
The output has clipping when it tries to swing higher or lower than it can because the input signal is too loud or because the gain of the preamp is too high.
The gain of the opamp can be reduced by decreasing the value of R5 or by increasing the value of R6.

Without C4 the output of the opamp is biased at +2.5V and it can swing up to about +4V and swing down to about +1V.
With C4 then the 'scope input resistor makes the average output 0VDC and it can swing up to about +1.5V and swing down to about -1.5V.

Which opamp part number are you using? What is the supply voltage?
 
With C4 then the 'scope input resistor makes the average output 0VDC and it can swing up to about +1.5V and swing down to about -1.5V.

With C4 the scope shows quiescent output at 0V, and a maximum swing up to +1.6xV and down to -2.2xV, with clipping at both extremes. Does that indicate something wrong with my implementation?
 
With C4 the scope shows quiescent output at 0V, and a maximum swing up to +1.6xV and down to -2.2xV, with clipping at both extremes. Does that indicate something wrong with my implementation?
The output of the LM358 is not symmetrical like most opamps. With a 5.0V supply, an output coupling capacitor and a high load resistance, its output typically goes up to about +1.4V and down to about -2.4V.
Since it is clipping then the input sound is too loud or the gain is too high.

The LM358 has a fairly high noise level (hisssss).
 
Hi audioguru,

I have things working using the peak detector, and it's great. I do have another question though. When I hook a scope to the output of the peak detector I see the waveform rise sharply when the peak is detected, but the it tails off slowly - a bit like a sawtooth waveform. Is there any way to make the output of the peak detector a thin spike at the peak? I'm having trouble getting my head around this. I just want to detect the sound - I don't need to get an accurate wave. If I snap my fingers, or cough, or yell, I just want to know what the peak level of that sound was. I guess it depends over what period you define for "the sound". I'm actually seeing that the time between the steep rise for the peak, and the end of the tail being in the order of tenths of a second for a finger snap. When I feed the output of the peak detector into an A-D converter I'm still getting fairly high numbers for a few tenths of a second. I'm not sure if that's actually valid (does a finger snap really last that long?). I can write software to detect a reduction, and allow for jitter, but it would make my job easier if all I got for a sound was a single, short spike.
 
A peak detector has a fast attack time and a slow release time. The release time is determined by the C8 capacitance and the R13 resistance that discharges it. I made it about 0.1 seconds so that the slow response of our vision can see the peak on an LED bar-graph display. Since it is a capacitor discharged by a resistor then its charge is gone in about 5 time-constants (half a second).

Reduce the value of R13 to a minimum of about 1k ohms then its release time will be a minimum of about (330nF x 1k ohms=) 0.33ms and the charge will be gone in 1.65ms which is pretty fast.
If a monostable digital circuit is used as a timer then an accurate time duration can be any amount you want.
 
Status
Not open for further replies.

Latest threads

Back
Top