AnsweredAssumed Answered

two independent MEMS pdm acquisition

Question asked by Jan Slavotínek on Mar 29, 2017
Latest reply on Jul 18, 2017 by waclawek.jan

Hello STM!

 

I am facing a new goal: I want to build my own diferencial beamforming 2 MEMS PDM microphone array to achieve kardioid directivity pattern.

 

So i need to get data out of two MEMS mics simultaneously ... i mean literally get samples at the same time (because the beamforming depend havily on time that sound travel through space, so i will try not to add any delay between the two mics samples). 
So i am thinking what approach for data aquisition here is the best.

 

I got two variants at the top of my head. I will mention i am going to use probably some of STM32F4 168 MHz or higher (reason is that i developed so far a lot of my app using single microphone at this mcu and it had suitable performance for all the signal processing needed) 

 

   1. Variant:

Aquire both PDM via one I2S data line using the "trick" with double PDM clk frequency from I2S routed to a timer (to divide the clk by 2) so i can aquire both of mems mics with only slight delay of tdelay =  1/2  *  1/Fs [s]. Thats fine, it result in sound travel distance difference of 66 um.
Another thing to consider is that i need to demux the signal via firmware routine that takes cpu time ... and i need to figure out how properly setup the PDM filter (i guess 2 input channels, 2 output channels?). 


Questions
Here i am not sure: If i demux bit interleaved pdm to Byte interleaved, this Byte format is suitable for PDM library right? 


My thoughts:
I dont like that this varian employ an additional timer. Even more i dislike that i will need to make an outside cpu rout with pdm clk that will be something like 2,5 MHz! 

 

   2. Variant:

Use a separate I2S peripherrals for each MEMS microphone.

 

 

Questions
Is it possible to synchronize both peribherrals so they start at exact same time? 
Does this option means more cpu load then the variant 1? here will be no need for demuxing the signals, but will be necesarry to call PDM toPCM function separately ... 


My thoughts:

I would like that variant because its easier to implement, and doesnt require to employ another Timer and rout high frequency (twice higher) outside mcu chip to timer input ... 

What do you think dear community? 

Thanks for your kind answers
reagards  Jan 

Outcomes