University of Florida
Electrical Engineering
Senior Design

Sound Triangulation


The objective of this project is to be able to locate the source of a particular sound using three listening posts and a Main device which determines location using several equations that we have constructed. The listening posts will contain a condenser microphone, an analog filter set to the frequency desired, a microprocessor with a sufficiently fast clock rate (enough to distinguish a difference in time between two posts, which we will be using a 40MHz uP), and a wireless communications module to communicate to the user’s device.

Challenges will include synchronizing multiple devices via wireless modules and calculating the source of the sound with precision.
We expect the listening posts to transmit the precise time that the sound was heard back to the Main device, where the mathematical equations can determine the origin of the sound relative to the listening posts. We have assigned one node to be the origin of the xy-plane.

The initial idea for this project stemmed from the police system (used in certain cities) that identify gunshots in the city and automatically report the incident to the police along with the approximate location of the source of the gunfire. Clearly, the university would not allow us to discharge firearms on campus (nor would we ask to do so). So the idea was scaled back to use a dog whistle. The disadvantages of moving to the whistle are that a gunshot would create a very loud sound and would remain fairly loud for a sizable distance, whilst the whistle’s effective decibel range is very dependent on the user. In order to compensate for this the amplifier used must have a bit more gain and noise reduction. We’d need enough gain to have the microprocessor’s interrupt trip but not enough to allow background noise to trip it.

Tech Choices

For the wireless portion of the project, we considered two distinct modules for implementation. We considered the Nordic 2.4GHz Transceiver and the XBee 1mW RF Module. Both boast ‘low-power consumption’ and both are fairly the same price. Although the XBee does consume a little more power than the Nordic, the XBee has the best ease-of-use and ease-of-programming.

The microprocessor for the listening node had several constraints. It needed to have a communications port (UART), a pin for the interrupt, input pins for a Node ID switch, and outputs for a seven-segment display to display the Node ID or other needed information. Although most microprocessors had enough pins to accomplish these tasks, the more important question was that these controllers had to be fast enough to have a sufficient amount of resolution to accurately distinguish the arrival times between two nodes.We decided that a 40 MHz core should have the capability for this task. The last constraint was that it should not have too many extra pins that would ultimately go unused. All these restrictions brought us to the PIC18F24J10.

Taking a look at the Main Unit, there were several choices to be made here as well. The first one is plain to see. The LCD we knew needed to be physically large enough to not strain the eyes as the user looks to see the data on the screen. Secondly the resolution needed to be enough to have lines that approximately resembled a straight, not-too-pixelated one. The LCD we decided on is approximately 6” x 4” with a resolution of 320 pixels x 240 pixels.

The microprocessor for the Main Unit will need to be quite the workhorse since it will be given several long and complicated equations to solve with very large floating point numbers. Many of these computations will require many cycles to process. We feel that the user should not need to wait long periods of time to get the solution, therefore, the microprocessor also needs to have dedicated multipliers and floating point math to minimize time needed for computation. So we decided that solely for its computational capabilities and high frequency clock rate, the TI DSP should be our choice to resolve this problem. The pinouts for the Piccolo chip will be few as it only needs to interface with the LCD and the XBee to communicate with the user and the Listening Nodes. There is also room to add a few push buttons for a settings modification.

Approximations / Sources of Error / Future Expansion

  • Assuming no ΔZ component - We will assume the sound occur in the same plane as the three listening nodes. This could be remedied by modifying the equations and perhaps adding another node. This will prove to be our greatest source of error, which isn't that bad.
  • Assuming XBee Signal Transfer is immediate - Along with transferring data between the listening devices and the main unit, the XBees will also be used to synchronize the listening nodes. After doing quite a bit of testing, we found that the discrepancy between the XBees is about 80ns. Which for our purposes is beyond acceptable.
  • Assuming the sound occurs in Quadrant 1 - Due to the fact that our equations interpret the data from any two nodes as hyperbolas, the results are troublesome. Any two distinct intersecting hyperbolas, could have up to four solutions. To ensure that at most one solution is possible, we have limited the scope to quadrant one solutions.
  • Assuming the components on the listening devices are exactly equal to the stated value and are equal to their corresponding components on the other devices - Although this isn't so much a concern, it is a source of error. With 5% tolerant components, the error is greater than if we had 1% tolerance.
  • Assuming NO obstacles between the sound and the listening node - This is an unfortunate must. These devices cannot distinguish or compensate for reverberations or obstacles that delay the sound from reaching the node.


This set of equations were used to determine the solutions between two nodes along the y-axis. The term 'g' represents the distance between the two nodes and the term 'd' represents the extra distance traveled by the sound. The term 'd' is determined by the difference between two nodes' synchronized times multiplied by the speed of sound.


Here the blue hyperbolas are solutions between the nodes along the y-axis for various values of 'd'. The black hyperbolas are solutions between the nodes along the x-axis for various values of 'k'.

Note that near each node there are two hyperbolas that intersect multiple times which cannot be resolved with the current implementation/equations.