cancel
Showing results for 
Search instead for 
Did you mean: 

MEMS audio sensor MP23DB01HP Values/Units

FilipeLourenço
Associate II

I have a question about the MEMS audio sensor MP23DB01HP.

I think i already undertood that the output is a PDM, but my question is, how can I convert that to obtain a corresponding value in dB? Or some used unit?

I have done the acquisitons, but know i don't know what to do with that values...

Thank you in advance for your replies

5 REPLIES 5
Andrea VITALI
ST Employee

What have you acquired? not clear - if you have the PCM (pulse code modulated) stream then you already have everything. If you do not know how to convert from PDM to PCM, then PCM was not saved, did you save the PDM bitstream?

The PDM to PCM conversion can be done by the firmware, check for example AN3998 and UM2372 that describe the API of the library in STM32Cube software packages: 

The PDM to PCM conversion can also be done by a dedicated hardware peripheral on STM32 models equipped with that peripheral, check AN5027 for more information

Finally, audio processing and fusion such as BeamForming (BF), Sound Source Localization (SL), FFT analysis, and of course PDM to PCM conversion is in X-Cube-MEMSMIC1 software package!

 

Thanks @Andrea VITALI 

I am using steval mkboxpro with FP-SNS-DATALOG2, and after acquisition i obtained a .dat file, then i used the program that came in  FP-SNS-DATALOG2 to convert .dat to .csv, after opening the .csv i have the timestamps and waveform. Like this:

FilipeLoureno_0-1740044539396.png

From what i understand by reading the files and your explanation, the output is a PDM, a stream os 0s and 1s, but i don't have that output. My problem is that i need to have this in db or dbSPL.

Any of the solution that you suggested is compatible with using FP-SNS-DATALOG2?

the CSV file obtained from the microphone is a PCM (pulse-code-modulated) meaning that all numbers represent the audio level. Just plot the waveform to see it.

dBSPL can be estimated only indirectly, assuming the max PCM value is corresponding to the AOP acoustic-overload-point of the microphone (see datasheet).

Anyway, if you happen to manage to get the PDM bitstream, you can easily convert to PCM. Example: PDM stream is 1bit a 3Mbps, you want PCM at 48kHz, down-sampling ratio is 64:1. You usually apply low-pass filters and down-sample in stages. First stage can be to apply a moving average with 8:1 downsampling which means subdividing the bitstream in bytes and counting the '1's in each byte. From there you have a 3bit PCM at 384kHz and you need to apply a better lowpass (IIR or FIR) to get good signal-to-noise ratio in the audio band (see design tips DT0088, DT0091, DT0092 for example).

no need to solve a problem because there is no problem: DATALOG2 saves the PCM in the .dat and you get the values of each audio sample in the .csv.