Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Sound localization using microcontrollers

Not open for further replies.

Paul V. Sebastian

Newbie level 5
Apr 21, 2015
Reaction score
Trophy points
Activity points
Hi guys,
I wish to do a project based on sound localization.Is there somewhere I can get a code from?...All I need to do is to trace the location from where a sound is coming....

1D, 2D, or 3D?


This topic has come up a few times here. Try a search on 'localization'.

You are looking for the particular spot, which is the correct distance from each microphone, so that it results in the measured delay of sound arrival at the mics.

There is a thread where I replied, bringing up the idea of testing every point inside a radius, to find the correct spot.

I'm sure there is a mathematically simpler way. Something in the nature of solving two (or three) simultaneous parabolic equations. Don't know which method is easiest to code, however.


For 2D you need at least three microphones.

Human ears location:
high frequencies work with travel time,
Low frequencies with sound level

What resolution do you need?


It should work for human voice is sound level better?...and I think of getting a resolution of around 15 cm ......


It should work for human voice is sound level better?
It depends on the distance of your microphone (and a little on the distance of your source). I tend to travel time.
How is your setup? How many microphones? in what mechanical arrangement?

How do you want to process the data?
analog filters --> compressors-->ADC(simultaneous_sampling/multiplexed_sampling, sampling rate) --> and then?

...and I think of getting a resolution of around 15 cm ......
15cm without additional information is meaningless. Either we additionally need the distance of the source or you calculate angular resolution.


3 microphones arranged in a triangle would do it I guess..don't know if there is a minimum distance between these mics...

The range that I'm expecting is a circle of radius 15 cm .I meant that I need to locate a circle of radius of 15cm in that bigger circle of 1 m radius..


Did you try to calculate travel time with your given data?
Speed is about 300m/s.


In a reverberant space, with speech as the source this is solidly a research problem, doubly so if there is any background noise...

You also need to specify threshold values for probability of detection and probability that target is inside the given 15cm circle.

I very much doubt that you will find code for this as an existing library, odds are you will have to write your own, and I would suggest starting with a whole pile of modelling in matlab or such before even thinking about going to a micro.

I would be thinking in terms of some filtering followed by a whole pile of autocorrelation and cross correlation, some of the public literature on passive sonar may be of interest.

Regards, Dan.



For sure the mathematics needs to be done first.
This is necessary too decide what mechanical construction you need - or if you already have one if it fits your needs.
The next is the analog data conditioning and the converting to digital signals.

If this is complete:
I´d make some tests, sample the data and bring it to a PC, where you can play with.


Not open for further replies.

Part and Inventory Search

Welcome to