SoundCompass

Projects you are planning or working on with the Mojo
Post Reply
PaulF8080
Posts: 6
Joined: March 1st, 2015, 2:04 am

SoundCompass

Post by PaulF8080 » March 1st, 2015, 2:18 am

Saw you on Adafruit. I am deaf in one ear and have been looking for a a way to tell where sounds come from.

This projct may be over kill for me, but may interest you guys:
http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3958238/

The MEMs mics use single wire signals that need to be converted to digital pressure readings and they use an FPGA for the conversion. Can the FPGA do FFT. FFT output usable by GnuRadio would be great.

embmicro
Site Admin
Posts: 834
Joined: March 24th, 2013, 12:45 pm

Re: SoundCompass

Post by embmicro » March 3rd, 2015, 12:47 pm

This is awesome you posted this. I actually just did a project with the Mojo using an array of microphones to detect the direction of sound. So I can confirm it is 100% possible.
2014-11-12 12.17.26_small.jpg
2014-11-12 12.17.26_small.jpg (160.95 KiB) Viewed 7143 times
Of course this only works in 2D, if sound comes from above or below this array it gets confused. I may turn this into a shield, but the only reason I haven't is because all my processing was done in MATLAB and the Mojo was simply used to sample all 7 microphones simultaneously.

The way I did it was to perform an FFT on each audio stream. Then I took each frequency component and calculated the relative phase difference to the same frequency component of the center microphone. Using these phase differences you then get a rough direction of each frequency (assuming one direction per frequency). By looking at groups of frequencies that point to a similar direction and how loud each frequency is you can detect multiple sources as long as they have distinct enough frequency components. In my tests I was able to sort out music playing, me talking, and flicking of a cup simultaneously.

I'll attach the pdf of the project. Keep in mind I did this for a machine learning class so beware of jargon.

Justin
Attachments
Detecting the Direction of Sound With a Compact Microphone Array.pdf
(1.5 MiB) Downloaded 417 times

esuncloud
Posts: 1
Joined: September 1st, 2016, 4:38 pm

Re: SoundCompass

Post by esuncloud » September 1st, 2016, 4:48 pm

Hi Justin,

Just found this interesting microphone array project and could you please make it a shield? I am especially interested in the circular microphone array and would like to test my algorithms. I only need to capture all the channels and will appreciate it if you could share your Matlab code with too. Look forward to your reply.

Regards,

embmicro
Site Admin
Posts: 834
Joined: March 24th, 2013, 12:45 pm

Re: SoundCompass

Post by embmicro » September 7th, 2016, 2:31 pm

We are working on making this a shield. As the design files are pretty crude, I don't want to post them publicly yet but feel free to email me at justin@embeddedmicro.com

PaulF8080
Posts: 6
Joined: March 1st, 2015, 2:04 am

Re: SoundCompass

Post by PaulF8080 » December 10th, 2017, 7:29 pm

I was going to jump to a bookmark and wondered what's that Embedded Micro link. So here I am almost three years later and I got a huge surprise. I'm going to buy the microphone shield. One question: Why 2D? I was thinkng 3D when I suggested this. A very simple case is when all in the circle are in phase means the sound is straight up or down. I suppose you need a mic at a non-zero Z axis to tell up from down. I'm going to brush up on my Verilog. I last saw Verilog code when I retired 5 years ago. Intel used an enhanced Verilog, but since I forgot everything I knew the difference shouldn't be a problem. :-)

PaulF8080
Posts: 6
Joined: March 1st, 2015, 2:04 am

Re: SoundCompass

Post by PaulF8080 » December 19th, 2017, 3:09 pm

I got the Mojo and the Microphone Shield. The picture above doesn't do the boards justice. The boards look great. I'm not sure about Lucid, yet. I plan to give it a try after the holidays.

tommyleung
Posts: 1
Joined: March 1st, 2018, 1:05 pm

Re: SoundCompass

Post by tommyleung » March 1st, 2018, 1:20 pm

Hi Justin,

I've recently bought a MOJO V3 and Microphone Shield. I tried to program the FPGA using sound_locator.bin, however the indicating LED is not quite accurate. I performed the test in a conference room around 5 x 5 with audio source at same horizontal level. Did I miss any other criteria that would cause the test inaccurate?

Thanks
Tommy Leung

embmicro
Site Admin
Posts: 834
Joined: March 24th, 2013, 12:45 pm

Re: SoundCompass

Post by embmicro » March 15th, 2018, 10:27 am

Hey Tommy,

What do you mean by it's not quite accurate? What behavior are you seeing?

Justin

PaulF8080
Posts: 6
Joined: March 1st, 2015, 2:04 am

Re: SoundCompass

Post by PaulF8080 » March 24th, 2018, 1:03 am

tommyleung wrote:
March 1st, 2018, 1:20 pm
Hi Justin,

I've recently bought a MOJO V3 and Microphone Shield. I tried to program the FPGA using sound_locator.bin, however the indicating LED is not quite accurate. I performed the test in a conference room around 5 x 5 with audio source at same horizontal level. Did I miss any other criteria that would cause the test inaccurate?

Thanks
Tommy Leung
Wild guess, maybe the room has a lot of echos. How did you load the bin file. I tried the project tool and it didn't ask were the file was and just failed with a file not found error. I'm hoping to use it outside to locate sounds.

embmicro
Site Admin
Posts: 834
Joined: March 24th, 2013, 12:45 pm

Re: SoundCompass

Post by embmicro » May 9th, 2018, 12:00 pm

You need to use the Mojo Loader (https://embeddedmicro.com/pages/mojo-loader) to load standalone bin files right now.

Post Reply