Skip to content

Raspberry Pi Getting Started

Julian Eder edited this page May 24, 2024 · 6 revisions

Infineon's I2S microphone solutions are compatible with many Raspberry Pi models. Please check below for a full compatibility list.

This guide describes how to easily get started with a Raspberry Pi and the Infineon I2S stereo microphone Shield2Go.

Compatibility List

Platform Compatible
Raspberry Pi 4 Mod. B ✔️
Raspberry Pi 3 Mod. B+ ✔️
Raspberry Pi 3 Mod. B ✔️
Raspberry Pi 3 Mod. A+
Raspberry Pi Zero
Raspberry Pi Zero W(H)
Raspberry Pi 2 Mod. B v1.2
Raspberry Pi 2 Mod. B
Raspberry Pi 1 Mod. B+
Raspberry Pi 1 Mod. B
Rapsberry Pi 1 Mod. A+
Raspberry Pi 1 Mod. A

Hardware Setup

  • Connect the IM69D130 Microphone Shield2Go to your Raspberry Pi

Using Jumper Wires

Pin connection:

Microphone Shield2Go Raspberry Pi
3.3V 3V3
GND GND
DATA BCM 20
BCLK BCM 18
CLK BCM 19

Use the adapter to connect the microphone Shield2Go as shown in the picture:

⚠️ Make sure to use the right slot of the adapter! Only this slot breaks out the I2S interface.

ℹ️ The microphone Shield2Go can be combined with other Shield2Go boards.

Raspberry Pi Setup

Set up Raspberry Pi with Raspberry Pi OS or similar OS. Check this page for instructions.

You can access your Raspberry Pi either using a monitor and a keyboard or using SSH in a headless setup as described here.

Now insert the microSD card into your Raspberry Pi and connect the power supply to boot it up.

Software Installation

To enable I2S on your Raspberry Pi you have to follow a few installation steps. We recommend to follow this guide by Adafruit. The following steps are taken from this guide:

Update your Raspberry Pi

sudo apt-get update
sudo apt-get upgrade

afterwards reboot your Raspberry Pi.

Install Python 3 and Pip

sudo apt-get install python3-pip

Run the Installer Script from Adafruit

cd ~
sudo pip3 install --upgrade adafruit-python-shell
wget https://github.com/raw/adafruit/Raspberry-Pi-Installer-Scripts/master/i2smic.py
sudo python3 i2smic.py

and follow the instructions given in the script.

The script will ask Auto load module at boot? [y/n]. Please confirm with y.

Make sure to reboot after running the script.

Final Check

As a final check run

arecord -l

if a device named sndrpii2scard or similar is listed everything worked as expected.

Let's now test if audio recording works as expected. We can record an audio sample with this command:

arecord -D plughw:1 -c2 -r 48000 -f S32_LE -t wav -V stereo test.wav

By default, the sound level of the recording is very low, but so is the noise, hence you can easily amplify the output file e.g. using sox:

sudo apt-get install sox
sox test.wav test_norm.wav --norm=0 trim 10

--norm=0 normalizes the output file to 0 dB and trim 10 cuts the first 10 seconds of the audio file. This is recommended if you get a clipping peak in the beginning of the recording, because otherwise the normalization does not work correctly.

Your Raspberry Pi is now ready to work with I2S devices.

Next Steps

Check out this page for application examples.