Direction of Sound

I have a talking robot project, where you talk and it responds. I would like to know the rough direction of the sound so it could turn that way. It could have two mics 6" (15 cm) apart.

What already exists? What options are available?

If not:

I see it either as a narrow bandpass and then looking for zero crossing shifts.

Or by taking two arrays of samples and shifting them against each other (to a max of .5msec, the time sound travels 6") and adding them together. You would then look for the new array index that had on average the highest peaks. I'm fairly new to C++, having lived in languages that I understand the array functions, and C++ arrays are still hard for me. What array functions/code might get me there? How would I stuff in these samples?

Target is a DUE or perhaps a RaspPi. Does not have to be in real time. Could be an occasional thing eating processor time.

Would it not suffice to compare the volume?
Why so complicated?

Hey,

One of my lecturer phD student done this.. It was a mobile robot with two mic located at around 15cm between centre. In his explanation, it seem that the robot was able to distinguish the owner from the noisy room and follow the direction of the owner only. It was an impressive project.

I guess what you are saying is relatively what need to be done. But remember the devils is always in the detail where you need a suitable ADC and also you need to have an appropriate signal conditioning and also filtering..

Best of luck,

Ashraf

Whandall:
Would it not suffice to compare the volume?
Why so complicated?

The distance that the sound travels will never be greater than 6", for a source 5 or 6 feet away this is a very small amount. For 10 degrees off axis the sine is only 1.5% less. All kinds of acoustic variation make detecting those small differences difficult, I don't think it will work well. With that said, if someone had done it, I would look at it.

If the sound is comming from a side (that is when you want to turn, right?),
I think there will be a detectable difference in volume between the right and the left 'ear'
(a card or something like that could help in making the sound detection more directional).

Just like lightsearching via LDRs, which works pretty well.

Whandall:
If the sound is comming from a side (that is when you want to turn, right?),
I think there will be a detectable difference in volume between the right and the left 'ear'
(a card or something like that could help in making the sound detection more directional).

Just like lightsearching via LDRs, which works pretty well.

A cat has something like 20 muscles in each ear to turn toward the sound. Cats also hear far into the ultrasonic where a cat size ear is more directional.

Your idea has merit, there is something called a Jecklin disk, that gives two omni mikes directionality, this would have to be simpler. I'll see what Ebay offers in unidirectional mikes.

Karma to you.

Thank you.

You could put the microphones into tubes or cones to make them more directonal,
and/or mount the micros on servos and move them towards the sound individually.

Whandall:
Thank you.

You could put the microphones into tubes or cones to make them more directonal,
and/or mount the micros on servos and move them towards the sound individually.

Got a pair of these on the way:

http://www.ebay.com/itm/281816410890

I think I'll run it off a Pi and just plug them in the USB ports, Pi now has 4.

Whandall:
Thank you.

You could put the microphones into tubes or cones to make them more directonal,
and/or mount the micros on servos and move them towards the sound individually.

Japanese War Tuba:

Used for finding the direction of planes. Note the large size because of the low frequency of the droning plane.