cancel
Showing results for 
Search instead for 
Did you mean: 

Microphone array design using an STM32F7 microcontroller. GPIO sampling vs DFSDM module.

Tom Schofield
Associate
Posted on March 18, 2017 at 11:51

Hi all,

I am attempting to build a microphone array out of digital MEMS microphones and I am trying to determine if I can achieve a reasonable system on an STM32F7 microcontroller. Ideally I would like to capture the output of 8 or more MEMS microphones synchronously with a filtered and downsampled output of 100Hz - 10kHz and12 bit resolution. I would like to transmit the data to a PC for processing in an algorithm I have developed. I am aware of the DFSDM peripheral however it seems that it is only capable of working with 4 elements synchronously or with 8 elements multiplexed between the 4 filter inputs.

My other inclination is to attempt to read the microphone data signals via GPIO using the DMA controller and perform the downsampling and filtering operation on the PC. Is this a viable option or is it difficult to perform without enough storage space on the microcontroller (As the output of one microphone is now being stored as a 1Mbit/s stream). From the DMA controller I can see that the number of microphone elements could now potentially be 16 given that the storage space requirements / speed could be met.

As an aside, is it possible to utilize the ethernet peripheral on the microcontroller without TCP/IP. I.e. if I use the DMA to write to the Ethernet peripheral will these bytes be sent out in 'raw' over the wire. Is this a terrible idea in terms of bit error rate? I am trying to work out what is the minimal overhead solution for transmitting the microphone signals to a PC if they are to be coming in at a 1Msps sampling rate.

#dma #gpio #ethernet #dfsdm #mems-microphones
2 REPLIES 2
AVI-crak
Senior
Posted on March 20, 2017 at 02:13

Digital MEMS microphones have big phase distortions, and huge dynamic nonlinearity. They are intended for voice communication, and a part of algorithms on cleaning of a sound from noise - already are on a chip crystal.

You need dynamic microphones, electrostatic microphones have the worst result (a problem of a narrow directivity).

The number of microphones - are enough of three for the foreground.

The principal condition - the synchronous sound codec for all channels.
thuber9
Associate
Posted on March 20, 2017 at 04:09

My recommendation would be to look first at some of the digital MEMS microphone examples that are provided by ST (or other uc vendors).

Online filtering of all audio streams from 8 microphones might be challenging (DFSDM is not an option; I think even the STM32F413/F423 line only has up to 6 filters) but if you're happy to do the processing afterwards on a PC you can configure a I2S clock to drive SPI peripherials for each pair of microphones you want to use. This allows to stream up to 12 digitial microphones on a stm32f429 using DMA for the transfer.

On cheap nucleo boards, neither ethernet nor usb port provides enough bandwidth to dump reasonably high quality audio data from 8 microphones. My solution was to record raw PDM data to a SD card (or you could upgrade to a high-speed usb phy).

If what you're doing is a just-for-fun home project and you're interested in sharing code, leave a email address where I can contact you and I send you some code from my 10 microphone array on a stm32f429.