Skip to the content
2 layers90.5 × 77.5 mmLine follower, the printed circuit board in 3D

High-speed line follower robot built with ESP32, QTR sensors, and PID control.

Size
90.5 × 77.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
9
Nets
35
Pads
77
Tracks, vias
253, 56
Pours
1
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
7 Jun 2026
Updated
7 Jun 2026

Overview

Line follower is an open-source printed circuit board by Moreshwar-R, from the Moreshwar-R/VECTRA-Line-Follower repository on GitHub, published under the MIT licence. It is a 2-layer board of 90.5 × 77.5 mm with 9 parts on 35 nets, routed with 253 tracks and 56 vias.

It belongs with the ESP32 boards of this library.

README

README.md

🏁 VECTRA — Line Follower Robot

ESP32 · TB6612FNG · 10-channel IR array · LSRB intersection logic + Anti-Wobble PID

VECTRA is a high-speed competition line follower designed to stay locked on the track even when the layout changes from one event to the next. A wide 10-channel IR array reads sharp turns, acute angles and intersections, while decisive LSRB logic layered over a tuned PID controller keeps every junction predictable. Built around an ESP32 and a TB6612FNG driver, it balances speed, stability and fast trackside tuning.

VECTRA line follower robot
VECTRA run demo

✨ Features

  • Wide 10-sensor coverage — handles different track layouts without re-wiring.
  • LSRB intersection logic — Left > Straight > Right priority at junctions.
  • Anti-wobble PID — dead-band stops shivering on straights, saving time.
  • Line-lost recovery — remembers last turn direction and sweeps back to the line.
  • Efficient drive — TB6612FNG H-bridge with N20 micro-gear motors.

🧩 Components

ComponentQtyDescription
ESP32 DevKit (30-pin)1Dual-core microcontroller — reads the sensors and runs the control loop.
TB6612FNG motor driver1Dual H-bridge that drives both motors efficiently and cool.
N20 6V micro-gear motor + wheel2Provides drive; compact and quick.
Front caster wheel1Third contact point for smooth balance.
10-channel reflective IR array1Senses the line; wide span covers changing track maps.
LM2596 buck module1Steps the 7.4 V battery down to a clean 5 V for the logic.
2S Li-ion battery (7.4 V)1Main power source.
SPST switch1Master power cut-off.
Chassis, standoffs, wires, connectors—Frame and interconnections.

⚙️ How It Works

  1. Read the IR array and compute a weighted line error (outer sensors pull harder).
  2. Intersections / acute turns (LSRB): left has priority, straight beats right, sharp turns snap.
  3. Line lost: spin toward the last known turn until the line is reacquired.
  4. PID steering: correction = Kp·error + Kd·(error − lastError), applied differentially.

🛠️ Hardware Design

Schematic

Schematic

PCB Layout

PCB layout

3D Model

3D model

💾 Firmware & Tuning

VariableDefaultRole
Kp15Correction strength
Kd30000Damping / overshoot control
baseSpeed250Cruise speed (0–255)
THRESHOLD4090Black/white cutoff (recalibrate per track)

📜 License

  • Released under the MIT License — see LICENSE.
  • Free to use, fork and race.

🏷️ Topics

#LineFollower #ESP32 #TB6612FNG #PID #LSRB #Robotics #Arduino #Embedded #KiCad

Parts

9
QtyValueFootprintReferences
2Conn_01x02_PinConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalLEFT_MOTOR1, RIGHT_MOTOR1
1Conn_01x04_PinTerminalBlock_Phoenix:TerminalBlock_Phoenix_MPT-0,5-4-2.54_1x04_P2.54mm_HorizontalBUCK_LM2596 CONNECTOR
1Conn_01x13_PinConnector_PinHeader_2.54mm:PinHeader_1x13_P2.54mm_VerticalQTR_SENSOR1
1DEVKIT_V1_ESP32-WROOM-32DEVKIT_V1_ESP32-WROOM-32:MODULE_DEVKIT_V1_ESP32-WROOM-32ESP32 DEVKIT
1LOGOLOGOG***
1SW_SPSTButton_Switch_THT:SW_DIP_SPSTx01_Slide_9.78x4.72mm_W7.62mm_P2.54mmSWITCH
1TB6612FNGROB-14450:MODULE_ROB-14450TB6612FNG
1TestPoint_2PoleTerminalBlock_Phoenix:TerminalBlock_Phoenix_MPT-0,5-2-2.54_1x02_P2.54mm_HorizontalTP1

Similar boards

  • 2 layers103 × 30.5 mmTS Back Endcap, the printed circuit board in 3D

    TS Back Endcap

    EEVengers/ThunderScope

    ThunderScope GitHub Repo

    9 parts1.3kMIT
  • 2 layers31.8 × 47.6 mmNGC 38 connector, the printed circuit board in 3D

    NGC 38 connector

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    9 parts1.2k
  • 2 layers24 × 27.3 mmExpansion Card Retrofit, the printed circuit board in 3D

    Expansion Card Retrofit

    FrameworkComputer/ExpansionCards

    Reference designs and documentation to create Expansion Cards for the Framework Laptop

    9 parts1.1kCC-BY-4.0
  • 2 layers15.6 × 17.3 mmSKR Mini TFT Thermistor Board, the printed circuit board in 3D

    SKR Mini TFT Thermistor Board

    VoronDesign/Voron-Hardware

    Cool Hardware designed by the Voron Design group

    9 parts1.1kGPL-3.0
  • 2 layers39.1 × 49.5 mmLearnoliver, the printed circuit board in 3D

    Learnoliver

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    9 parts915
  • 2 layers17.4 × 16.9 mmToolhead, the printed circuit board in 3D

    Toolhead

    tanaes/whopping_Voron_mods

    9 parts787GPL-3.0
  • 2 layers9.8 × 108 mmExpander, the printed circuit board in 3D

    Expander

    wntrblm/Castor_and_Pollux

    A Juno-inspired dual oscillator

    9 parts587
  • 2 layersKeyboard after, the printed circuit board in 3D

    Keyboard after

    adamws/kicad-kbplacer

    KiCad plugin for automatic keyboard's key placement and routing

    9 parts547GPL-3.0

Questions

How big is the Line follower PCB?

It measures 90.5 × 77.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Line follower use?

9 parts. 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 Line follower KiCad files?

From the Moreshwar-R/VECTRA-Line-Follower repository on GitHub, at the commit this page was made from: the board is hardware/line_follower.kicad_pcb and its schematic hardware/line_follower.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Line follower design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).