Ultrasonic Radar – Arduino project

Ultrasonic Radar; Multi-Point

This ultrasonic radar, or ultrasonic scanner – may be used for fun and learning Arduino code  (sketch) by changing parameters. As a bonus, there is Java program which uses Java code: Processing for various tasks and visualization tool. Very powerful tool (okay complicated at first, but anyone can learn how to make own code). Install it on your computer, and you may learn how to visualize data collected by various sensors attached to Arduino, or use it for whatsoever you want. It is free program, and working perfectly. An example of screenshot of Processing visualization is here:



Okay, image is not as good as Medical Ultrasound Scanner, but price is not as high as well (read: very, very expensive). 😀

Simple to make

This ultrasonic radar, in our case – image we get on the screen, we may call it “Sonogram”, or “Ultrasonogram” because it is more like medical ultrasonic scanner than military radar. More on wiki about this Sonogram. I am interested to get as much as possible points from the reflected ultrasonic waves at 41 kHz from HC-SR04 ultrasonic distance sensor. But, instead using “echo” pin, we will use analog output from amplified ultrasonic microphone. Milan-CAD:


Also, one detail of simple attachment between sensor and servo:


Just dab of hot-glue and job is done. If you change mind, you can “salvage” this servo for other experiments when ultrasound become boring (not so soon, I know myself). 😀

Not the best artist on drawing

Out there are many programs for drawing diagrams, but all are complicated and/or confusing. Spending lot of time figuring out how it works is not the pleasant experience. If someone has good skill to making better drawing, feel free to draw it and back to me, or publish as your own drawing. I will not ask for any copyright rights on drawing, but I will insist on holding title of “original idea”. 😀

Video example(now old version) of ultrasonic radar:

Arduino Ultrasonic Multi-Point Radar sketch (old, as is in the video above):

Processing sketch (old one; as in the video above):

New (and better) Arduino sketch for ultrasonic radar, some parts optimized:

Processing sketch for ultrasonic radar, cleaned (to some extent), and added more points (now 80 instead 40):

New, better look; 80 points, and “Military green” colors 😀


New video  example of improved program on Arduino and Processing:

Only one part is wrong due to electronic noise: “origin”, or center of rotation is always present. Tried “delay(2)”, or two milliseconds in the loop for reading analog data, but this gives distortion and whole screen looks like it will “sink” into this central part – because missing few point rows. Now, it looks okay. Maybe there are some room for further improvements, will see.

The reason of the central “ghost readings”:


Just after ultrasonic frequencies are off, amplifier still has some spike, which looks strange on the radar screen. But, this is not such big problem. Instead “blanking-out” at Arduino end, it is maybe better to do it at Processing end on your computer. For me, this is not issue at all.

Science and more

%d bloggers like this: