Skip to content

Arduino Reading Sample Values From MEMS

Panday Swarnam (IFIN DES PTS TI EA DE) edited this page Oct 12, 2022 · 1 revision

The IM69D130 Microphone Shield2Go is a standalone break out board with Infineon's Shield2Go formfactor and pin out. You can connect it easily to any microcontroller of your choice which is Arduino compatible and has 3.3 V logic level (please note that the Arduino UNO has 5 V logic level and cannot be used without level shifting). For additional details about the board please have a look at Arduino Getting Started.

This board uses I2S and will block the SPI ports of the Shield2Go as they are redefined to be compatible with the Shield2Go formfactor.

Overall, the following SPI - I2S pin matching is in place:

  • SPI:MISO -- I2S:DATA (INPUT)
  • SPI:SCK -- I2S:BCLK
  • SPI:SS -- I2S:LRCLK

However, every Shield2Go is directly compatible with Infineon's XMC 2Go and the recommended quick start is to use an XMC 2Go for evaluation. Therefore, please install (if not already done) also the XMC-for-Arduino implementation and choose afterwards XMC1100 XMC2Go from the Tools>Board menu in the Arduino IDE if working with this evaluation board. To use it, please plug the IM69D130 Microphone Shield2Go onto the XMC 2Go as shown below.

Example

Before you can use the examples, ensure that you have installed Arduino as described here. Moreover, the XMC-for-Arduino integration is needed for the XMC 2Go and ensure that you have followed the instructions provided here. Especially, ensure that you integrated the XMC boards into the Arduino IDE and that you have installed the SEGGER J-Link software from the official source. Moreover, ensure that you select the XMC1100 XMC2Go board from the Arduino IDE if you compile the examples.

Example sampleValues

This example is self-explanatory as it mainly reads out one single microphone and prints the data on the serial monitor. Just follow the instructions provided in the sampleValues.ino file, connect the stacked boards to the PC and press the Upload button. Select the related COM port from Tools – Port and open the serial plotter from Tools - Serial Plotter with the correct COM port and baudrate of 1000000 to see the data. Please note that the serial plotter might get blocked if you flash the example and have selected the wrong baudrate. In this case, just unplug the board immediately with open serial plotter, select the respective baudrate, close the plotter, reattach the board and open the plotter once again.

Known Issues and Additional Information

Sampling Rate

Sampling rate can be too high to transfer the collected data via the serial interface. The XMC2Go has a maximum baudrate of around 1 MBaud and if the data cannot be transferred accordingly, an overflow will happen. This can be checked in the examples, but currently a maximum sampling rate of 11 kHz for a single microphone is possible with the provided examples.