Introduction
One of my goals is to be able to locate the robot using trilateration. I plan to do this using a few stationary microphones and speaker and radio transceivers. The Raspberry Pi with Arduino will send out a radio signal to the robot which outputs a sound. The sound is collected using a number of stationary microphone. Difference in sound arrival time can then be used to calculate a relative position of the robot.
CC Wikipedia Trilateration |
3K Hz sampling of sound |
The robot beeps using Arduino tone command. |
1Khz from robot buzzer, really close to the microphone. |
The wave looks 55 pixels wide. The screen show 84 pixels of the 255 samples taken
4600 Microseconds for 255 samples.
0.0046s / 255 = 1.8e-5 s for one sample
9,9e-4 s for 55 samples = 1010 Hz!
So we can sample the robots wave, even if it does look a bit chopped up compared to when I whistle (sin wave). I guess that is since it is generated as a square wave using the tone command.
The tone command:
"Generates a square wave of the specified frequency" - Arduino Toneok next step is to detect the frequency by code. Judging from the look of the wave I think I will try to sample hills somehow...
http://interface.khm.de/index.php/lab/experiments/frequency-measurement-library/
ReplyDeletehttp://www.electrokit.com/productFile/download/918
ReplyDeletehttp://www.scary-terry.com/more_stuff/tonedet/tonedet.htm
ReplyDeletehttp://arduino.cc/forum/index.php?topic=111075.0
ReplyDeletehttp://en.wikipedia.org/wiki/Goertzel_algorithm
ReplyDeletehttps://github.com/jacobrosenthal/Goertzel
ReplyDelete