Skip to the content
2 layers73 × 49.5 mmH Bridge Module, the printed circuit board in 3D

An autonomous and Bluetooth-controlled 4WD robot featuring a custom-designed H-Bridge motor driver, ultrasonic obstacle detection, and PID-based line tracking.

Size
73 × 49.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
24
Nets
37
Pads
99
Tracks, vias
177, 2
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
7 Jul 2026
Updated
8 Jul 2026

Overview

H Bridge Module is an open-source printed circuit board by tienvuongtri, from the tienvuongtri/Line-Following-Car-with-Custom-H-Bridge-Motor-Driver repository on GitHub. It is a 2-layer board of 73 × 49.5 mm with 24 parts on 37 nets, routed with 177 tracks and 2 vias.

It is built around the L298N and UF4007. Its parts include 9 diodes, 7 connectors, 2 capacitors, 2 ICs and 1 resistor. It belongs with the interfaces and adapters and robots and motor control boards of this library.

Main components

2

README

README.md

ESP32 Line-Following Robot with Custom H-Bridge

An autonomous and Bluetooth-controlled 4WD robot featuring a custom-designed H-Bridge motor driver, ultrasonic obstacle detection, and PID-based line tracking.

🛠️ Hardware Overview

  • Microcontroller: ESP32 Development Board
  • Motor Driver: Custom-designed L298N H-Bridge PCB
  • Line Sensor: 5-Channel IR Sensor Array (Active Low logic)
  • Obstacle Detection: HC-SR04 Ultrasonic Sensor
  • Actuators/Indicators: 4x DC Motors, Buzzer, LED Indicator
  • Communication: Bluetooth Classic (ESP32_PRO_CAR)

📍 Pin Mapping

ComponentESP32 PinComponentESP32 Pin
Motor ENAGPIO 14Sensor S1 (Far Left)GPIO 17
Motor ENBGPIO 32Sensor S2 (Mid Left)GPIO 19
Motor IN1GPIO 27Sensor S3 (Center)GPIO 4
Motor IN2GPIO 26Sensor S4 (Mid Right)GPIO 16
Motor IN3GPIO 25Sensor S5 (Far Right)GPIO 23
Motor IN4GPIO 33Ultrasonic TRIGGPIO 5
BuzzerGPIO 15Ultrasonic ECHOGPIO 18
LEDGPIO 2

📂 Project Structure

  • xe_do_line_IC2005_G1/: Arduino source code containing the PID algorithm, Bluetooth control logic, and sensor reading functions.
  • H-Bridge Module/: KiCad 9 hardware design files, including schematics, PCB layout, and Gerber files for manufacturing the custom motor driver.
  • images/: Real-world photos and 3D renderings of the hardware.

📸 Demonstration

Custom H-Bridge PCB Design:

PCB Layout 3D Front View Soldered PCB

Robot Assembly:

Car Front View Car Bottom View

⚙️ Features & Operation Modes

The system operates in two main modes, switchable via a custom Bluetooth serial application:

  1. Line Following Mode (Mode 1): Uses a PID control loop optimized with a dynamic time delta (dt) to track lines smoothly. Features pre-programmed intersection handling and step counting.
  2. Manual / Bluetooth Mode (Mode 2): Allows remote directional control with automatic forward obstacle detection (stops and alerts via buzzer/LED if an object is closer than 8 cm).

Parts

24
QtyValueFootprintReferences
8UF4007UF4007:DIOAD1036W78L470D235D1, D2, D3, D4, D5, D6, D7, D8
3Screw_Terminal_01x02TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_HorizontalJ2, J4, J8
2220uF/35VCapacitor_THT:CP_Radial_D8.0mm_P3.50mmC1, C2
2Conn_01x15_SocketConnector_PinSocket_2.54mm:PinSocket_1x15_P2.54mm_VerticalJ9, J10
11KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR1
1Conn_01x03_PinConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ6
1Conn_01x15_PinConnector_PinHeader_2.54mm:PinHeader_1x15_P2.54mm_VerticalJ1
1L298NL298N:TO127P2020X500X2100-15U1
1LEDLED_THT:LED_D5.0mmD9
1LM7805_TO220Package_TO_SOT_THT:TO-220-3_VerticalU2
1LOGOLogo:FPT_UniG***
1LOGOLogo:logo_G1G1
1SW_SPDTButton_Switch_THT:SW_Slide-03_Wuerth-WS-SLTV_10x2.5x6.4_P2.54mmSW1

Similar boards

  • 2 layers68 × 89 mmParanoiaBox, the printed circuit board in 3D

    ParanoiaBox

    profdc9/ParanoiaBox

    A standalone elliptic curve/AES file encryption and decryption device

    60 parts17
  • 2 layers96.3 × 98 mmAquarium, the printed circuit board in 3D

    Aquarium

    baranovskiykonstantin/aquarium

    Control the lighting and the heating of the aquarium.

    73 parts11
  • 2 layers100 × 70 mmMotorDriver, the printed circuit board in 3D

    MotorDriver

    JeyRunner/actonator

    3D printable robot actuator with belt-driven gearbox and custom FOC driver board.

    177 parts10MIT
  • 2 layers156.5 × 67.5 mmNixieScanDisplay, the printed circuit board in 3D

    NixieScanDisplay

    profdc9/NixieClock

    A Nixie clock that uses IN-14 tubes and very generic components that can be easily sourced.

    106 parts10
  • 4 layers147.8 × 77 mm2xBLDCPicoV3, the printed circuit board in 3D

    2xBLDCPicoV3

    AmericanRework/Pico-2x-BLDC

    One RP2040 Pico drives two brushless motors! SimpleFOC + Halls + 2304 drivers + TO-220 mosfets or IGBTs. Plugs directly into 450x automower motors.

    135 parts7
  • 2 layers373 × 132.3 mmSolarinverter, the printed circuit board in 3D

    Solarinverter

    cpipero/solarinverter

    Kicad Project to build a programmable Solar Inverter

    370 parts5CC0-1.0
  • 2 layers329.9 × 146.6 mmBabyHuey, the printed circuit board in 3D

    BabyHuey

    tristancollins/HiFi-BabyHuey

    An "Engineer's" Baby Huey EL34 PCB

    201 parts5
  • 2 layers30 × 100 mmMoskill, the printed circuit board in 3D

    Moskill

    telagod/moskill

    MosKill - Smart Mosquito Swatter with BLE, Kill Counting & Statistics | ESP32-C3 + KiCad PCB + UniApp

    95 parts2

Questions

How big is the H Bridge Module PCB?

It measures 73 × 49.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the H Bridge Module use?

24 parts, built around the L298N and UF4007. 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 H Bridge Module KiCad files?

From the tienvuongtri/Line-Following-Car-with-Custom-H-Bridge-Motor-Driver repository on GitHub, at the commit this page was made from: the board is H-Bridge Module/H-Bridge Module.kicad_pcb and its schematic H-Bridge Module/H-Bridge Module.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the H Bridge Module design in my own project?

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