Skip to the content
2 layers191 × 151 mmFollow The Line, the printed circuit board in 3D

This project is an example of how to use an Arduino board, QTR reflectance sensor, and a motor driver shield to create a simple follow-the-line robot.

Size
191 × 151 mm
Copper layers
2
Thickness
1.6 mm
Parts
23
Nets
40
Pads
111
Tracks, vias
400, 46
Pours
1
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
28 Mar 2023
Updated
20 Aug 2024

Overview

Follow The Line is an open-source printed circuit board by billtsol, from the billtsol/Follow-The-Line repository on GitHub. It is a 2-layer board of 191 × 151 mm with 23 parts on 40 nets, routed with 400 tracks and 46 vias.

It is built around the DRV8835DSS, L7805 and RB141C1100. Its parts include 8 connectors, 2 resistors, 2 ICs and 1 switch. It belongs with the robots and motor control boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

3

README

README.md

Arduino Follow-the-Line Project with QTR Reflectance Sensor

This project is an example of how to use an Arduino board, QTR reflectance sensor, and a motor driver shield to create a simple follow-the-line robot.

Requirements

To build this project, you will need the following components:

  • Arduino board
  • QTR reflectance sensor
  • Motor driver shield
  • Wheels
  • Motors
  • Jumper wires
  • Battery

Circuit Diagram

Circuit Diagram

PCB

PCB

Code

The code for this project is available in the follow_the_line.ino file. You can also open the qtr_xA_example.ino file that includes an example of how to use the QTR reflectance sensor as an analog sensor to detect the position of a line.

Installation

  1. Download the Arduino IDE from the official website and install it on your computer.
  2. Connect your Arduino board to your computer via USB cable.
  3. Open the Arduino IDE and open the follow_the_line.ino file.
  4. Upload the code to your Arduino board by clicking the "Upload" button in the IDE.

Usage

  1. Connect the QTR reflectance sensor and the motor driver shield to your Arduino board according to the circuit diagram.
  2. Attach the wheels and motors to the chassis.
  3. Connect the motors to the motor driver shield.
  4. Connect the battery to the motor driver shield.
  5. Turn on the power and place the robot on a black line on a white background.
  6. The robot will follow the line until it reaches the end of the line.

Troubleshooting

If the robot does not follow the line correctly, you may need to adjust the threshold values in the code or adjust the position of the QTR reflectance sensor.

Feature thoughts for this project:

  1. Add some LEDs to make the car follow the line in the dark: By adding some LEDs to the front of the robot, it can detect the line even in low light conditions. The LEDs can be programmed to turn on when the QTR sensor detects the line and turn off when it doesn't. This feature can improve the robot's performance in darker environments.

  2. Add some obstacle sensors to avoid objects in line: By adding some obstacle sensors to the sides of the robot, it can detect if there are any obstacles in its path and avoid them while staying on the line. This feature can improve the safety of the robot and prevent it from crashing into objects while following the line.

Final Images

final racing

Parts

23
QtyValueFootprintReferences
6, , , , ,
6Socket_02Connector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_VerticalJ1, J2, J3, J5, J6, J18
21kΩResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_HorizontalR1, R2
2SW_PushButton_Switch_THT:SW_PUSH_6mmA6, A7
1Arduino_Nano_EveryModule:Arduino_NanoA1
1Array Reflectance SensorQTRX-13RC:QTRX-13RCU2
1DRV8835Library:DRV8835MotorDriver1
1L7805Connector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_VerticalU3
1RB141C1100RB141C1100:SW_RB141C1100S1
1Screw_TerminalTerminalBlock_Phoenix:TerminalBlock_Phoenix_MPT-0,5-2-2.54_1x02_P2.54mm_HorizontalJ4
1Socket_04Connector_PinSocket_2.54mm:PinSocket_1x04_P2.54mm_VerticalJ9

Similar boards

  • 2 layers150 × 100 mmMaze kiCad, the printed circuit board in 3D

    Maze kiCad

    billtsol/Maze

    This project demonstrates how to use an Arduino board, IR sensors, and a motor driver shield to create a maze-solving robot.

    39 parts2
  • 2 layersRobot seg, the printed circuit board in 3D

    Robot seg

    benja47012/Robot-de-seguridad

    Robot de seguridad con diversas funciones, planteado con un protocolo I2C.

    48 parts
  • 4 layers97.6 × 108.3 mmProjet Velux, the printed circuit board in 3D

    Projet Velux

    louisonmalinge/Projet-Velux

    Dans ce Git, vous trouverez les fichiers ayant permis de réaliser le projet Velux, avec ses différentes versions.

    27 parts
  • 2 layersPlaca senores, the printed circuit board in 3D

    Placa senores

    Stefxyz/Robot-Explorador-Tabibito

    Robot explorador estilo Rover

    65 parts
  • 2 layers142 × 45 mmPower PCB, the printed circuit board in 3D

    Power PCB

    biomimetics/MRIRobot_PCB

    PC boards for MRI robogt control, specifically for STM32 motherboard

    64 parts2
  • 2 layers63.9 × 167.6 mmESP32-to ESP NOW Control, the printed circuit board in 3D

    ESP32-to ESP NOW Control

    Khoapham2004/ESP32-to-ESP-NOW-Control

    The second repository contains the hardware design of the robot. It is mostly based on the 2025 version, with updated sensors, the BTS signal removed from the previous design, and a PCB that primarily uses SMD…

    42 parts
  • 2 layers127 × 82.6 mmPacBot 2019-2020, the printed circuit board in 3D

    PacBot 2019-2020

    HarvardURC/Pacbot

    Repository for the Harvard Undergraduate Robotics Club's Pacbot team

    20 parts20

Questions

How big is the Follow The Line PCB?

It measures 191 × 151 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Follow The Line use?

23 parts, built around the DRV8835DSS, L7805 and RB141C1100. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Follow The Line KiCad files?

From the billtsol/Follow-The-Line repository on GitHub, at the commit this page was made from: the board is FollowTheLine_kiCad/FollowTheLine.kicad_pcb and its schematic FollowTheLine_kiCad/FollowTheLine.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Follow The Line design in my own project?

Its repository states no licence, so its author keeps all rights: ask billtsol before reusing the design.