Sound detector with Raspberry Pi

Hello everybody !

This is my first post on this forum so tell me if I do something wrong and sorry for my english, i’m french.

I want to mesure the decibel level in a room with a Raspberry 3B so I bought the SparkFun Sound Detector.

So I have the SparkFun’s sound detector and I have a MPC3008 (ADC) because I need to read the “envelope” output of the detector that is an analog output and a Raspberry don’t have analog input.

I plugged everything well and I’m able to read the output value that give me the MP3008 :

Raw ADC Value: 2048

ADC Voltage: 0.20625314717326618V

But my problem is the following : how to convert this value in dB ?

I saw some solutions and formulas for arduino but that don’t work in my situation.

Can someone help me with this ?

Thank you !

Have you tried this library by the way?

https://github.com/swapnilbembde/Sound_Level_Meter

Thank you for your answer. It seems to be hard for me to try. No details privded on what sensor he used, connectors, adc, output …

But my problem is the following : how to convert this value in dB ?

A single ADC measurement can’t be converted into dB units. You need to average some measurements over a period of time (usually root mean square), possibly using some weighting factor.

The dB measurement is computed from the logarithm of the ratio of the current average to a reference average.

The easiest way to calibrate your microphone is to compare the logarithm of the averaged output to the reading of a professional sound level meter, in a variety of noisy environments.