Audio Geolocation with Mbed
Michael Bossi, Montana Bowman, Changjun Park, and Michael Reymond
Overview
This project uses three mbeds each with omnidirectional microphone to find the direction of a source of sound. The source of sound will be 900 Hz sine wave tone played somewhat close to the device. Each mbed will capture diferent phases which will be used to calculate the direction. This is run 10 times, which will be averaged then displayed on uLCD screen.
Program
It will take couple seconds for the Master mbed to finish initializing. Once ready, play a constant 900 Hz sine wave tone close to the mbed (e.g. from a phone) and press the button to start recording. Try to keep the source of sound stationary and elevated slightly so each microphone can hear directly from the source (instead of parts on the board in the way). Once it gets 10 valid values, it will undergo voting/averaging, then result will be displayed on uLCD screen, with red arrow being the middle, orange lines being 20 degrees away, and yellow lines being 45 degrees away from the average.
Wiring
Master Mbed | uLCD |
---|---|
p28 | tx |
p27 | rx |
p29 | rst |
gnd | gnd |
Master Mbed | Mic 1 |
---|---|
vout | vin |
gnd | gnd |
p20 | out |
Master mbed | Slave1 mbed |
---|---|
gnd | gnd |
p9 | p10 |
p10 | p9 |
Master mbed | Slave2 mbed |
---|---|
gnd | gnd |
p13 | p14 |
p14 | p13 |
Master Mbed | Pushbutton(active low) |
---|---|
p21 | 1 |
p22 | 2 |
p23 | 3 |
p24 | 4 |
Slave1 Mbed | Mic 2 |
---|---|
vout | vin |
gnd | gnd |
p20 | out |
Slave1 Mbed | Pushbutton(active low) |
---|---|
p21 | 1 |
p22 | 2 |
p23 | 3 |
Slave2 Mbed | Mic 3 |
---|---|
vout | vin |
gnd | gnd |
p20 | out |
Slave2 Mbed | Pushbutton(active low) |
---|---|
p21 | 1 |
p22 | 2 |
p23 | 3 |
Codes
Three mbeds each with a omnidirectional microphone are required for this project.
Code for Master
Import programECE4180Project--Master
Master mbed controller with dsp code
Code for Slave1
Import programECE4180Project--Slave1
4180 project mbed slave 1 controller
Code for Slave2
Angle of Arrival Estimator program was used to figure out the direction in which the sound comes from.
Import programAoA_estimator
Part of a program that estimates the direction of arrival of a signal
Future Work
There is still some work that could be done to make this project better. Below is a list of some ideas.
- better filter so that noise can be cancelled
- currently does not have a filter, not needed if the source of the sound is fairly close and loud
- sampling faster consistently
- communication betwen the master and slaves
- currently relies on wait statements to avoid collision, can get results much faster without wait statements
- incorporating another mbed for managing timing of start of recording between different slave mbeds recording
Please log in to post comments.