Thread
:
[Request] Sonar
View Single Post
TiagoTiago
2010-11-25 , 17:00
Posts: 1,522 | Thanked: 392 times | Joined on Jul 2010 @ São Paulo, Brazil
#
1
I'm not sure about the processing power and time resolution, but in terms of geometry i know it should be possible to use the stereo speakers and the microphone on the N900 to acquire a 2 dimensional image from the surroundings by sonar.
It could work kinda like this: you emit a pulse of sound on the stereo speakers with a different frequency on each speaker, then you monitor the mic for the arival of the sound from the speaker and any subsequent echoes on the respective frequencies, with the time difference between the original sound and the echoes and the speed of sound in air you should be able to calculate the distance between whatever bounced the sound and each of the speakers, with those 2 distances its just a matter of simple trigonometry to calculate the 2d position of what the sound hit.
To make the image more interesting to see, you could also take in consideration how loud the echoes were, perhaps displaying the resulting image with a colored background and having any areas corresponding to echoes be on a grayscale representing the loudness, or perhaps have a black background and color the echoes mapping a color gradient to the ratio of the loudness between the left and right echoes (at one end it would be an echo pretty much only from the left speaker and on the other end from the right, with the middle for when both are equally loud).
If the framerate is fast enough, you don't even need to just do single pulses, use a pseudo-random number generator to pick the frequencies and then look for the spikes in the recorded sound for the frequencies in the order they came out; if t is really fast it might even sound close to white noise.
Btw, to help with environment interferences, it might be a good idea to analyze the environment noise for a little bit before starting and look for more silent frequency bands and avoid the noiser ones.
__________________
NOKIA
N900
:
IT'S OVER NINE THOUSAND
How to use HotspotShield in the N900
Google Voice from outside the US + Free international calls: LEARN HOW HERE!!!
Last edited by TiagoTiago; 2010-11-25 at
17:03
.
Quote & Reply
|
TiagoTiago
View Public Profile
Send a private message to TiagoTiago
Find all posts by TiagoTiago