I have a PDM data input from the MEMS microphone on the Pynq-Z1 development board. My eventual goal is to take the FFT of the audio samples and display the frequency bins on some LED.

I am struggling to understand what exactly is needed to convert the PDM signal to an acceptable input for the FFT. I have seen some videos explaining converting the PDM to PCM by applying a low pass FIR and then decimating the sampling rate.

Is this needed for my hobby project? Can I just average the PDM samples ( 0 to 1 ) over chunks of time T, to give a really simple idea of the amplitude at that time, and then feed these samples to the FFT?

How much do I need to process my PDM? I am very weak in the area of DSP.

Any help much appreciated.


In a PDM microphone, the sigma-delta convertor pushes the noise to frequency regions above the 0-20kHz spectrum. So if you'd take the FFT of the signal that comes directly from the PDM microphone, the straight zeros and ones, and only look at the bins that fall in the 0-20kHz region, you'd get the data that you need.

You can see this here, where a 16kHz sine wave has been converted to a PDM signal:

spectrum of sigma-delta converted sine wave

The noise floor on the left of the green 20kHz line is well below -70dB, but quickly increases to the right of it.

In the plot above, the PDM data rate is 768kHz. A common PDM microphone data rate will be more on the order of 3MHz. The problem with this is that you'll doing FFTs of a large amount of data and that you're throwing away a lot of unused data.

A moving average filter would indeed quickly reduce the number of data samples that go into the FFT. It will result in attenuation in the pass band that is too high for good audio quality, but it should be totally fine for an LED display.

I wrote about my own PDM microphone learnings in a series of blog posts.

  • $\begingroup$ Fantastic blog posts, this is extremely helpful thanks. $\endgroup$
    – Bob John
    Feb 24 '21 at 13:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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