Advice on building a noise sensor

electretmicrophonesensorsound

I'm attempting to build a noise sensor that detects loud environmental noise. The idea is that the sensor would be able to detect loud music or a loud television within 30 feet, in order to record a noise disturbance.

I've tried a couple of electret mics. The Grove Loudness sensor's signal has too much variance and "bounces" around a lot:
http://www.seeedstudio.com/wiki/Grove_-_Loudness_Sensor

The DFRobot noise sensor's signal is more stable, but it does not detect sound as well as the Grove sensor:
http://www.dfrobot.com/index.php?route=product/product&product_id=83#.U6fDE5RdVYU

Both mics are far too sensitive to vibration, and will output higher signals when a door closes, platform shakes etc than when loud music is playing. And neither mic will have a range of 30 ft.

Does anyone know of better types of mics to try? Or should I consider building my own mic? Any advice on building my own mic?

Best Answer

I think your approach will depend largely on whether your device requires tuning or not. For example, if the venue is typically loud (or loud during some times of the day), it will need to have a different threshold than something which is typically very quiet. I think the problem you will have with these analog circuits is that they require you to manually tune the device for the ambient loudness level, which might be different at different times of the day. Most likely the problem is not with the microphone or capturing the data, it is about how you interpret the data.

For your application, the typical thing to do is to reformulate the problem as a statistical model. A common model used for this approach is the Autoregressive moving average model (ARMA: see wikipedia link). Broadly speaking, this model generates a statistical moving average and compares your data to the moving average. You should see how this model corresponds nicely to your problem; when the ambient noise level is very low (for example, it is 3AM), a relatively soft sound will still count as noise. When it is a busy time, the threshold for noise will be higher.

Of course this relies on you sampling the audio data, perhaps into a windowed buffer, and computing the energy of that buffer (those are your 'observations'). Therefore it will require a microcontroller or DSP of some sort. It is going to be more complex than any of those analog circuits - but will likely be much more robust and intelligent behaving as well.