text.skipToContent text.skipToNavigation

Ultrasonic Radar

Watch a cool radar slide across your computer screen like the old time war-movies! Use the simple ultrasonic sensor to measure distance in a rotating fashion across your workbench.

Use Arduino to make the radar and Processing GUI to display on your computer.

Resources can be downloaded here!
DistanceSerial Data

Bill of Materials

1XC4410arduino uno
1XC4482prototyping shield
1YM2758micro servo
1XC4442ultrasonic sensor
1WC6026socket-socket leads
1XC3850esp8266 prototyping shield
2HM34244 pin locking header
1HM34233 pin locking header

Software & Libraries

This project will need the Processing program to build the GUI. Download the program here:


System Overview

The overall system is easy enough to understand, there are only two main modules and a computer system.

The SERVO motor will turn the ultrasonic sensor around in a range of angles to achieve distances at those angles. That will then be fed back through the UNO into the computer system.

We use a XC4482 as a base for creating our servo/ultrasonic interface, as well as a smaller prototyping shield to provide a physical hardware mounting between the SERVO and ultrasonic sensor.

Servo Ultrasonic Module Assembly

To make the ultrasonic sensor fit on the servo easily, use the small XC3850 prototyping board as a base for the ultrasonic sensor.

Notice in the picture above there is a small hole drilled around the centre of the board. This is to allow the SERVO screw to fit in and mount the SERVO arm to the servo.

It's generally easier to drill this hole out first then solder the ultrasonic sensor into the board as shown.

Then it’s just a case of soldering wires to the four pins of the ultrasonic sensor, and hot-gluing one of the SERVO arms to the board so that it is attached to the SERVO.

We used wire-wrap wire ( WW4346 etc) for the small connections but you can use any wire that you have available. Make sure the wires don’t get in the way of the SERVO arm.

Take special consideration of what pins go where. You’ll need to be sure when you’re connecting the ultrasonic to the Arduino.

Shield Interface Module Assembly

The shield interface is pretty simple to understand, it simply connects the SERVO (3 pin) and ultrasonic (4 pin) to the Arduino.

We position the header connectors close to the edge of the board so that there's plenty of room for the cables to move.

On the underside, we just wire it so the SERVO control pin is A1 and the Ultrasonic pins are connected to pins 8 and 9. We also use a jumper wire from one header connector to the other to join up the VCC connections, and then join the GND connection to the GND on the Arduino.

Following this order makes sure the socket leads stay together and run neatly next to each other without tangling VCC/GND/DATA lines.


Attach the SERVO module to the SERVO and rotate to check it’s in the correct position. The SERVO is non-continuous, so you’ll have to check and reposition the ultrasonic sensor if you find that it can’t turn the the full range of motion.

Once it's in place and rotating at the desired range, screw it into the SERVO through the screw hole.

Position it where it needs to be and put the shield on top of the Arduino. Make sure the VCC is going to 5V on the Arduino, and GND is connected to ground, for both modules.Then connect to Arduino and load the code, you should be able to press upload and see the SERVO begin to rotate.


Once the radar is activated you only need to open up the processing IDE, load up the GUI code, and press run.

The Processing GUI will connect to the last Serial port on your computer, which should be the Arduino.

You won't be able to connect to the Arduino via Processing if you have the Arduino Serial Monitor or Serial Plotter open. Close these and try to run the Processing sketch again.

Future improvements

Do you have more ideas on how we can improve the radar? Submit a github issue and get collaborating!

Further reading

Please note, Jaycar does not support nor endorse any of the below links, nor offers any guarantee of their quality or suitability for your needs.