0
\$\begingroup\$

I built 3x3 microphone array using ICS-52000 MEMS microphones and Teensy 4.1 MCU to get data from those mics. I also wrote code in MATLAB to get data via serial port from Teensy.

ICS-52000 are 24 bit mics. In Teensy I had to use 2 channels, because each channel can get only 16 bit data. This is how I save final value:

finalSignal1 = mic1A[0]*256 + mic1B[0]/256;

I need to convert the digital data to decibels, which will represent the sound pressure level. The only idea that came to my mind is to calculate it like this:

20*log10((digital_value)/(2^24-1))
\$\endgroup\$
6
  • \$\begingroup\$ So you want to know what the PCM values mean in sound pressure level, dB SPL? \$\endgroup\$
    – Justme
    Commented Jan 22 at 18:58
  • \$\begingroup\$ you cannot calculate the sound level without calibrating the microphone first \$\endgroup\$
    – jsotola
    Commented Jan 22 at 18:58
  • \$\begingroup\$ @jsotola the mic is calibrated within +/- 1 dB, according to data sheet, so data sheet boasts high performance without calibration. \$\endgroup\$
    – Justme
    Commented Jan 22 at 19:00
  • \$\begingroup\$ Your formula needs the sensitivity of the mic included. Refer to page 13 in the data sheet, "Digital microphone sensitivity" to understand what full scale means in conjunction with the sensitivity given on page 4. Also beware of the units as the sensitivity is given with a reference of 1 uPa. SPL is referenced to 20 uPa which is 94 dB less than 1 uPa which is why they specify the sensitivity with a 94 dB SPL signal. \$\endgroup\$
    – qrk
    Commented Jan 22 at 19:11
  • \$\begingroup\$ @qrk data sheet clearly says 94dB SPL is -26dB FS. No uPa needed. \$\endgroup\$
    – Justme
    Commented Jan 22 at 19:18

1 Answer 1

1
\$\begingroup\$

The mic data sheet is clear on this, it reads that sound pressure of 94 dB SPL is converted to PCM values with amplitude of -26 dB FS (with tolerance of +/- 1 dB). Assume 1 kHz sine wave.

Your formula has one problem, the amplitude can't be (2^24)-1, because the sine wave goes between + full scale and - full scale values, so max full scale amplitude is only 23 bits and 24th bit is the sign.

You also can't feed 0 or negative values into the dB formula. With 0 as input, the output is minus infinity, and with negative values, the output values are in complex number domain.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.