# Theory

The basic idea behind this project is to use an array of microphones to measure the relative time of a sound. Then, using the locations and arrangement of the microphones, we should be able to calculate where the sound originated.

Here’s how this will work. Let’s assume we have two microphones on an east-west line a distance d apart, and a sound wave is propagating past them at an angle Θ. Assuming we know the speed of propagation v, we can take the time difference t of the arrival at the two microphones, and calculate what Θ must be. It looks like the diagram at the top of the every page on this site:

So Θ=arcsin(v*t/d) and that gives us a rough direction to the source of the sound. The distance d can be measured with a measuring tape. The time difference t can be measured by a computer, and the velocity of sound can be calculated if we know the air temperature. Let’s assume some values to see it in action:

d = 20 meters (approximately 65 ft for those playing in the US)

v = 343.3 meters/second or 1126 feet/second (at 20°C / 77°F )

t = 1 millisecond = 0.001 seconds

So Θ = arcsin(343.3*0.001/20) = 0.01717 radians which is just a little less than 1 degree of arc.

Since the microphones are set on an east-west line, that means that the direction to the source of the sound is 1 degree west of north, or 359°.

Clever people will notice that I’ve glossed over a critical detail. I’ve assumed that the wave is propagating from the top of the page, rather than from the bottom. If it were propagating from the bottom, then the timing would be the same, but the bearing to the sound would be 1 degree west of south, or 181°. How do we figure out which of those is correct?

The answer is using more than 2 microphones. Let’s assume we had 4 microphones arranged in a square like so: