Electret Microphone Question

Hello,

I'm pretty new to arduino and electronics. I just picked up a small electret microphone.

I wired it simply as ground to analogue pin, which gave me nothing but zeros values in the serial readout. What is the proper way to wire up an electret microphone to read in values when talked into?

Thank you in advance for any help.

Well two problems. First a electret element is a very low level transducer, just millivolts. So it is general packaged with a built in fet amp stage that needs to have a DC bias voltage applied via a series connected resistor. The audio information is then generally coupled through a capacitor, which leads to the second problem. Audio information from a microphone is in the form of a AC voltage where as a Arduino analog input pin is designed to only handle voltages from 0-+5vdc.

So aside from that what is your goal for using a microphone input to an Arduino? Perhaps there is another way to accomplish the goal.

Lefty

Hey thanks for the reply,

I thought that this microphone would work similarly to the others that I have tried. I was interested in using a microphone to detect a persons screams. Currently I am working on a curling game using arduino and processing. We would be using sliders to "throw" the rock down the ice and have the player scream into the microphone like the curlers do to speed up the rock. We really just need to detect whether there is sound or not through some sort of input. If you have any sort of suggestions through arduino or processing that would be great.

There was a thread a long time ago, where someone built a small robot that could react to handclaps coming from different directions.

Try to search the forum for that.

Have you seen this:_
http://interface.khm.de/index.php/labor/experimente/arduino-realtime-audio-processing/

It shows how to connect a microphone with AC coupling so you get a 50% reading whne there is nothing being picked up.

Hello all,

I haven't updated this thread in awhile, but I would like to say that I had found a solution to my problem. Retrolefty mentioned that because the electret mic is a low level transducer producing just millivolts I did more research on ways to make it more powerful. I stumbled upon a pre-amplifier diagram which would boost the electret microphone to more useful levels which can be found here:

http://www.reconnsworld.com/forum/read.php?9,10

Although buggy (I'm pretty sure I wired this thing correctly), I was able to get differing levels, enough to distinguish whether someone is talking into the microphone and when someone is not.

Thank you all so much for the help and advice you have given me.

mikmo: Do you remember any other details about that robot? I tried doing a search for variations of "clap" and "handclap", and couldn't find it [Hmmm: the forum search didn't find it, but a google search did]

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1202056662/15

I'm going to do some "special effects" for a local theatre group. For some silly reaon, the management doesn't want the actors using real bullets, so I'm going to try to make the Arduino detect and respond to the sound of blanks being fired, making the "targets" move with solenoids and/or servos.

To simplify the code in the Arduino, I'm thinking about following the preamp socks123 suggested with and "envelope detector", like this one:

I'm hoping this will make it easier for the Arduino to distinguish between the gunshots and other noises by letting it focus on the overall amplitude, instead of the amplitude of individual cycles.

I'm guessing there haven't been many Arduino projects involving gunshot detection ;), but can anyone think of other systems that detect sharp sounds (like, say, a DIY "Clapper" switch)?

Ran

That thread brings back fond memories, but I wonder if you would be better off faking it and using infra-red; ala wii sensor bar. If you attached a small infra-red emitter to the gun so it was not visible to the audience, that may give you a more easily distinguished signal. You don't want the targets being hit if someone sneezes (or applauds) at the wrong time.

Stumbled across this thread, thought I would post a somewhat "proper" solution, for any in the future who come across it.

Basically, you want to do 2 things, you want to rectify the signal, and you want to boost the signal.

Rectifying, will take the negative voltages and make them positive, and boosting... well that is kind of obvious.

For anyone looking for a specific noise, like a gun shot or a hand clap, these noises always fall into the same range of sound. So we will use a band-pass filter to cutout any other noises. Coupled with the rectifier and booster. We can effectively use an analog input as a true/false, true being any value greater than say 1.

you want to rectify the signal, and you want to boost the signal.

While this is true you want to do it the other way round. You amplify the signal first otherwise you don't have enough signal to get you over the 0.7V forward volts drop of a diode.

Rectifying, will take the negative voltages and make them positive,

That's only full wave rectification you need 4 diodes for that as opposed to one for half wave. You only need half wave for this sort of application.

So we will use a band-pass filter to cutout any other noises.

If you want to use a filter then this goes between the amplifier and the rectifier.