Skip to content
ThinkNMake — Don't just think. Make it.
IntermediateAges 8–16

Radar System

A mini radar that sweeps an ultrasonic sensor on a servo motor and shows nearby objects on a radar screen on your computer.

Project kit

$15.89

5 parts in one box

Unlocks the code, wiring and step-by-step guide.

Or get the kit

$42.29

ThinkNMake Maker Kit · 6 projects

Objective

To build a radar system that scans the area and displays the angle and distance of objects on a computer screen. What will you Learn: 1. Ultrasonic distance measurement 2. Servo motor control 3. Serial communication between Arduino and PC 4. Data visualization with Processing 5. How radar and sonar work 6. Arduino programming

How it works

The HC-SR04 sends an ultrasonic pulse from TRIG and measures how long the echo takes to return on ECHO. Distance (cm) = time x 0.034 / 2 The servo rotates one degree at a time and Arduino sends the data as angle,distance. over the serial port. Processing reads the data, draws the sweeping line and shows a red mark when an object is closer than 40 cm.

Components you'll need

ComponentQtyAvailabilityPrice
Jumper Wire Set (120 pcs)×1In stock$2.99
SG90 Micro Servo×1In stock$1.39
Arduino UNO R3 (compatible)×1In stock$5.19
HC-SR04 Ultrasonic Sensor×1In stock$1.19
Breadboard medium×1In stock$0.99
Bought one by one$11.75

All of these come in ThinkNMake Maker Kit.

Circuit & connections

The full wiring diagram and pin-by-pin connections.

Already bought it? Log in

Code

The complete, tested sketch (120 lines), ready to upload.

Already bought it? Log in

Step-by-step instructions

7 illustrated steps:

  1. 1STEP 1
  2. 2STEP 2
  3. 3STEP 3
  4. 4STEP 4
  5. 5STEP 5
  6. 6STEP 6
  7. 7STTEP 7
Already bought it? Log in

Troubleshooting

Fixes for the problems makers hit most often on this build.

Already bought it? Log in