Calibrating Arduino microphone

I am trying to find a method to calibrate my microphone sensors. My Arduino microphone is currently taking readings from 0-1023

I have access to an SPL meter, so my initial idea was to play pink noise out of my speakers in bursts. This way i could note the readings and match them

e.g

Sensor reading = 700 SPL reading = 77dB 700 = 77dB Sensor reading = 800 SPL reading = 85dB 800 = 85dB Sensor reading = 900 SPL reading = 94dB 900 = 94dB

I could even plot this on a nice graph.

Although I'm looking online and it doesn't see to be that simple. Is my method the correct way of doing it? or is there a better way without paying loads of money?

That’s right.

But, you only need one reference point.

You calculate decibels as 20 x Log (amplitude/reference).

For example, if 77dB SPL reads 700 that can be your reference (or a reference*).

If you take another reading of 1400, that’s calculated as 20Log(1400/700) which works-out to a change of +6dB. And, 6dB above your reference is 83dB SPL.

I chose 6dB because it’s a factor of 2 and it’s easy to remember. (And of course, the ADC only goes to 1023 so you can’t read 1400.) A reading of 350 would be -6dB from your reference or 71dB SPL.

…to play pink noise out of my speakers in bursts.

Constant noise (or longer “bursts”) may work better… Your SPL meter may be slow/averaging and it may not respond the same way as your Arduino mic which probably is reading/capturing the peaks.

  • You may want to calculate a

Adafruit has a nice tutorial on calibration.

SPL is a well defined measure and dB is a logarithmic scale. Do you have any idea what the readings from your microphone represent?

Thanks for your reply DVDdoug. I think part of your sentence has been cut off though.

DVDdoug: * You may want to calculate a

jremington: SPL is a well defined measure and dB is a logarithmic scale. Do you have any idea what the readings from your microphone represent?

I don't think they represent anything really. Just a higher number represents a louder sound. I understand that the calculations to achieve dB need to be given in volts, but i just need a a very rough estimate to complete my project.

If i calibrate using an SPL meter. Is there anything you think i should take into consideration, in terms of how i calibrate using the SPL meter and Arduino?

What i mean is: My arduino is finding the peaks, could my SPL meter work in the same way?

If the SPL meter is any good, it is measuring 20 log10(p/p0) dB where p = root mean square sound pressure and p0 = reference pressure (often taken to be 20x10-6 Pa, the typical lower limit of human hearing).

Your microphone is probably doing something different.

Not to mention that the frequency response will be different, so that while the arduino may be calibrated for pink noise, it might not work for real audio.

Thanks for your reply DVDdoug. I think part of your sentence has been cut off though.

Sorry, I was going to say that you might want to calculate a different reference. For example, you might want to calculate the value for 0dB SPL, which would be a small floating-point number.

You won't be able to read anything less than 1 from the ADC, since it's it puts-out integers, so you won't be able to read anything near 0dB. But with 0dB as a reference, you wouldn't have to add or subtract to get the final result.