Skip to the content
2 layers102.6 × 82 mmFun, the printed circuit board in 3D

Line Follower Robot powered by STM32F103C8T6 microcontroller, using TCRT5000 5-way sensors for line detection, HC-05 for Bluetooth communication, TB6612FNG motor driver, and N20 motors (1000 RPM). Implements PID control for precise line tracking and feedback. Features case 0 and case 1 logic to navigate predefined map patterns. Winner of Tire-d.

Size
102.6 × 82 mm
Copper layers
2
Thickness
1.6 mm
Parts
38
Nets
52
Pads
166
Tracks, vias
173, 14
Pours
6
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
15 Aug 2025
Updated
19 Aug 2025

Overview

Fun is an open-source printed circuit board by bonavirak, from the bonavirak/Line-Follower-Robot-Using-STM32F103C8T6-with-TCRT-5000 repository on GitHub, published under the MIT licence. It is a 2-layer board of 102.6 × 82 mm with 38 parts on 52 nets, routed with 173 tracks and 14 vias.

It is built around the ROB-14450. Its parts include 12 connectors, 4 capacitors, 4 resistors, 4 diodes and 2 ICs. It belongs with the robots and motor control and radio and wireless boards and the STM32 boards of this library.

Main components

1

README

README.md

Line Follower Robot with STM32F103C8T6 and TCRT5000

This Line Follower Robot, winner of Line Follwer Robot Competition 2025, was designed and developed by Bona Virak. The project uses an STM32F103C8T6 microcontroller, TCRT5000 5-way sensors, HC-05 Bluetooth module, TB6612FNG motor driver, and N20 motors (1000 RPM). It features two modes: Auto (PID-based line following with Case 0/Case 1 logic) and Manual (Bluetooth RC control via app).

Credits

  • Author: Bona Virak - Sole developer of the code, PCB design, and implementation.
  • Team: Tire-d - Acknowledged for participation in Line Follwer Robot Competition 2025, with minimal contributions.

Features

  • C-based firmware with PID control for auto mode line following.
  • Manual mode for Bluetooth RC car control via HC-05.
  • PCB design (schematics, Gerber files, BOM) optimized for STM32 integration.
  • Case-based navigation (Case 0 for straight paths, Case 1 for turns) in auto mode.

Setup

Hardware

  1. Components:
    • STM32F103C8T6 microcontroller
    • TCRT5000 5-way sensor array
    • HC-05 Bluetooth module
    • TB6612FNG motor driver
    • 2x N20 motors (1000 RPM)
    • Power supply (e.g., 11.1V LiPo battery)
  2. Schematic:
    • See schematic: Image
  3. Wiring:
  • Connect TCRT5000 Sensors to STM32:
    • Pins: PA0-PA4
  • Link HC-05 TX/RX to STM32:
    • USART1: PA9/PA10 (TX/RX)
  • Attach TB6612FNG PWM/GPIO Pins to STM32:
    • PWMA: PB7 (TIM4 CH2)
    • PWMB: PB6 (TIM4 CH1)
    • AI1: PB12
    • AI2: PB13
    • BI1: PB14
    • BI2: PB15
    • STBY: PB1
    • VCC: 3.3V
  • Add Servo to STM32:
    • PWM: PB4 (TIM3 CH1)
  • Wire N20 Motors to TB6612FNG Outputs:
    • Power: 11.1V LiPo
  • Refer to Detailed Pin Assignments:
    • Check out the epic diagram! Pin Assignments

Software

  1. Requirements:
    • STM32CubeIDE for compiling C code.
    • ST-Link/V2 for flashing.
    • Bluetooth RC app (e.g., "Bluetooth RC Controller" on Android) for manual mode.
  2. Steps:
  3. Auto Mode:
    • Test Case 0/Case 1 on sample map Image
  4. Manual Mode:
    • Pair HC-05 with Bluetooth RC app (default PIN: 1234 or 0000).
    • Use app to control motors (forward, backward, left, right).

Demo

Watch the robot in action:

  • Video: [Video demo will be added soon!]
  • Images: [Soon!]
  • Description: Auto mode uses PID control for line following (Case 0 for straight, Case 1 for turns). Manual mode allows RC car control via Bluetooth app, demonstrated in Line Follwer Robot Competition 2025 winning run.

License

Licensed under the MIT License. See LICENSE for details.

Parts

38
QtyValueFootprintReferences
4220Resistor_SMD:R_0603_1608MetricR2, R3, R4, R5
4LEDLED_THT:LED_D3.0mmD2, D3, D4, D5
4MountingHoleMountingHole:MountingHole_3.5mm_Pad_ViaH1, H2, H3, H4
20.1uFCapacitor_SMD:C_0603_1608MetricC1, C3
210uFCapacitor_SMD:C_0603_1608MetricC2, C4
2VIN+Connector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_VerticalJ6, J10
2VIN-Connector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_VerticalJ8, J11
2VOUT+Connector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_VerticalJ7, J12
2VOUT-Connector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_VerticalJ9, J13
2~Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalServo1, Servo2
1Conn_01x06_FemaleConnector_PinSocket_2.54mm:PinSocket_1x06_P2.54mm_VerticalHC1
1Conn_01x07_FemaleConnector_PinSocket_2.54mm:PinSocket_1x07_P2.54mm_VerticalTCRT1
1LOGOLogo:flag cambodia 16G***
1Left_MotorDriverMotor:TerminalBlock_Phoenix_MKDS-1,5-2_1x02_P5.00mm_Horizontal-(Large)J2
1ROB-14450DriverMotor:MODULE_ROB-14450U1
1Right_MotorDriverMotor:TerminalBlock_Phoenix_MKDS-1,5-2_1x02_P5.00mm_Horizontal-(Large)J3
1SW_SPDTDriverMotor:Switch 3PinsSW2
1SW_SPSTConnector_BarrelJack:BarrelJack_SwitchcraftConxall_RAPC10U_HorizontalSW1
1Screw_Terminal_01x02Connector_AMASS:AMASS_XT60-M_1x02_P7.20mm_VerticalJ1
1ULTRASONICConnector_PinSocket_2.54mm:PinSocket_1x04_P2.54mm_VerticalJ4
1ZC323000STM32F103C8T6:STM32F103C8T6U2

The 37 most common of 38 parts.

More from bonavirak/Line-Follower-Robot-Using-STM32F103C8T6-with-TCRT-5000

1
  • 2 layers79.5 × 64.5 mmFun, the printed circuit board in 3D

    Fun

    bonavirak/Line-Follower-Robot-Using-STM32F103C8T6-with-TCRT-5000

    Line Follower Robot powered by STM32F103C8T6 microcontroller, using TCRT5000 5-way sensors for line detection, HC-05 for Bluetooth communication, TB6612FNG motor driver, and N20 motors (1000 RPM).

    24 parts11MIT

Similar boards

  • 2 layers120 × 100 mmRoot, the printed circuit board in 3D

    Root

    GonzaCerv/noah-hardware

    This repo contains all the hardware description for the Noah project. Here lies 3D models, electronics PCB and Firmware software of the robot.

    127 parts28MIT
  • 2 layers42 × 42 mmControllerBoardSingle v1, the printed circuit board in 3D

    ControllerBoardSingle v1

    0x23/BallJointEmbossingMachine

    A motorized linear embossing machine designed to precisely press ball joints. It was designed to automate the production of balljoint linkages for the Open-Micro-Manipulator.

    20 parts9MIT
  • 2 layers90 × 102 mmPL Toon, the printed circuit board in 3D

    PL Toon

    pl-toon/pl-toon-codes

    PL-TOON material

    39 parts7
  • 4 layers156.8 × 127 mmPayload PCB v3.1, the printed circuit board in 3D

    Payload PCB v3.1

    team-mountaineers-urc-2023/electronics

    Block diagrams, schematics, and PCB files related to the electronics subteam

    197 parts2BSD-3-Clause
  • 2 layers75.6 × 50.2 mmAutónomo, the printed circuit board in 3D

    Autónomo

    lionfer51/SkillBots

    Repositorio oficial de SkillBots (RAS-UNFV)

    20 parts1
  • 2 layers87.2 × 93.9 mmWRO RevA, the printed circuit board in 3D

    WRO RevA

    Nakashima26/WRO_FE_2026_FoxRobotics

    CETYS Mexicali WRO2026 FoxRobotics Team

    26 parts1MIT
  • 2 layers90 × 75 mmLFR PCB, the printed circuit board in 3D

    LFR PCB

    souptik-samanta/linefollower

    30 parts1

Questions

How big is the Fun PCB?

It measures 102.6 × 82 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Fun use?

38 parts, built around the ROB-14450. 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 Fun KiCad files?

From the bonavirak/Line-Follower-Robot-Using-STM32F103C8T6-with-TCRT-5000 repository on GitHub, at the commit this page was made from: the board is LineFollowerPCB/fun/fun.kicad_pcb and its schematic LineFollowerPCB/fun/fun.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Fun 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).