I am building a robot toy. When a sudden surge of sound occurs, I wish to calculate the approx position of the sound source.

I am going to place 3 analog mics on the edge of my round shape PCB, each facing outward.

Is there a chip can handle my requirement? Or I have to do voltage value integration 3 mics with a period of time on a MCU? If so anyone have done the firmware before?

  • \$\begingroup\$ This is called phased array. Not so simple stuff, the costellation and distance between mics matetrs. \$\endgroup\$ May 15, 2016 at 14:31
  • \$\begingroup\$ I hope can simply compare 3 mic voltage, and calculate the relative orientation of the sound source \$\endgroup\$
    – c2h2
    May 15, 2016 at 14:33
  • 2
    \$\begingroup\$ I did this on a project recently, and it event triggered (the system must be in low power mode until an event occurs). It was certainly not trivial circuitry or software. Olin's answer may well be sufficient for your requirements. \$\endgroup\$ May 15, 2016 at 15:57
  • \$\begingroup\$ I am pretty sure this has been answered before, but I can't seem to find them. \$\endgroup\$
    – gbulmer
    May 15, 2016 at 15:59

1 Answer 1


I don't know of a canned chip to do this, and that would be off topic anyway.

They way to compute relative position is to look at the time of arrival. Sample each microphone input at high speed and keep recent samples in memory. When you decide that a loud event has occurred, you run correlations between the stored samples to decide the time shift between them. From the time shifts, you can compute the relative location, knowing the locations of each of the receivers.

Note that in the general case it takes 4 receivers not in a plane to resolve full 3D. Your three receivers will resolve one less degree of freedom, like direction without distance in some cases.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.