Sound based location system; is it possible?

Hi everyone,
I just had a random idea for an Arduino project, but I wanted to know if anyone thinks it's even possible. So my idea is to have several microphones (two or three) connected to an Arduino, listening for a specific sound. The sound would be generated by a 'beacon' device, it would be some sort of 'ping' or something. Anyway, the Arduino would be listening for this 'ping' and, when it detects it on one of the microphones, it measures the amount of time it takes for the sound to get from one microphone to another. Knowing the speed of sound in air, the distance between microphones, and the time it took for the 'ping' to cross the space between the microphones, it should be possible to calculate to position of the 'beacon'. Right? It would work sort of like the human hearing system, which allows us to locate where in space something is. I was thinking it would be possible to use just two microphones, but perhaps it would require three. Any ideas on this? Any reasons why it wouldn't work? I'm thinking perhaps the Arduino wouldn't be fast enough.
~Josh

Indeed this has been done many times. Google "trilateration" or "ultrasonic localization". Arduino is fast enough to do this, but it is not trivial to implement. The hard part is synchronizing and timing the signals.

You can also buy the Posyx indoor positioning system that uses radio in the same fashion as GPS.

Knowing the speed of sound in air, the distance between microphones, and the time it took for the 'ping' to cross the space between the microphones, it should be possible to calculate to position of the 'beacon'. Right?

No.

If the source of sound is at the apex of a isosceles triangle the it will reach both microphones at the same time. The sound will not go from one microphone to the other will it?

jremington:
Awesome! I know it's been done many different ways before, I just wondered if it could be done with Arduino. That GPS/Radio thing looks pretty cool, if I had a specific purpose in mind, I might use that. But this was just a random idea I had, I don't have a particular application in mind, yet. Now that I know it's possible, I'll just have to make it and see what I can do with it! Thanks!

Grumpy_Mike:
Yeah, that's what I was wondering. However, if that happened, you would at least know that it was somewhere directly in front of or behind the microphones. I think if I used three microphones it would work no matter where the 'beacon' is. Thanks!

They have actually been experimenting with that technique (and I think it is implemented in some areas) for determining the location of gunshots in high crime areas. It allows the police to know exactly where to go when shots are fired.

They have actually been experimenting with that technique

The army have been using the technique for decades to determine the location of snipers.

Search this forum, some one once used it to locate the position of a bullet on a metal target.

Note that 3 microphones is not enough for 3-d, as it will only resolve a plane.

Check out these "war tubas" -- listening devices which were used in WWI (yes, "I") to detect incoming enemy aircraft.

That's an interesting project. But as you said, it takes three microphones even for 2-dim, and the ATmega328 has only one ADC to convert the mic singals one after the other.
So you have to attach your mics to three separate Arduinos (could be even the Arduino-mini with ATmega168) as slaves and evaluate their data with a fourth Arduino as a master, triggering the slaves simultaneously and then calculating the position of the sound source. You need some conic section math to do this.
I would like to see your results.