MKR Zero and Infineon’s MEMS Microphone sensor “IM69D130” via I2S -> How to read audio from sensor and store it as .wav in micro-sd card?

Hi all,

i hope you can help me out here because this is super critical to me (writing my bachelor thesis right now). :smiley:

My setup consists of the Arduino MKR Zero and the Infineon's MEMS Microphone "IM69D130".
Links for the Microphone: https://www.infineon.com/dgdl/Infineon-IM69D130-DS-v01_00-EN.pdf?fileId=5546d462602a9dc801607a0e46511a2e ; GitHub - Infineon/IM69D130-Microphone-Shield2Go: Examples for Infineon's MEMS microphone based evaluation board IM69D130 Microphone Shield2Go for Arduino.

The IM69D130:
Unbenannt2.PNG

The MKR Zero is specialised on audio data and has I2S Bus. The IM69D130 also communicates via I2S.

My Questions:

  1. How is the correct pin matching?
    -> My solution so far:
    -> MKR Zero IM69D130
    -> SCK (pin 9) <-> I2S:CLK (or I2S:WCLK in my case because that is printed on it)
    -> MISO (pin 10) <-> I2S:DATA
    -> SS (e.g. pin 7) <-> I2S:BCLK
    -> Is this correct so far? And also: Is it correct that the SS (slave select) can take any not used/special pin (e.g. pin 7, 6, 5, 4, 3, 2, 1 and 0)?
  2. How do I have to code the software in order to manage to successfully read audio data from the sensor and store that data via a .wav file (or other audio file formats) in the micro-sd card? Is there any already uploaded/shared sketch which exactly does that for me or any code you smart people can quickly suggest?
  3. For my application (which is a moving object with 2 m/s for about 20metres) i have to install this measurement setup on the system. Therefore i can not have my Arduino + sensor on a cable to my PC.
    4.Is it possible to upload my code via PC with normal micro-usb connection, then unplug the Arduino+sensor from that cable, plug the power bank micro-usb cable to my Arduino+sensor and have still a running audio capture? In case that this does not work -> Have you guys any other working solution?*

I would appreciate your help and intelligence guys.
Best regards,
Jojo :smiley:

PS: I created the topic beforehand in the Hardware->MKR Family->MKR Zero tree, I hope it is okay that I copy my question in here because this thread is more suited!

Nope

I can't help with the nitty-gritty details because I've never used a MKR Zero or I2S, but I know a bit about audio.

What's your major? You might also tell us what this project is, other than a sound recorder?

The kind of help you need and the difficulty of this project depends on what you know... If you are an electronic engineering student, this should be easy. If you are studying computer science the software should be easy, etc.

BTW - If your thesis doesn't require you to build hardware you're probably better-off using a computer (or maybe a smart phone).

The theory is pretty simple... You read the audio data (amplitude) at a known sample rate and save those values to a file that has a WAV header. In an application like this the header will probably always be the same except for the size field.

If you don't already understand digital audio and sampling the Audacity website has a easy tutorial.

Audacity may be helpful in other ways too. For testing/debugging you may want to look at the recorded data as a waveform, or you might want to generate sine wave test-tones, etc.

Most Arduino projects are stand-alone. Usually we are making a "gizmo" that doesn't need a computer once it's programmed.

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