Pages: [1]   Go Down
Author Topic: Convert analog input from mic to decibels  (Read 1705 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is there any way to build an Arduino sound level meter that outputs values in decibels rather than leds? Software or hardware?
Logged

Offline Offline
Jr. Member
**
Karma: 2
Posts: 97
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yes, this is possible, but you will need to calibrate your microphone in some way (at least if you want the decibels for comparison to other data).  you should look around and see if anyone has written an RMS function for arduino.  it wouldnt bee too hard to implement elsewise.  then its just 20*log(value).  i have a fast log(sqrt()) i can dig up if necessary.
Logged

Offline Offline
Edison Member
*
Karma: 33
Posts: 1307
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Lots of people have build "VU Meters".   I've done a VU meter "lighting effect".   It's not too difficult, but you would need a real SPL meter to calibrate your meter for SPL.   You can probably use averaging instead of RMS (take a look at the "smoothing Example")  or you can measure the peak (say the loudest sound within the last few-seconds) if you wish.

If you want a simpler-cheaper approach, there is the LM3916, which is a VU meter driver chip that doesn't require any programming.  EDIT - Sorry, that's a string of LEDs...   You'll need a 7-segment displays or an LCD display. 

Real SLP meters usually have A-Weighting or C-Weighting which involves some frequency filtering and timing/averaging to simulate what we hear as "loudness", rather than just measuring a sound wave.
« Last Edit: August 11, 2013, 11:33:19 pm by DVDdoug » Logged

New England
Offline Offline
Sr. Member
****
Karma: 7
Posts: 295
Natural Semiinductor
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, you can calculate dB for several ratios
voltage uses 20*log (voltage2/voltage1)
power uses10*log(power2/power1)
absolute power referenced to a milliwatt of audio power dBm hitting the microphone. 10*log(power/1mW)

Which do you care about?
Absolute power in the air waves hitting a mic area?

Logged

I am going to get going.

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thank you all, it was the log equation that I was missing, now to pick some identical mic circuits, I had settled on a sample of a phidget 1133 but they won't be available again until October. I really appreciate your help. Next challenge, a believable and affordable UV sensor.....

Just gotta love arduinoites!
Logged

Pages: [1]   Go Up
Jump to: