

Line follower
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.
✨ 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
| Component | Qty | Description |
|---|---|---|
| ESP32 DevKit (30-pin) | 1 | Dual-core microcontroller — reads the sensors and runs the control loop. |
| TB6612FNG motor driver | 1 | Dual H-bridge that drives both motors efficiently and cool. |
| N20 6V micro-gear motor + wheel | 2 | Provides drive; compact and quick. |
| Front caster wheel | 1 | Third contact point for smooth balance. |
| 10-channel reflective IR array | 1 | Senses the line; wide span covers changing track maps. |
| LM2596 buck module | 1 | Steps the 7.4 V battery down to a clean 5 V for the logic. |
| 2S Li-ion battery (7.4 V) | 1 | Main power source. |
| SPST switch | 1 | Master power cut-off. |
| Chassis, standoffs, wires, connectors | — | Frame and interconnections. |
⚙️ How It Works
- Read the IR array and compute a weighted line
error(outer sensors pull harder). - Intersections / acute turns (LSRB): left has priority, straight beats right, sharp turns snap.
- Line lost: spin toward the last known turn until the line is reacquired.
- PID steering:
correction = Kp·error + Kd·(error − lastError), applied differentially.
🛠️ Hardware Design
Schematic
PCB Layout
3D Model
💾 Firmware & Tuning
- Sketch →
firmware/line_follower.ino - Board: ESP32 Dev Module · Library: QTRSensors
| Variable | Default | Role |
|---|---|---|
Kp | 15 | Correction strength |
Kd | 30000 | Damping / overshoot control |
baseSpeed | 250 | Cruise speed (0–255) |
THRESHOLD | 4090 | Black/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| Qty | Value | Footprint | References |
|---|---|---|---|
| 2 | Conn_01x02_Pin | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | LEFT_MOTOR1, RIGHT_MOTOR1 |
| 1 | Conn_01x04_Pin | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MPT-0,5-4-2.54_1x04_P2.54mm_Horizontal | BUCK_LM2596 CONNECTOR |
| 1 | Conn_01x13_Pin | Connector_PinHeader_2.54mm:PinHeader_1x13_P2.54mm_Vertical | QTR_SENSOR1 |
| 1 | DEVKIT_V1_ESP32-WROOM-32 | DEVKIT_V1_ESP32-WROOM-32:MODULE_DEVKIT_V1_ESP32-WROOM-32 | ESP32 DEVKIT |
| 1 | LOGO | LOGO | G*** |
| 1 | SW_SPST | Button_Switch_THT:SW_DIP_SPSTx01_Slide_9.78x4.72mm_W7.62mm_P2.54mm | SWITCH |
| 1 | TB6612FNG | ROB-14450:MODULE_ROB-14450 | TB6612FNG |
| 1 | TestPoint_2Pole | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MPT-0,5-2-2.54_1x02_P2.54mm_Horizontal | TP1 |
Similar boards
- 2 layers103 × 30.5 mm

- 2 layers31.8 × 47.6 mm

- 2 layers24 × 27.3 mm

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 mm

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 mm

Learnoliver
hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!
9 parts915 - 2 layers17.4 × 16.9 mm

- 2 layers9.8 × 108 mm

- 2 layers

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).