Line-following robot birds eye view
← Back to Work GitHub →
Robotics · 2024

Line-Following Robot

Autonomous robot that follows a colored path through a maze using real-time color sensing and differential motor control.

Raspberry Pi Color Sensing Differential Drive PWM Motor Control Autonomous Navigation

This project involved designing an autonomous navigation system built around a color sensor. The goal was to create a robot capable of following a specific blue-colored line through a maze containing multiple lines of different colors — requiring the system to distinguish and track only the target path.

The hardware setup used two DC motors controlled via a Raspberry Pi's GPIO pins. All control logic was written in Python, handling motor speed, direction, and movement decisions based on detected color intensity values from a frequency-based RGB sensor.

A lightweight state system managed line tracking, crossroad detection, and directional correction — using closed-loop sensor feedback and PWM-based speed control to keep the robot on path in real time.

Hardware

  • Raspberry Pi
  • L298N Driver
  • DC Motors
  • Color Sensor

Design

  • Differential Drive
  • Sensor Mounting
  • CAD Modeling
  • Mechanical Assembly

Software

  • Python
  • GPIO Control
  • PWM Speed Control
  • State Logic
Previous Project ← OpenCV LINE FOLLOWER
Next Project SCISSOR LINKAGE →