Sound Sensor for the Arduino?

Sound Sensor for the Arduino?

Has anyone tried to monitor the peak sound in a room using a sound sensor (electret mic)? If so, what electronics did you use?

Note: I tried to use the Sparkfun breakout board for the electret microphone using the analog input but the signal was way too low to be of any use.
I also tried the use the sound sensor from the Lego NXT robot but the supply voltage is different and it also required two additional digital inputs to switch the gain.
:-/ :-/ :-/

Yes, the signal is way too low to use directly. Do a google search for "electret microphone preamp schematic", and pick a simple one you can build with parts you have on hand (or can buy easily).

I found that the simple 1-transistor circuit I grabbed off the web was still not putting out as much signal as I wanted, so I fed that into an opamp with a pot in the feedback loop to vary the gain over about a 10-to-1 range. That makes it easy to get a nice big signal, regardless of how loud whatever it's listening to is.


I thinking along the lines of using the dirt cheap super sensitive "Spy hearing enhancer with volume control" then interface it to a 741 op amp amplifier peak detector. I will use the output of this amp and couple it via cap to the peak audio detector. Total cost ~ $7 US. :slight_smile: :slight_smile: :slight_smile:

Here is my schematic ...

You have a lot of gain with that 1M feedback and with only 5V a 741 might struggle. Also when using such high gain you have to watch out for the DC offset on the inputs. This gets amplified as well and can result in the output latching up being driven hard against a rail.

I would try with a much smaller feedback resistor first and then build it up.

Also as we perceive sound logarithmically and these are liner amplifiers you tend to get an all or nothing situation. Just bear that in mind when you come to testing.

The gain is high but since the "hearing enhancer" has a volume or sensitivity control, then the gain on the 741 should be ok. By using the built in earphone jack, you could adjust the sensitivity by just listening to the sounds in the room.
For complete portable operation the LR44 or 1.5 vdc AA would have to be replaced with a regulator to supply the power to the hearing enhancer.(5vdc to 1.5 vdc regulator)

The gain is high but since the "hearing enhancer" has a volume or sensitivity control, then the gain on the 741 should be ok

That's not the point. If it works then OK but I am saying that the DC offset on the inputs of the 741 is likely to make it not work as this input offset gets amplified no mater what the input is. So in order to get it to the rail it has to amplify the output to 2.5V with a gain of 1000 it only has to be 2.5mV.
Also the +ve input on the op-amp has a DC level of 5V, this should be 2.5V for it to work correctly.

It was late last night and I forgot to draw in the virtual ground on the

  • input correctly - thanks for the correction.
    I will be heading to Radio Shack to prototype this circuit today.
    :slight_smile: :slight_smile: :slight_smile:

Just finished soldering the breadboard and the beta testing of the sound sensor prototype. (See photo below)
Notice that I had to drill a small hole in the case for the wiring to connect to the final output stage of the hearing enhancer amp.

I need to clarify this Arduino Sound Sensor. It will NOT pick up the very fast rising or decaying audio waveform but will pick up the peak value of the waveform.
I am NOT concerned with amplifing, with precison, an audio waveform but am trying to just get the peak value.
I used a 2.2uf cap in the R5/C3 delay so the Arduino A/D would have enough time to sample the peak value of the audio waveform. Since I am also processing temperature (LM34dz), Sensirion SHT71 (temperature,humidity,dewpoint), Sonar distance (EZ0), ambient light (Temt6000) and a PIR, in the main loop, then the value of C3 had to be 2.2 secs. The Arduino user will have to find the right value for C3 for his/hers main loop application needs.

The peak value came in around half eg Arduino 512/1023 A/D count using the "hearing enhancer" volume/sensitivity control all the way on or maximum value. (The TV was on at half volume 20 feet away) In my application, I just multiplied this value by 2.

Possible applications for this sound sensor:

  1. Security system (my application)
  2. Robotics - the hearing enhancer with its 40 DB gain (100x) is very sound sensitive and very light weight and portable.
  3. Fire, CO2 and other audio alarm monitoring.

Further beta testing is on going...
Got to go ... the truant officer is knocking on my front door for skipping class. :frowning: :frowning: :frowning: