Pages: [1]   Go Down
Author Topic: Noise level detector  (Read 1187 times)
0 Members and 1 Guest are viewing this topic.
UK
Offline Offline
Jr. Member
**
Karma: 2
Posts: 90
It was like it when I found it
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I’m about to start on what I hope will be a pretty simple project. I want to build an arduino based noise level sensor. I’m not interested in analyzing what the noise is, just whether it’s loud or quiet. (basically, I’m just trying to detect if a particularly loud item of machinery is functioning or not).

I’m trying to find out if I need an ‘envelope follower’ (and if I do, what is it?). There are several posts on this subject, but I’m still unclear on what it’s for. It sounds like it’s basically just a ‘sound averager’ that will give an output proportional to the ambient noise level, is this correct?

Can’t I just get a cheap electret microphone, connect it to a pre-amp (for example, this one…http://www.sparkfun.com/products/8872) and then wire the output of that pre-amp to one of the analogue input pins on an arduino and then use the analogueRead() function to decide how noisy it is?

Won’t this do what I need? Or is it more complicated than that?

Thanks
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27353
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sure - then do the averaging in software to smooth the level some.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17301
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Can’t I just get a cheap electret microphone, connect it to a pre-amp (for example, this one…http://www.sparkfun.com/products/8872) and then wire the output of that pre-amp to one of the analogue input pins on an arduino and then use the analogueRead() function to decide how noisy it is?

Won’t this do what I need? Or is it more complicated than that?

  It's a little more complicated then that. After the pre-amp you still have a audio AC voltage and the arduino analog input pins require that the voltage remain in a 0-5vdc range, no negative voltages allowed. What you must have after the preamp is a diode rectifier/filter circuit that will then give you a DC averaging value representitive of the AC signal. The other problem is that such a circuit will be basically a linear responding circuit and sound levels in the real world cover a hugh amplitude range and generally require a logrithmic amp to scale the range for useful measurement.

 So if your after a somewhat accurate 'loudness' measurement then you have further research to do. If you just want a circuit that gives a general "this sound is louder then that sound" kind of hardware/software function then just add a rectifier/filter and make sure the signal cannot go higher then 5vdc.

Lefty
Logged

UK
Offline Offline
Jr. Member
**
Karma: 2
Posts: 90
It was like it when I found it
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks - I understand the need to keep the voltage within the 0-5volt range, but where could a negative voltage come from on the pre-amp circuit?

Good point about sound being logarithmic I forgot that. Cheers
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17301
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks - I understand the need to keep the voltage within the 0-5volt range, but where could a negative voltage come from on the pre-amp circuit?

Is not audio a AC voltage with both a positive and negative voltage crossing the common reference? Unless you do something like add a DC offset voltage to a AC voltage there is always a positive and negitive voltage value at any give instance.
Good point about sound being logarithmic I forgot that. Cheers
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 634
Posts: 34523
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I remember from a few years back someone was trying to make a noise meter for a school canteen. The idea was similar to yours and so was the solution. However, he found after months of tinkering with levels that actual perceived loudness did not correlate with the signals from an envelope detector.

Just bear that in mind as it might not be such a simple project.
Logged

Pages: [1]   Go Up
Jump to: