Hi everyone!
As some of you might know, there will be a digital MEMs I2S microphone on the new Smart Citizen Kit 2.0. Throughout some development insights posts, we will be illustrating the process we have followed during the implementation, selection and testing of this microphone in the upcoming kit.
Our final choice for the microphone was the INVENSENSE (now TDK) ICS43432: a tiny digital MEMs microphone with I2S output. There is an extensive documentation at TDKâs website coming from the former and we would recommend to review the nicely put documents for those interested in the topic.
Image credit: Invensense ICS43432
So, to begin with this series of posts, weâll talk about the microphone itself and the I2S protocol. The MEMs microphone comes with a transducer element which converts the sound pressure into electric signals. The sound pressure reaches the transducer through a hole drilled in the package and the transducerâs signal is sent to an ADC which provides with a signal which can be pulse density modulated (PDM) or in I2S format. Since the ADC is already in the microphone, we have an all-digital audio capture path to the processor and itâs less likely to pick up interferences from other RF, such as the WiFi, for example. The I2S option comes from the advantage of the decimated output, and since the SAMD21 has an I2S port, this allows us to connect it directly to the microcontroller with no CODEC needed to decode the audio data. Additionally, there is a bandpass filter, which eliminates DC and low frequency components (i.e. at fs = 48kHz, the filter has -3dB corner at 3,7Hz) and high frequencies at 0,5¡fs (-3dB cutoff). Both specifications are important to consider when analysing the data and discarding unusable frequencies. The microphone acoustic response has to be considered as well, with subsequent equalisation in the data treatment in order. We will review these points on dedicated posts.
Image credit: ICS43432 Datasheet - TDK Invensense
The I2S protocol (Inter-IC-Sound) is a serial bus interface which consists of: a bit clock line or Serial Clock (SCK), a word clock line or Word Select (WS) and a multiplexed Serial Data line (SD). The SD is transmitted in twoâs complement with MSB first, with a 24-bit word length in the microphone we picked. The WS is used to indicate which channel is being transmitted (left or right).
Image credit: I2S bus specification - Philips Semiconductors
In the case of the ICS43432, there is an additional pin which corresponds with the L/R, allowing to use the left or right channel to output the signal and the use of stereo configurations. When set to left, the data follows WSâs falling edge and when set to right, the WSâs rising edge. For the SAMD21 processor, there is a well developed I2S library that will take control of this configuration.
To finalise this first post, we would like to highlight that the SD line of the I2S protocol is quite delicate at high frequencies and it is largely affected by noise in the path the line follows. If you want to try this at home (for example with an Arduino Zero and an I2S microphone like this one, it is important not to use cables in this line and to connect the output pin directly to the board, to avoid having interfaces throughout the SD line. One interesting way to see this is that every time the line sees a medium change, part of it will be reflected and part will be transmitted, just like any other wave. This means that introducing a cable for the line will provoke at least three medium changes and a potential signal quality loss much higher than a direct connection. Apart from this point, the I2S connection is pretty straight forward and it is reasonably easy to retrieve data from the line and start playing around with some FFT analysis⌠weâll see this in other post!
So, hope you enjoyed it and let us know your comments/questions about it!