Skip to the content
2 layers92.3 × 86.2 mmAutonomous Rover Kicad, the printed circuit board in 3D

Autonomous Rover Kicad

lxdinh/Autonomous-Rover

Autonomous navigation rover featuring ESP32-S3 carrier board and I2C/SPI sensor integration

Size
92.3 × 86.2 mm
Copper layers
2
Thickness
1.6 mm
Parts
9
Nets
44
Pads
73
Tracks, vias
103, 0
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
29 Mar 2026
Updated
11 Jun 2026

Overview

Autonomous Rover Kicad is an open-source printed circuit board by lxdinh, from the lxdinh/Autonomous-Rover repository on GitHub, published under the MIT licence. It is a 2-layer board of 92.3 × 86.2 mm with 9 parts on 44 nets, routed with 103 tracks and 0 vias.

It is built around the ESP32-S3. Its parts include 6 connectors and 3 capacitors. It belongs with the robots and motor control boards and the ESP32 boards of this library.

Main components

1

README

README.md

Autonomous Navigation Rover

build Platform: ESP32-S3 Framework: Arduino License: MIT

🏆 1st Place — UCSD ECE Design Competition (Nov–Dec 2025) · fastest pathfinding of 13 teams

Vision-guided autonomous ground rover on a custom ESP32-S3 PCB. An ArduCAM OV2640 camera runs on-board RGB565 obstacle detection, an MPU6050 IMU damps the heading, and an L298N H-bridge drives the wheels — coordinated by a lightweight FORWARD → STOP → AVOID state machine. Everything runs on the microcontroller.

Highlights

  • Custom 2-layer, 4×4 in PCB (KiCad) integrating the ESP32-S3, OV2640, MPU6050, and L298N with a shared logic/motor power tree — schematic and Gerbers in hardware/.
  • From-scratch bare-metal drivers, no vendor HAL: custom I²C (MPU6050), SPI-FIFO (ArduCAM), and LEDC-PWM (L298N) classes — 600+ lines of C++.
  • On-board vision: per-frame red-blob detection over the middle image band, feeding a deterministic navigation state machine.

Architecture

mermaid
flowchart LR
  subgraph Sensing
    CAM[OV2640 camera<br/>SPI FIFO] --> DET[Red-blob detector<br/>RGB565, middle band]
    IMU[MPU6050<br/>I2C] --> YAW[Yaw-rate filter]
  end
  DET --> SM[Nav state machine<br/>FORWARD / STOP / AVOID]
  YAW --> MIX[Tank-drive mixer]
  SM --> MIX
  MIX --> MOT[L298N H-bridge<br/>LEDC PWM] --> W[Wheels]

Navigation state machine

mermaid
stateDiagram-v2
  [*] --> FORWARD
  FORWARD --> STOP: red band >= 20%
  STOP --> AVOID: held 200 ms and still blocked
  STOP --> FORWARD: obstacle cleared
  AVOID --> FORWARD: blob out of view

Repository layout

text
Autonomous-Rover/
├── src/
│   ├── main.cpp            # nav state machine + obstacle detection + cruise mixer
│   ├── Camera_SPI.h        # ArduCAM OV2640 over SPI FIFO (DMA buffer, BMP/RGB565)
│   ├── Sensor_I2C.h        # MPU6050 IMU (accel/gyro), bare-metal I2C
│   └── MotorDriver_PWM.h   # L298N via ESP32 LEDC PWM (Arduino core 2.x/3.x aware)
├── include/memorysaver.h   # ArduCAM camera-model selector (OV2640 Mini 2MP)
├── hardware/               # KiCad project, schematic (SVG), Gerbers
├── platformio.ini
└── README.md

Hardware

SubsystemPartInterface
MCUESP32-S3 (DevKitC-1 class)—
CameraArduCAM OV2640 Mini 2MPSPI FIFO + I²C control
IMUMPU6050 (accel + gyro)I²C @ 0x68
Motor driverL298N dual H-bridge6 GPIO (2 PWM enables + 4 direction)
Power9 V motor pack + 3.3 V logiccommon ground

Pin map (ESP32-S3)

FunctionGPIOFunctionGPIO
L298N ENA — left PWM40I²C SDA15
L298N ENB — right PWM39I²C SCL17
L298N IN1 / IN2 — left dir44 / 43SPI SCK12
L298N IN3 / IN4 — right dir42 / 41SPI MISO13
Camera CS10SPI MOSI11

Schematic

Rover schematic

How obstacle detection works

Each captured frame is RGB565 (one 16-bit value per pixel). The detector scans the middle horizontal third of the frame — where a head-on obstacle sits — and flags a pixel as "red" when:

ChannelBitsRule
Red5 (0–31)≥ 22
Green6 (0–63)≤ 14
Blue5 (0–31)≤ 14

If ≥ 20 % of the band's pixels pass, the frame is treated as blocked and the state machine reacts. All thresholds are compile-time constants in src/main.cpp — retune RED_MIN_5BIT, GREEN_MAX_6BIT, BLUE_MAX_5BIT, and DETECTION_THRESHOLD_PERCENT for your obstacle color and lighting.

Build & flash

Built with PlatformIO (ESP32-S3 / Arduino framework). The ArduCAM library is pulled from the PlatformIO registry automatically; the camera model is selected via the -DOV2640_MINI_2MP build flag in platformio.ini.

bash
# from the repo root
pio run                        # compile
pio run -t upload              # flash (board on its native USB port)
pio device monitor -b 115200   # serial @ 115200

Arduino IDE users: install the ArduCAM library, provide a memorysaver.h with #define OV2640_MINI_2MP, select an ESP32-S3 board with USB CDC On Boot: Enabled, and build src/main.cpp.

Design notes & tuning

  • Motor duty is capped to MOTOR_MAX_DUTY_PCT (85 %) so that simultaneous acceleration on a sagging 9 V pack does not brown out the 3.3 V logic rail.
  • Camera resolution is read from the BMP header on every capture, so the pipeline is robust to QVGA/QCIF differences across ArduCAM firmware revisions.
  • Heading hold: the MPU6050 yaw-rate currently applies gentle equal-wheel damping. Promoting it to a differential correction (opposite sign per wheel) is the natural next step for tighter straight-line tracking; the mixer already exposes a symmetric correction term to build on.

License

MIT — see LICENSE. Firmware and hardware authored for the UCSD ECE Design Competition.

Parts

9
QtyValueFootprintReferences
1100uFCapacitor_THT:CP_Radial_D6.3mm_P2.50mmC1
110uFCapacitor_THT:CP_Radial_D5.0mm_P2.50mmC3
1470uFCapacitor_THT:CP_Radial_D8.0mm_P3.50mmC2
19V Battery InputTerminalBlock_Phoenix:TerminalBlock_Phoenix_PT-1,5-2-3.5-H_1x02_P3.50mm_HorizontalJ4
1Arducam OV2640Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_VerticalJ2
1ESP32-S3Connector_PinHeader_2.54mm:PinHeader_2x20_P2.54mm_VerticalJ3
1L298N LogicConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ5
1L298N PowerTerminalBlock_Phoenix:TerminalBlock_Phoenix_PT-1,5-3-3.5-H_1x03_P3.50mm_HorizontalJ6
1MPU6050Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_VerticalJ1

Similar boards

  • 2 layers83.2 × 40 mmSmartdisplay, the printed circuit board in 3D

    Smartdisplay

    BearLaboratory/smartdisplay-hardware

    2.9寸墨水屏个人显示终端硬件显示

    46 parts175GPL-3.0
  • 2 layers168.9 × 123.3 mmOEM ECU, the printed circuit board in 3D

    OEM ECU

    aeonSolutions/AeonLabs-AI-Volvo-MKII-Open-Hardware

    Volvo MKII Open Hardware

    296 parts161CC0-1.0
  • 2 layers35.4 × 27 mmWifiaudio, the printed circuit board in 3D

    Wifiaudio

    BearLaboratory/wifiaudio-tx-hardware

    WiFi无线麦克风硬件pcb设计

    29 parts110GPL-3.0
  • 4 layers100 × 100 mmPCBA OCTV, the printed circuit board in 3D

    PCBA OCTV

    intechstudio/grid-hardware

    403 parts59GPL-3.0
  • 4 layers88 × 30 mmOled nametag, the printed circuit board in 3D

    Oled nametag

    TobleMiner/oled-nametag

    A ESP32-based OLED nametag

    123 parts54CERN-OHL-P-2.0
  • 4 layers93.5 × 118.6 mmRD56, the printed circuit board in 3D

    RD56

    lhm0/rotating_display_color

    56 LED rotating color display with RP2040 and ESP32 microcontrollers

    266 parts25

Questions

How big is the Autonomous Rover Kicad PCB?

It measures 92.3 × 86.2 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Autonomous Rover Kicad use?

9 parts, built around the ESP32-S3. 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 Autonomous Rover Kicad KiCad files?

From the lxdinh/Autonomous-Rover repository on GitHub, at the commit this page was made from: the board is hardware/Autonomous Rover Kicad.kicad_pcb and its schematic hardware/Autonomous Rover Kicad.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Autonomous Rover Kicad 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).