loading

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

sort by: active | newest | oldest
orksecurity5 years ago
OK, I misunderstood the question. You just want to render the results on screen?

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.
Mr_Electric (author)  orksecurity5 years ago
I asked the same question in the arduino forums and was directed to a site that has instructions on building an ultrasonic radar screen with an arduino. The only problem with that was the tutorial used another rangefinder. Right now I'm trying to modify the code to fit the ping)))
orksecurity5 years ago
Can't tell you how to do it in Processing, but essentially you need to accurately -- or at least stably -- measure the time between when the ping goes out and when the echo comes back.
Does the first item under Related at right ("DIY Arduino Radar") help you at all?
Mr_Electric (author)  orksecurity5 years ago
I checked that out first, but it has instructions on how to do it with a different ultrasonic sensor and the wire library

Thanks anyways,
Mr_E
iceng5 years ago
You generate a pulse of sound energy like a speaker to a reflective target at the speed of sound. A tiny portion of that energy reflects back to a microphone also at the speed of sound.

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

Mr_Electric (author)  iceng5 years ago
Actually I thought it would be possible to accomplish this task by using only an arduino, servo, ping))), and processing sketch. If you check on youtube (see the link posted below) there are many examples. I just need a processing sketch that would convert the serial values (x-inches, x-centimeters) to a graphical display.
(http://www.youtube.com/watch?v=sfBOC980KYA)

Thanks,
Mr_E
iceng5 years ago
Here is a link for you...
This one does not have the range some of nine do.
You can explore the site yourself..........   A
ultrasonic.jpg