How do you build an arduino radar?
Hi Everyone,
I saw on youtube that you can make an arduino radar using a ping ultrasonic sensor, an arduino, and a processing sketch. I have successfully gotten the ping sensor to rotate (180 degrees) on a servo and report the distance to the computer via the serial monitor but I need help converting it to a radar interface using processing. Can anyone help me write a processing sketch that would do it.
Thanks in advance,
Mr_E
8
answers
|
Answer it!
|
I don't know how to do it with Processing, but that's relatively straightforward graphics programming.
Rotate the sensor to a known angle.
Knowing angle, you can calculate the "sweep" line to draw on the screen. This has the side effect of overwriting the previous distance at that angle.
Ping to get range.
Knowing range, you can calculate where on the line the reflection should be (based on whatever distance scaling factor you're using) -- standard polar-to-cartesian conversion.
Remove the line. The removal has the side effect of erasing the previous distance at that angle.
Draw the point representing the reflection.
Rotate sensor to the next angle and repeat.
You can make it fancier, but that's the essence of what's happening in the video.
Thanks anyways,
Mr_E
Now the micro may be too slow to be able to measure the speed of sound
time of flight.
Different sound frequencies reflect better off different materials
( wood, cushions metal wire fence, animals etc.).
The longer a pulse takes to return, the further away the target must be and
the weaker the reflected sound ( inverse square law ). So you must steadily
increase the gain of your microphone amplifier as time of response grows.
Try Parallax.COM for an audio model that does the chirp and listens returning
a binary number for distance 3' to 25'...
A
(http://www.youtube.com/watch?v=sfBOC980KYA)
Thanks,
Mr_E
This one does not have the range some of nine do.
You can explore the site yourself.......... A
![]() |
































