Parsing Decibel Levels from PDM Microphone

Hello!

I am very new to the Photon 2 and am working on a project to read the decibel levels of a room and alert if they get over a certain point. I chose to use the Adafruit PDM microphone, assuming that I would be able to parse the decibel level from it, but I am quickly realizing that the examples and support that exist are for creating sound files and there is very little for handling data otherwise. I have looked at the examples in the Microphone_PDM and PDMGen3_RK libraries.

My question is, is there a way to parse the decibel level / volume from the microphone or have I chosen the wrong piece of hardware? I would appreciate any help.

Thank you!

It is possible, but I've not seen example code for doing it. There will be math involved. You will probably need an actual decibel meter to calibrate it. And it probably won't be particularly accurate.

The Microphone_PDM library will create a series of samples, which are typically 16-bit amplitude measurements over time.

The math involved is converting a series of amplitude values into sound pressure level. Decibels are a logarithm of the SPL, or something like that. I'm not an audio engineer.

Hi there, in case you need some inspiration from other people (I did not find an example with Particle devices but you can look at an Arduino one and get going):

https://www.google.com/search?q=arduino+decibel+meter&oq=arduino+decib&gs_lcrp=EgZjaHJvbWUqBwgAEAAYgAQyBwgAEAAYgAQyBggBEEUYOTIHCAIQABiABDIICAMQABgWGB4yCAgEEAAYFhgeMggIBRAAGBYYHjIICAYQABgWGB4yCAgHEAAYFhgeMggICBAAGBYYHjIICAkQABgWGB6oAgCwAgA&sourceid=chrome&ie=UTF-8

best

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.