Skip to main content
rrach
Associate II
February 26, 2019
Question

Problem while receiving data from MEMS microphone.

  • February 26, 2019
  • 3 replies
  • 970 views

I am using the STM32F407 discovery board and Wolfson pi audio interface. I have a problem in analysing sample values received from MEMS microphone.

I wanted to plot the data sensed by the MEMS microphone, which is just sensing the surrounding environment. So, in order to achieve this, I am using an array of float type (float32_t) to store the samples continuously. After running the algorithm for a few seconds, I am plotting the values. The problem here is, when I am plotting the data, huge values (around 32000) are getting displayed on the screen. And the graph is looking like a continuous pulse waveform.

Are these true sample values? If I want to operate on these samples, can I directly do that?

Some of the threads posted earlier, related to this topic, suggesting me to convert the values into the q0.15 format and then operate on it? I couldn't get a complete understanding over there.

Do I need to do that? If yes, why we need to convert into that format?

    This topic has been closed for replies.

    3 replies

    MikeDB
    Senior II
    February 26, 2019

    I think you'll find the microphone is a pulse density type (PDM) and it sounds like you are feeding that directly into your algorithm without converting to PCM. I'm sure there's a PDM to PCM convertor in the library if this microphone is of this type so have a check on it first.

    rrach
    rrachAuthor
    Associate II
    February 28, 2019

    Can I2s protocol handle values like fractional numbers like 12.30, 14.5678 or any other thing like that?

    MikeDB
    Senior II
    February 28, 2019
    No reason why not. Obviously you couldn't expect a dac to understand it but for processor to processor comms its fine
    Sent from my Windows Phone