2024
Obstacle-Avoiding Robot Car
Autonomous navigation with ultrasonic sensing and reactive control
ArduinoCUltrasonicMotor Control
Problem
Building a reliable foundation for autonomous navigation: the car had to detect obstacles in real time and make safe steering decisions without a computer or camera.
Solution
Implemented an obstacle-avoiding robot car using an Arduino, HC-SR04 ultrasonic sensors, and DC motors with an L298N driver. Logic runs entirely on the microcontroller with no external compute.
Process
- Hardware: 2WD chassis, front-mounted ultrasonic sensor, motor driver, and power distribution.
- Sensor fusion: multiple readings and filtering to reduce noise and false triggers.
- State machine: FORWARD, TURN_LEFT, TURN_RIGHT, BACK_UP with timing and thresholds.
- Tuning: threshold distances and turn durations for different speeds and environments.
- Documentation: build log and code repo for reproducibility.
Tech
- Arduino (C++)
- HC-SR04
- L298N
- DC Motors
- Breadboard prototyping
Outcomes
- •Consistent obstacle detection and avoidance in indoor and outdoor tests.
- •Clear separation of drive logic and sensor reading for easy behavior changes.
- •Served as base for later projects (line following, Bluetooth control).
Images
Top view of chassis and wiring
Ultrasonic sensor mounting and test run