Skip to the content
2 layers95.5 × 84.7 mmLine Follower, the printed circuit board in 3D

An ESP32-powered autonomous line follower built on a purpose-designed PCB featuring structured power zoning, transient protection, analog sensor acquisition, and efficient motor driving via the TB6612FNG

Size
95.5 × 84.7 mm
Copper layers
2
Thickness
1.6 mm
Parts
23
Nets
44
Pads
103
Tracks, vias
120, 3
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
7 Feb 2026
Updated
14 Mar 2026

Overview

Line Follower is an open-source printed circuit board by lalithk06, from the lalithk06/PID-Line-Follower repository on GitHub. It is a 2-layer board of 95.5 × 84.7 mm with 23 parts on 44 nets, routed with 120 tracks and 3 vias.

It is built around the ESP32-DEVKITC-VE. Its parts include 4 connectors, 3 resistors, 3 ICs, 3 switches and 2 capacitors. It belongs with the robots and motor control boards and the ESP32 boards of this library.

Main components

1

README

README.md

🤖 ESP32 Line Follower Robot — Hardware Design

A compact and efficient line follower robot built using the ESP32

Demo

This project showcases the schematic and PCB design of a reliable line follower robot capable of high-speed tracking with stable power delivery and clean motor control. It is designed as a practical exploration of real-world embedded hardware development and PCB design workflows.


📂 Repository Structure

text
PID-Line-Follower
│
├── Firmware
│   └── Arduino_Code
│
├── Hardware
│   ├── Images
│   ├── Schematic
│   ├── Datasheet
│   └── Pin_Mapping
│
├── README.md
└── .gitignore

Working Principle

  • The ESP32 DevKit (38-pin) acts as the main controller.
  • An 8-channel IR sensor array detects the line:
    • 6 sensors operate in analog mode for precise position tracking.
    • 2 sensors operate in digital mode for edge detection.
  • The TB6612FNG motor driver controls two DC motors with efficient PWM-based speed regulation.
  • A LM2596 buck converter steps down the battery voltage to provide a stable 3.3V rail for the ESP32 and logic circuitry.
  • Two push buttons allow:
    • Calibration mode – tune sensor thresholds.
    • Mode selection – switch between operating behaviors.
  • Decoupling capacitors and a ground plane ensure noise reduction and power stability.

🎯 Objective

To design and develop a robust hardware platform for a line follower robot that demonstrates:

  • Proper power architecture
  • Motor driver integration
  • Mixed analog/digital sensing
  • Clean PCB layout practices
  • Expandable embedded design

Hardware Overview

No.ComponentRole
1ESP32 DevKit (38-pin)Main microcontroller with Wi-Fi & BLE
2TB6612FNGDual motor driver
3LM2596 Buck ConverterEfficient voltage regulation
4IR Sensor Array (8-channel)Line detection
5Push Buttons (2x)Calibration & mode selection
6Battery Input + Slide SwitchPower control
7CapacitorsFiltering & decoupling
8Mounting HolesMechanical stability

Power Architecture

Battery → Slide Switch → LM2596 Buck → 3.3V Rail

Design considerations:

✅ Wide power traces for motor current
✅ Dedicated ground plane
✅ Local decoupling near driver and ESP32
✅ Separate motor and logic routing where possible


Firmware

The robot firmware is written for the ESP32 using the Arduino framework.

Key features of the control software:

• Multi-sensor line detection
• Adaptive speed control
• PID-based steering correction
• Calibration routines for sensor tuning

Firmware source code is available in the Firmware directory.


📷 Preview

🖼️ Schematic

Schematic

📐 PCB Layout

PCB

🧊 3D View

3D


Key Features

✅ Stable buck-regulated power supply
✅ High-efficiency TB6612FNG motor control
✅ Mixed analog + digital sensor interface
✅ Compact 2-layer PCB
✅ Ground plane for noise reduction
✅ Designed following practical PCB routing guidelines


Design Notes

  • Motor traces are sized to handle higher current.
  • Ground return paths are optimized using copper pour.
  • Mounting holes are included for chassis integration.
  • Connectors are placed for easy wiring and maintenance.

Future Improvements

  • PID tuning for smoother tracking
  • Encoder-based speed feedback
  • Bluetooth / Wi-Fi telemetry
  • Battery voltage monitoring
  • On-board charging circuit
  • Custom buck stage instead of module
  • Fully integrated motor + sensor board

📚 Learning Outcomes

This project helped strengthen understanding of:

  • Power electronics in embedded systems
  • PCB stackup and routing
  • Grounding strategies
  • Motor driver layout considerations
  • Hardware debugging practices

Parts

23
QtyValueFootprintReferences
4MountingHoleMountingHole:MountingHole_3.2mm_M3H1, H2, H3, H4
2100nFCapacitors:C320CC5, C8
210KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR13, R14
1220Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR2
18-Channel IR ArrayConnector_PinHeader_2.54mm:PinHeader_1x10_P2.54mm_VerticalJ11
1Battery terminalScrew Terminal:CUI_TB007-508-02BEJ1
1CalibrationButton_Switch_THT:SW_PUSH_6mmSW6
1ESP32-DEVKITCESP-WROOM:MODULE_ESP32-DEVKITCU1
1LED_3V3LED_THT:LED_D5.0mmD2
1LM2596 Buck ConverterBuck_Converter:LM2596_Buck_ModuleU2
1LOGOOP:OPG***
1ModeButton_Switch_THT:SW_PUSH_6mmSW3
1Motor_AScrew Terminal:CUI_TB007-508-02BEJ9
1Motor_BScrew Terminal:CUI_TB007-508-02BEJ10
1Slide SwitchButton_Switch_THT:SW_Slide-03_Wuerth-WS-SLTV_10x2.5x6.4_P2.54mmSW1
1TB6612FNG_MDTB6612FNG:TB6612FNG_DriverU3
1TP_GNDTestPoint:TestPoint_Pad_2.0x2.0mmTP2
1TP_VBATTestPoint:TestPoint_Pad_2.0x2.0mmTP1

Similar boards

  • 2 layers103.8 × 50 mmGalagino pcb set, the printed circuit board in 3D

    Galagino pcb set

    harbaum/galagino

    A Galaga, Pac-Man and Donkey Kong arcade emulator for the ESP32

    26 parts558
  • 2 layers115 × 75 mmSpinCoater, the printed circuit board in 3D

    SpinCoater

    RParkerE/OpenSilicon

    OpenSilicon enables DIY semiconductor fabrication with open-source guides for building IC equipment at home. The project includes BOMs, 3D files, firmware, and PDKs, supporting makers and researchers in chip fabrication.

    11 parts55GPL-3.0
  • 2 layers127.3 × 54.1 mmESP32 SolarBox, the printed circuit board in 3D

    ESP32 SolarBox

    cole8888/SRNE-Solar-Charge-Controller-Monitor

    Read data from SRNE solar charge controllers.

    34 parts42
  • 2 layers62.2 × 57.1 mmWs2mqtt, the printed circuit board in 3D

    Ws2mqtt

    Tho85/ws2mqtt

    Connect WiSafe2 devices to Home Assistant

    8 parts28BSD-3-Clause
  • 2 layers99.9 × 99.9 mmSplit flap, the printed circuit board in 3D

    Split flap

    tinkermax/split-flap

    DIY mechanical spli-flap display

    28 parts13CC-BY-4.0
  • 2 layersJF ECU32, the printed circuit board in 3D

    JF ECU32

    JoachimF/JF-ECU32

    RC Jet Engine ECU

    27 parts12GPL-3.0
  • 2 layers72.5 × 84.8 mmDevboard, the printed circuit board in 3D

    Devboard

    ste2425/PSP-Bluetooth-AVConnector

    An AV-Out Breakout library for the PSP. Providing Kicad symbols and footprints to interface with the PSP 2/3K AVOut socket (also known as the TVOut socket)

    13 parts12
  • 2 layers100 × 88.9 mmGen2, the printed circuit board in 3D

    Gen2

    Alignof/Juggernaut

    疑似時限爆弾解除競技

    41 parts10MIT

Questions

How big is the Line Follower PCB?

It measures 95.5 × 84.7 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Line Follower use?

23 parts, built around the ESP32-DEVKITC-VE. 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 lalithk06/PID-Line-Follower repository on GitHub, at the commit this page was made from: the board is Hardware/Line_Follower/Line_Follower.kicad_pcb and its schematic Hardware/Line_Follower/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 states no licence, so its author keeps all rights: ask lalithk06 before reusing the design.