DIY USB Microphone Seems Overkill; Is Surprisingly In-Depth

Those of us who have been working from home through video calls for the past year can attest to the rising demand for conferencing gear such as webcams and microphones. Not wanting to spring for a boring off-the-shelf solution, serial hacker [Andy Brown] decided to design his own USB solution from scratch and show us the process from start to finish.

Deciding to go for a full digital design for the circuitry, the peripheral is based off of a MEMS microphone and an STM32 microcontroller doing the heavy lifting between it and a USB connection. [Andy] notes that MEMS microphones are very delicate and you have to design the PCB around the hole where the sound enters, which is why he went with a breakout board which has the component already soldered onto it.

As for the MCU, he reasons that since this is a off-one project which won’t be produced in large numbers, the 180 MHz ARM core shouldn’t be seen as overkill, since it also gives him more than plenty of headroom to do signal processing to make the sound clearer before sending it through to a computer by the USB audio device descriptor.

Once the components are chosen and the board designed, [Andy] goes into detail explaining the firmware he wrote for the STM32 to translate the PCM samples from the microphone’s I²S interface into a format better suited for the computer. He also describes how it then processes the audio, applying a graphic equalizer to reduce noise and then ST’s own Smart Volume Control filter, which works more like a compressor than a simple amplitude multiplication.

Finally, all files for the project, including board gerbers and the STM32 firmware are available at the bottom of his post, and to boot, a video demonstrating the project which you can check here after the break. [Andy]’s choice of microcontroller for this project is no surprise to us, given he’s already made his own development board for the STM32 G0 series. But if this digital microphone project is a bit too modern for you, why not try your hand at building a ribbon microphone instead?

4 thoughts on “DIY USB Microphone Seems Overkill; Is Surprisingly In-Depth

  1. Very cool project. I can imagine him in a call with his bad quality audio, signing off, building the module, signing back in a month later, and asking ‘can you hear me now?’.

    I like it how accessible it has become with the tools STM provides. This is the big plus of using reputable manifacturers and, of-course, will enable us to buy more of their controllers. It’s hardly a first as STM’s F4 Discovery board had an I2S audio out hardware and code examples. I’ve tinkered with it to create an audio effect pedal a long time ago. Back then adding the DMA for the second I2S channel was a pain.

  2. Next step, physical design. If I learned one thing from researching streamers and press conferences it’s that physical filters are important to microphones that sound less like microphones.

Leave a Reply to jwrm22Cancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.