Hi, I want to make a sound source localization module using TDOA/FDOA/Phase difference method/intensity of sound method. The 4 microphones are arranged in a square pattern and my aim is to find 3d co-ordinate position of the source (moving) wrt the center of the arrangement.
**The out come is further used in a different project for pointing the camera in the direction of the sound source
I have an arduino mega board and 4 INMP441 microphone modules (not Invensense, refer the link)
Well, I guess, your going to have to reconcile the relatively slow ADC in the baseline arduinos,@# well,as the ~4uS timing resolution in micros() results.
You can do a lot in that time, but need to closely watch your code structure and timing to avoid any wasted clock cycles.
INMP441 module gives a digital output which rules out the effect of ADC in the Mega board, the timing of ~4us is the main issue I am concerned with but considering my application is for personal use I am slacking on that for now.
Since, this is my first time using a mega board, I also need help with connections for the microphones and mega board. I have used uno earlier but only for simple projects like line following rc vehicles, and controlling motors only.
A while back I did some experiments on this concept. My setup was an STM32 "Blue Pill" board with four analog microphone modules. The ADC on that microcontroller has a cyclical free run mode, that is, it would sequentially sample each of the four channels and repeat with the only intervention from the CPU being to retrieve the data as it became available. The point is that the relative time relationship between samples across channels was fixed and known. To the extent I pursued this project (thus far) I streamed data off the microcontroller to a PC for processing. I got as far as "proving" 2D angle of arrival measurements were viable.
It's not clear to me how synchronization of sample time across the four channels works with an I2S digital microphone, but you will need to know the relationship of the "time of sample" across the four channels to do any sort of TDOA/FDOA/Interferometry sort of math on the back end.
In any case, welcome to the forum and I look forward to any progress updates you can make.
Arduino Mega is not the right tool for such task, it neither has interfaces nor processing power, and it's short on ram for such problem. The simplest way would be to use stm32 with 2 hardware I2S (L and R channels for two mics on each) - then if you take stm32x4 or x7 series, you may even have some reasonable MCU time available to make on-board analysis.
Having said that, it's quite complicated project with many challenges. If you don't have years of experience in the area - then you might need quite a few months to get there
I have an STM32F103C8T6 module from a previous project not being used, I can switch to that. But the microphones I have are digital, I'll have to figure out on that.
Can you please, provide a link to your project? It would be of great help
I agree on the suggestion but STM32x4 and X7 series is very hard to get hands on in Indian markets. Either the international shipping costs will be equal or more than the product price or it takes weeks or months for a local dealer to get one for me.
And again Indian knockoffs and look alikes are hard to differentiate to get a genuine product.
I am now succesfully able to locate the sound source using TDOA and then trilateration to get the 3d co-ordinates of the source wrt center of the arrangement.
Outcome: Output is at 1s delay wrt to the movement of the source. Sufficient enough for my application of mapping the path of sound source and tracking it on the video
Setup: Arduino mega, Omni directional Digital MEMS microphones ( 4 X INMP441 microphones)
Calculation methods: RMS of location from Intensity of sound method and phase difference method.
Additional tips: TDOA requires a bit more of setup (better microcontroller and analog mics + ADC) and not feasible for indoor environment, FDOA has a lot of frequency variations due to echoing but possible for out door environment