I2S USB Microphone using STM32 and MEMS Microphone

I2S USB Microphone using STM32 and MEMS Microphone

Virtual desktops are used extensively in the IT sector currently due to the COVID-19 pandemic. This set-up allows the employees to work remotely and is convenient. Virtual desktops are preconfigured images of operating systems and applications in which the desktop environment is separated from the physical device used to access it. Users can access their virtual desktops remotely over a network. Andy Brown found a problem while joining meetings in his company’s Citrix-hosted virtual desktop, he observed that the video was fine but the audio frequency on the VDI was mismatched to the actual frequency on the physical device. He described that he sounded like Mickey Mouse on Helium.

The solution to this mismatch in frequency is changing the frequency on the VDI that requires administrator-level access. Andy tried installing a microphone app on his phone that acts as a USB microphone when connected to a computer. But he needed a dedicated USB microphone and so he decided to build an I²S USB microphone. He came up with two possible implementation approaches. The first approach is partly analog and partly digital microphone circuits. The second method is to design with all digital components and techniques.

Source: https://andybrown.me.uk/2021/03/13/usb-microphone/

First method: Partly Analog USB microphone

In this method, an analog MEMS microphone is used as a transducer. The signal from the microphone will be then amplified and conditioned. Next, the ADC will convert them into digital signals. This stage is necessary for performing digital signal processing. In analog signal processing, a high level of accuracy can’t be achieved as the accuracy depends on the tolerances circuit components. After processing, the signal is ready to go to the USB audio output.

Second method: All-digital USB microphone

In this approach, a digital MEMS microphone is used. The microphone produces signals that can be directly processed digitally. Thus, digital signal processing is performed directly on the microphone signals and after processing, the signal is provided at the USB audio output. It can be observed that this looks like a straightforward method as compared to the first approach.

Both the methods, however, require a MEMS microphone. A MEMS (micro-electromechanical systems) microphone is a pressure-sensitive diaphragm etched into a silicon wafer via MEMS processing. These microphones are widely used in mobile phones, WSNs, etc. The MEMS microphones come in a miniature metal package that houses the internal circuitry. A small hole is drilled on the metal body which allows the sound to enter. Andy used an INMP441 MEMS microphone for the project. INMP441 is an I²S based high-performance, low-power, digital-output, omnidirectional MEMS microphone with a bottom port. The I²S interface allows the INMP441 to connect directly to digital processors, such as DSPs and microcontrollers eliminating the need for audio-codec devices in the system.

INMP441 MEMS microphone module

The microcontroller used in this project is STM32. Andy needed one that has I²S and USB peripherals and that is capable of translating the I²S format into the USB format in real-time. So he selected STM32F446RCT7. He wrote the firmware in Ubuntu Linux using the STM32 Cube IDE. For audio processing, ST provides a suite of audio effects expansion software called X-CUBE-AUDIO. Andy mentioned in his documentation,

“This is implemented as a closed-source but freely available package that integrates easily into firmware using consistent APIs designed to be used as part of an audio-processing pipeline.”

Andy also made a PCB for the USB microphone and very thorough documentation of this project can be found at https://andybrown.me.uk/2021/03/13/usb-microphone/

GitHub link: https://github.com/andysworkshop/usb-microphone

Please follow and like us:
Pin Share
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
Get new posts by email:
Get new posts by email:

Join 97,426 other subscribers

Archives