Noise Pollution Monitor

Hi,

I want to create a simple noise pollution monitor for my bedroom that logs the noise (preferably in dB or in some manner that I can convert it) and sends the data to my PC for visualisation and analysis.

My beginner kit didn't come with a microphone but I imagine that the Grove Sound Sensor might be suitable? Or does that just detect a discrete threshold of sound rather than a continuous voltage reading depending on the magnitude?

If not I could use any electret mic - but then I suppose I will need to get one with a pre-amp circuit or construct one myself.

In any case how would I go about calibrating the microphone - so I can convert the voltage readings to dB? After some searching it appears the SPL calibration (i.e. going from Volts to dB) is very difficult to do - I don't need it to be hyper accurate but it would be nice to be able to see how many nights have noise levels above those recommended for healthy sleep etc. Does anyone have experience in performing this calibration (especially as dB is non-linear...)

My other concern is about how to transmit the data to my computer - my room is about 10-20m away and with the intervening walls I'm concerned it might not work well with a Bluetooth connection.

What systems would you recommend? RF? Wifi? (I guess Wifi would be easier for sending the data to the computer but might also consume a lot of power). Bluetooth would be the simplest by far though if the range is sufficient.

Finally, would I need an SD card to store data on the Arduino prior to transmission or could I just stream the data with no need for storage?

Thanks for any advice you have :slight_smile:

For calibration You might use some machines having a known noise level. Is absolute real dB neccessary? A personal noise scale might do?
As a beginning You can use Serial.print into a connected Pc You can copy the S P into any document You like. What do You think?

but I imagine that the Grove Sound Sensor might be suitable? Or does that just detect a discrete threshold of sound rather than a continuous voltage reading depending on the magnitude?

They do make sound threshold sensors, but the Grove sound sensor seems to put-out a DC voltage relative to the volume. If that’s the case, that’s easier than using a regular microphone board that puts-out a (biased) AC signal.

If not I could use any electret mic - but then I suppose I will need to get one with a pre-amp circuit or construct one myself.

There are microphone modules such as the [u]SparkFun BOB 12758[/u]. Its got power for the electret mic, the preamp, and a biased output (required for AC audio signals because the Arduino can’t read negative voltages). That particular board doesn’t have adjustable sensitivity and it may not have enough gain for you.

In any case how would I go about calibrating the microphone - so I can convert the voltage readings to dB?

You need a real SPL meter to calibrate. Then, there’s the complication of [u]A-Weighting[/u] which you’ll probably have to ignore.

some searching it appears the SPL calibration (i.e. going from Volts to dB) is very difficult to do -

If you have an SPL meter to get a reference, and if you are willing to accept a reading without A-Weighting, it’s not that difficult - You will have to find the peak (very 10 seconds or so) or take a moving average of the absolute value (after subtracting out the bias, if the signal is biased). Otherwise the “sampled” audio waveform voltages will appear “random”.

The dB formula is dB = 20log(V/Vref). And we don’t actually need to know the voltage, just an ADC reading that represents voltage.

So for example: Let’s say your SPL meter reads 80dB SPL and your Arduino ADC reads 200. That’s your calibration point. If you take a new reading and the ADC reads 400 we can calculate the dB difference. 20log(400/200) = +6dB. So, that’s 86dB SPL.

My other concern is about how to transmit the data to my computer -

The computer interface is probably the most difficult part of this project and I don’t have any recommendations for you. “Philosophically”, it would make more sense to get a wireless mic for your computer and write a computer application (no Arduino required).

The grove sound sensor will output a 0 - 1023 value to an analogue pin say A0. ( voltage output increases ).

there is no way to know what the values will translate to in db without some test equipment.

if you do try using it remember that it is 3.3v not 5v.

you say that you want to count how many nights noise levels get too high. you could use the device to set a threshhold level so that when noise goes over that level it trigers a counter to go up. also a timer so that it only counts once per night. or something like that.

hope this helps.

Thank you all for your replies - I think someone has done a similar thing to get absolute noise readings here.

So that should cover that part - I think I will look into Bluetooth for the data transmission part as IIRC it acts the same as a serial port so it should be the most easy to deal with. I guess I'll buy an SD card thing too just because I remember reading somewhere that someone had had problems with data loss when trying to just transmit data directly and in any case I'll probably end up using it for something.

I think someone has done a similar thing to get absolute noise readings here.

They are using an Android app as an SPL meter:

To check if the values obtained are correct we can use the “Sound Meter” android application, if you have a better meter you can use that for calibration. Do note that this project does not aim to measure dB accurately and will just give values as close as possible to the actual value.

I wouldn't trust an android app because there are LOTs of different Android phones and they are all going to have different microphone sensitivity. An iPhone MIGHT be more accurate since there are fewer models but I don't know how tightly microphone sensitivity is controlled/calibrated.

[u]Here is an inexpensive SPL meter[/u]. They don't give an accuracy spec, but it's probably better than a phone and hopefully there is some kind of calibration done during production.