Skip to content
← All projects

Hardware & Software

Collision Avoidance Robot

Collision avoidance robot on a clear two-wheel chassis, with an HC-SR04 ultrasonic sensor at the front

Project Overview

A simple robot that automatically stops when an obstacle is detected within 20cm.

System Specifications

An Arduino Uno R3 reads an HC-SR04 ultrasonic sensor and controls an L298N motor driver on a 2WD robot chassis, all powered by a 12V battery.

Components of Collision Avoidance Robot
ComponentQtyDetails
Microcontroller1Arduino Uno R3, processes sensor data and controls the motor driver
Motor driver1L298N, controls the speed and direction of the motors
Ultrasonic sensor1HC-SR04, detects obstacles and measures distance
Chassis12WD robot chassis, structural base and drive system
Power supply112V battery, powers the motors and electronics

System Logic and Operation

Logic

Stop/Go Logic

The HC-SR04 continuously measures the distance to objects in front of the robot. The Arduino drives both motors through the L298N, setting direction on four pins and speed on two PWM pins.

Operation

  1. Path Clear: The robot moves forward while the sensor keeps measuring.

  2. Obstacle Within 20cm: The Arduino signals the L298N motor driver to stop the motors. When the path is clear again, the robot resumes moving forward.

Scope and Limitations

Stop/go logic only, with no steering around obstacles. The detection range is capped at 20cm, and the single forward-facing sensor gives no peripheral detection.