← All projects

Mobile Robot

Developing an autonomous mobile robot to follow a curved path and avoid moving obstacles using infrared and ultrasonic sensors.

Overview

In a team of three, we built an Arduino-based differential-drive robot that followed a curved line and stopped for moving obstacles. We integrated three infrared sensors for line detection and an ultrasonic sensor for obstacle distance.

We tuned detection thresholds, steering commands, and line-recovery logic through course testing. The final robot completed the challenge in 26 seconds.

Sensor Integration

We characterized the infrared sensor responses and selected thresholds to distinguish the line from the surrounding surface.

The ultrasonic sensor provided an independent obstacle check. When an obstacle entered the detection range, the controller stopped both motors.

Control Algorithm

The controller adjusted the left and right motor speeds from the infrared readings. A centered reading commanded forward motion; side readings commanded differential steering, with stronger corrections for larger deviations.

The controller stored the side that most recently detected the line. If all three sensors lost it, that state determined the search direction.

We tuned thresholds and motor-speed differences on the course to balance recovery from large deviations with stable tracking.

Mobile robot navigating an obstacle course with sliding walls
Fig. 1Robot navigating obstacle course

Results

The robot followed the curved course and stopped for moving obstacles, completing the challenge in 26 seconds. Testing demonstrated the combined line-following, obstacle-stop, and line-recovery logic under the course conditions.

tools

ArduinoSensor Integration