Portfolio
← Projects

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

  1. Hardware: 2WD chassis, front-mounted ultrasonic sensor, motor driver, and power distribution.
  2. Sensor fusion: multiple readings and filtering to reduce noise and false triggers.
  3. State machine: FORWARD, TURN_LEFT, TURN_RIGHT, BACK_UP with timing and thresholds.
  4. Tuning: threshold distances and turn durations for different speeds and environments.
  5. 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
Top view of chassis and wiring
Ultrasonic sensor mounting and test run
Ultrasonic sensor mounting and test run