Hardware & Software
Collision Avoidance Robot

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.
| Component | Qty | Details |
|---|---|---|
| Microcontroller | 1 | Arduino Uno R3, processes sensor data and controls the motor driver |
| Motor driver | 1 | L298N, controls the speed and direction of the motors |
| Ultrasonic sensor | 1 | HC-SR04, detects obstacles and measures distance |
| Chassis | 1 | 2WD robot chassis, structural base and drive system |
| Power supply | 1 | 12V 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
Path Clear: The robot moves forward while the sensor keeps measuring.
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.