Skip to content
ThinkNMake — Don't just think. Make it.
BeginnerAges 11–15 2 h 30 min

Obstacle Avoiding Rover

A rover that scans ahead with an ultrasonic sensor and steers around anything in its way.

Project kit

$28.59

9 parts in one box

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

Or get the kit

$16.19

Robo Obstacle Kit · 2 projects

Objective

Build a rover that drives forward and autonomously avoids obstacles closer than 20 cm.

How it works

The HC-SR04 sends an ultrasonic ping and measures the echo time to compute distance. When something is close, the servo turns the sensor left and right, the Arduino compares both distances and turns toward the clearer side.

Components you'll need

ComponentQtyAvailabilityPrice
Arduino UNO R3 (compatible)×1In stock$5.19
HC-SR04 Ultrasonic Sensor×1In stock$1.19
SG90 Micro Servo×1In stock$1.39
Bo Motor×2In stock$2.18
L298N Dual Motor Driver×1In stock$2.29
2WD Acrylic Robot Chassis×1In stock$2.99
4×AA Battery Holder with Switch×1In stock$0.59
Jumper Wire Set (120 pcs)×1In stock$2.99
Bought one by one$18.81

All of these come in Robo Obstacle Kit and ThinkNMake Maker Kit.

Circuit & connections

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

Already bought it? Log in

Code

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

Already bought it? Log in

Step-by-step instructions

4 illustrated steps:

  1. 1Build the base
  2. 2Mount the turret
  3. 3Wire it up
  4. 4Upload & test
Already bought it? Log in

Troubleshooting

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

Already bought it? Log in