ANTHONY NISTOR // LINE FOLLOWER

Stackr Line Follower

A front add-on for Stackr. Five reflective sensors on a custom board read a black line, and the robot steers to stay on it.

// SYSTEM ARCHITECTURE

About the Project

Line follower is one of the most typical robotic applications. I custom designed and built an infrared sensor bar using five QRE1113 modules. This is an add-on for the Stackr robot. It is designed to explore classic line-following strategies and serve as an accessible introduction to PID control algorithms. It's also a fun project that can be expanded to solve very complex tracks.

  • Five Reflective Sensors A custom PCB was designed to host five QRE1113GR sensors in a row. Each one can detect whether the floor under is the black line or the white surface.
  • Printed Front Mount To host the sensors a 3D printed front mount was designed in such a way to eliminate influence from the ambient light.
  • PID Controller At the heart of the software controlling the motors is a PID controller that adjusts motor speeds to keep the robot on the line.
// CHALLENGES

Challenges

ISSUE SOLUTION
Robot was picking up undesired reflections Modified the sensor housing to isolate better the sensors by lowering the mount and using narrow gaps for sensors.
The robot was losing the line Adjusted the PID coefficients for a better tracking.
// LINE RUN

Following the Oval

Stackr with the sensor bar on a black oval drawn on a white surface.

LINE_RUN.MP4 LIVE DEMO

On the Line

The add-on rides at the front while Stackr follows the black oval.

// HARDWARE & SOFTWARE

System Component Breakdown

01

Sensor Board

A custom PCB was designed to incorporate 5 reflective optical sensors. The board was made to fit the dimensions of the Stackr Robot.

02

Housing

Housing for the sensor was designed in such a way to eliminate ambient light as a factor in line detection.

03

Software

As one of the most typical robotics application, the core algorithm at the heart of this project is a PID controller.

04

Stackr

The Line follower is provided as an add-on to the Stackr Robot. The software and control is done through the Stackr MCU.

// PROJECT MEDIA

Build Pictures

The bar on Stackr, the sensor board, the printed parts, and the CAD and KiCAD drawings.

CAD Design
CLICK TO ENLARGE

CAD Design

FreeCAD exploded view of Stackr plus the purple sensor bar and brackets.

Electronics Design
CLICK TO ENLARGE

Electronics Design

Schematic of five QRE1113 sensors and their resistors.

PCB Design
CLICK TO ENLARGE

PCB Design

KiCad board for the five-sensor line follower, marked RobotiXOne.

Electronics
CLICK TO ENLARGE

Electronics

Populated blue sensor PCB with five reflective sensors and a header.

3D Printed Parts
CLICK TO ENLARGE

3D Printed Parts

Purple brackets, sensor housing, and lid.

Assembled Robot
CLICK TO ENLARGE

Assembled Robot

Purple sensor bar mounted on the front of Stackr, with a ribbon cable to the Nano.

Robot Testing
CLICK TO ENLARGE

Robot Testing

Stackr on a black oval line with the sensor bar down.

// SLIDESHOW

All Project Pictures

27 photographs and drawings from this build.

20260413_110255.jpg 1 / 27
20260413_110255.jpg
// TECHNICAL SPECIFICATIONS

System Parameters

PARAMETER SPECIFICATION / VALUE
Special Design Electronics
Special Design PCB Design
Optical Sensors 5 x QRE1113
CAD Software FreeCAD
Manufacturing 3D Printing
Algorithms PID controller
Special Features Fully autonomous