Skip to the content
PCBKitNew board
4 layers133.8 × 75.6 mmTank, the printed circuit board in 3D

The diagram below shows how all onboard subsystems connect to the ESP32-S3:

Size
133.8 × 75.6 mm
Copper layers
4
Thickness
1.6 mm
Parts
36
Nets
57
Pads
165
Tracks, vias
432, 20
Pours
4
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
3 Apr 2026
Updated
27 Apr 2026

Overview

Tank is an open-source printed circuit board by averyizatt, from the averyizatt/ESP32BasedRobiticsPCB repository on GitHub, published under the MIT licence. It is a 4-layer board of 133.8 × 75.6 mm with 36 parts on 57 nets, routed with 432 tracks and 20 vias.

Its parts include 2 ICs, 2 diodes, 2 switches and 1 fuse.

README

README.md

ESP32-S3 Robotics Controller PCB

License: MIT Platform KiCad Arduino PCB

A professional-grade, 4-layer ESP32-S3 robotics controller PCB that consolidates motor control, multi-axis sensing, and user interaction into a single, scalable platform.


Table of Contents

  1. Board Gallery
  2. System Architecture
  3. Feature Overview
  4. PCB Design
  5. GPIO Pin Reference
  6. Peripheral Details
  7. Firmware
  8. Repository Structure
  9. Hardware Files
  10. Contributing
  11. License

Board Gallery

PCB Layout (Top)3D RenderPCB Back
PCB LayoutPCB 3D RenderPCB Back

System Architecture

The diagram below shows how all onboard subsystems connect to the ESP32-S3:

text
                        ┌─────────────────────────────────────┐
                        │           ESP32-S3-WROOM-1           │
                        │     240 MHz Xtensa LX7 Dual-Core     │
                        │     WiFi 802.11 b/g/n  •  BT 5.0    │
                        └───┬───┬───┬───┬───┬───┬───┬───┬─────┘
                            │   │   │   │   │   │   │   │
          ┌─────────────────┘   │   │   │   │   │   │   └──────────────────┐
          │ LEDC PWM            │   │   │   │   │   │ GPIO ISR             │
          ▼                     │   │   │   │   │   ▼                      │
 ┌─────────────────┐            │   │   │   │   │  ┌────────────────┐      │
 │   DRV8871 ×2    │            │   │   │   │   │  │  Hall Sensors  │      │
 │  DC Motor Ctrl  │            │   │   │   │   │  │   ×2 inputs    │      │
 │  (PWM IN1/IN2)  │            │   │   │   │   │  └────────────────┘      │
 └────────┬────────┘            │   │   │   │   │                          │
          │ VM (motor power)    │   │   │   │   │ INPUT_PULLUP             │
          ▼                     │   │   │   │   ▼                          │
    ┌───────────┐               │   │   │   │  ┌──────────────┐            │
    │  Motor ×2 │               │   │   │   │  │  Buttons ×2  │            │
    └───────────┘               │   │   │   │  └──────────────┘            │
                      PWM 50Hz  │   │   │   │                              │
                                ▼   │   │   │ SPI                          │
                       ┌────────────┐  │   ▼                               │
                       │  Servo 1   │  │  ┌──────────────────┐             │
                       └────────────┘  │  │   SPI Display    │             │

Feature Overview

SubsystemComponentCapability
MicrocontrollerESP32-S3-WROOM-1240 MHz dual-core, WiFi, BT 5.0, 45 GPIOs
Motor Drivers2× DRV8871H-bridge, 3.6 A peak, bidirectional DC control
Servo Outputs1 active channelServo 1 on GPIO 8; GPIO 9 is used by the menu potentiometer
Ultrasonic Sensors4× HC-SR042–400 cm range, 15° beam angle
Hall Effect Sensors2× inputsWheel speed, pulse counting, position feedback
IMUI2C headerMPU-6050, ICM-42688, or any I2C IMU
SPI DisplayST7735S 160×80TFT_eSPI driver, tabbed on-device UI
Push Buttons2× SMD tactileTop = enter/select, bottom = back/stop; debounced in firmware
ExpansionGPIO headerGPIO 40, 43, 44, and shared GPIO 48 available for expansion
PowerLDO + distributionOnboard 3.3 V regulation, motor VM bus
WiFi APSoft Access PointSSID RoboController, live sensor dashboard
Web DashboardAsyncWebSocketTabbed UI: sensors, WiFi scan, BLE radar, drive control
Remote ControlWebSocket JSONBrowser joystick → motor drive; Servo 1 slider
BLE GATT ServerNimBLE-ArduinoSensor notify + motor/servo write characteristics
BLE ScannerPassive scanDetect nearby BLE devices, shown on TFT and dashboard

PCB Design

Layer Stackup

The board uses a 4-layer stackup (1.6 mm total thickness) to provide dedicated power and ground planes, minimizing noise and improving signal integrity:

text
  ┌─────────────────────────────────────────────┐  ← Component side
  │  Layer 1 — F.Cu (Top)                        │  Signal routing + high-current motor traces
  ├─────────────────────────────────────────────┤
  │  Prepreg                                     │
  ├─────────────────────────────────────────────┤
  │  Layer 2 — In1.Cu                            │  Solid GND plane (unbroken)
  ├─────────────────────────────────────────────┤
  │  Core                                        │
  ├─────────────────────────────────────────────┤
  │  Layer 3 — In2.Cu                            │  VM + 3.3 V power distribution
  ├─────────────────────────────────────────────┤
  │  Prepreg                                     │
  ├─────────────────────────────────────────────┤
  │  Layer 4 — B.Cu (Bottom)                     │  Additional signals + local copper pours
  └─────────────────────────────────────────────┘  ← Solder side
LayerRoleTrace Width
F.Cu (Top)Signal routing + high-current motor paths0.2 mm signal / 2.0 mm motor VM
In1.CuSolid GND reference plane—
In2.CuVM + 3.3 V power distribution0.8 mm+
B.Cu (Bottom)Additional signals + local copper pours0.2 mm signal

Signal Integrity

Design decisions to ensure reliable operation in a noisy motor-drive environment:

  • Continuous GND plane on In1.Cu with stitching vias throughout — minimises return-path inductance for both digital signals and motor switching transients.
  • Wide copper pours on VM traces and high-current motor paths — rated for DRV8871 peak current with thermal headroom.
  • Local decoupling capacitors placed directly at each ESP32-S3 power pin and each DRV8871 VCC/VM pin — suppresses switching noise at the source.
  • Physical separation between sensitive I2C/SPI/UART traces and high-current motor/PWM traces — reduces capacitive and inductive coupling.
  • Short SPI routes between ESP32-S3 and the display connector — maintains signal integrity at SPI bus speeds.
  • Motor VM routed on power layer (In2.Cu) — keeps motor current off the signal layers.

Key Components (BOM Summary)

ReferencePartPackageDescription
U1ESP32-S3-WROOM-1SMD moduleMain MCU — 240 MHz, WiFi, BT 5.0
U2DRV8871HSOP-8Motor driver — Motor 1
U3DRV8871HSOP-8Motor driver — Motor 2
U43.3 V LDOSOT-2233.3 V regulated power for MCU and logic
J1–J4HC-SR04 headers4-pin 2.54 mmUltrasonic sensor connectors
J5–J6Hall sensor headers3-pin 2.54 mmHall effect sensor connectors
J7–J8Motor terminals2-pin screw terminalMotor output connections
J9Expansion header8-pin 2.54 mmBreakout for unused GPIO
J10Display header7-pin 2.54 mmSPI display connector
SW1–SW2Tactile switchesSMDUser input buttons used by current firmware

Full BOM with part numbers and quantities is available in hardware/bom/.


GPIO Pin Reference

GPIOFunctionTypeNotes
1Hall Sensor 1Digital InputInterrupt-driven pulse counting
2Hall Sensor 2Digital InputInterrupt-driven pulse counting
4Motor 1 PWM ALEDC Output20 kHz PWM, 8-bit resolution
5Motor 1 PWM BLEDC Output20 kHz PWM, 8-bit resolution
6Motor 2 PWM ALEDC Output20 kHz PWM, 8-bit resolution
7Motor 2 PWM BLEDC Output20 kHz PWM, 8-bit resolution
8Servo 1PWM Output50 Hz via ESP32Servo library
9PotentiometerADC InputMain menu scroll / analog control; Servo 2 disabled in firmware
10Ultrasonic 1 TRIGDigital Output10 µs trigger pulse
11Ultrasonic 1 ECHODigital InputPulse width → distance
12Ultrasonic 2 TRIGDigital Output
13Ultrasonic 2 ECHODigital Input
14Ultrasonic 3 TRIGDigital Output
15Ultrasonic 3 ECHODigital Input
16Ultrasonic 4 TRIGDigital Output
17Ultrasonic 4 ECHODigital Input
18I2C SDA (IMU)I2C400 kHz fast mode
21I2C SCL (IMU)I2C400 kHz fast mode
35SPI CSSPIActive low chip select
36SPI DCDigital OutputData/Command select
37SPI MOSI (Display)SPISDA label on display module
38SPI SCLK (Display)SPISCL label on display module
39SPI RESDigital OutputDisplay reset
41Button 1Digital InputINPUT_PULLUP, active LOW
42Button 2Digital InputINPUT_PULLUP, active LOW
48Onboard RGB LEDDigital OutputWS2812 / NeoPixel
40, 43, 44Expansion HeaderGPIOGeneral purpose — broken out to J9

Peripheral Details

Motor Control — DRV8871

The DRV8871 is a brushed DC motor driver with an integrated H-bridge, supporting up to 3.6 A peak current with current-limit protection. Two independent drivers are included for dual-motor operation.

MotorPWM A GPIOPWM B GPIOLEDC Channel ALEDC Channel B
Motor 14501
Motor 26723

Control truth table:

ModePWM APWM BDescription
ForwardPWM dutyLOWSpeed proportional to duty cycle
ReverseLOWPWM dutySpeed proportional to duty cycle
CoastLOWLOWMotor freewheels (no braking)
BrakeHIGHHIGHActive braking, motor stops quickly
cpp
// Example: drive Motor 1 forward at ~70% speed
motor_set(MotorId::MOTOR1, 180);   // 180/255 ≈ 70%

// Brake Motor 1
motor_brake(MotorId::MOTOR1);

// Coast Motor 2
motor_coast(MotorId::MOTOR2);

PWM frequency: 20 kHz (above audible range — eliminates motor whine).
Resolution: 8-bit (0–255 duty cycle values).


Servo Outputs

Servo 1 outputs a standard 50 Hz RC-servo PWM signal compatible with common hobby servos. Servo 2 hardware exists on GPIO 9, but the current firmware repurposes GPIO 9 as the ADC potentiometer input, so only Servo 1 is active.

ServoGPIOPulse Width Range
Servo 181000–2000 µs
Servo 29Disabled in current firmware; GPIO 9 is POT_PIN

Pulse width to angle mapping:

text
1000 µs  ──►  0°   (full left)
1500 µs  ──►  90°  (center / neutral)
2000 µs  ──►  180° (full right)
cpp
// Example: center Servo 1
servo_set_angle(ServoId::SERVO1, 90);

Ultrasonic Sensors — HC-SR04

Four HC-SR04 interfaces provide omnidirectional environmental awareness. Each sensor uses two GPIO pins: one for triggering and one for echo timing.

SensorTRIG GPIOECHO GPIOMax RangeBeam Angle
Sensor 11011~400 cm~15°
Sensor 21213~400 cm~15°
Sensor 31415~400 cm~15°
Sensor 41617~400 cm~15°

Operating principle:

text
MCU                    HC-SR04
 │                        │
 │── 10 µs HIGH ─────────►│  TRIG pulse sent
 │                        │── 40 kHz ultrasonic burst ──►
 │                        │                    ◄── echo return
 │◄── pulse width (ECHO) ─│  width ∝ distance
 │
 Distance (cm) = pulse_width_µs × 0.0343 / 2

Timeout: 30 ms (~5 m) — sensors beyond range return -1.


Hall Effect Sensors

Two digital Hall effect sensor inputs support wheel speed measurement, odometry, and position feedback. Sensors are read via GPIO interrupts for accurate pulse counting.

SensorGPIOMode
Hall 11Interrupt (rising edge)
Hall 22Interrupt (rising edge)
cpp
// Example: read rotational speed
float pps1 = hall_get_pulses_per_second(1);   // pulses per second
float pps2 = hall_get_pulses_per_second(2);

To calculate RPM, divide pulses per second by the number of magnet poles on the wheel.


IMU — I2C

A dedicated I2C header supports any standard I2C IMU module.

SignalGPIOFrequency
SDA18400 kHz (fast mode)
SCL21400 kHz (fast mode)

Compatible IMUs (non-exhaustive):

PartAxesInterface
MPU-60506-axis (accel + gyro)I2C (0x68 / 0x69)
ICM-426886-axis (accel + gyro)I2C / SPI
BNO0559-axis (+ magnetometer, fusion)I2C (0x28 / 0x29)
LSM6DSO6-axisI2C / SPI
cpp
// Example: read IMU data
ImuData imu;
if (imu_read(imu)) {
    // accel in g, gyro in °/s
    Serial.printf("ax=%.2f  ay=%.2f  az=%.2f\n",
                  imu.accel_x, imu.accel_y, imu.accel_z);
}

SPI Display

An SPI display connector supports ST7735, ST7789, ILI9341, or any SPI display with a compatible driver.

SignalGPIOFunction
MOSI (SDA)37Data to display
SCLK (SCL)38SPI clock
CS35Chip select (active LOW)
DC36Data / Command select
RES39Hardware reset

The firmware uses TFT_eSPI for hardware-accelerated graphics and text rendering on the ST7735S 160×80 display. A custom colour palette and tabbed on-device UI are implemented in display.h/cpp and ui.h/cpp.


Push Buttons

The current firmware uses two tactile buttons. Firmware enables INPUT_PULLUP, treats LOW as pressed, and applies software debouncing with BUTTON_DEBOUNCE_MS (default 20 ms).

ButtonGPIOUI Role
Top button / Button 141Enter, open, select, primary action
Bottom button / Button 242Back, stop, return to menu

GPIO 47 / Button 3 is not populated or used by the current 2-button UI.

cpp
// Example: detect button press events
buttons_update();   // call every loop iteration

if (nav_enter_just_pressed()) {
    // top button pressed
}

if (nav_back_just_pressed()) {
    // bottom button pressed
}

Expansion Header

Several GPIO pins are broken out on J9 for custom peripherals, additional sensors, or future expansion. Some physical header pins are shared with active firmware functions, so check config.h before reusing them.

Header PinGPIONotes
137SPI display MOSI in current firmware
238SPI display SCLK in current firmware
340General purpose
443UART0 TX (also used for USB CDC)
544UART0 RX (also used for USB CDC)
648Onboard RGB LED / WS2812
73.3 VPower rail
8GNDGround

GPIO 43 and 44 are the default UART0 pins and can be used for serial communication with external devices.


Firmware

Quick Start

bash
# 1. Clone the repository
git clone https://github.com/averyizatt/ESP32BasedRobiticsPCB.git

# 2. Open in PlatformIO (recommended)
#    File → Open Folder → ESP32BasedRobiticsPCB
#    PlatformIO auto-resolves all lib_deps from platformio.ini

# 3. Build
pio run --environment esp32s3

# 4. Upload
pio run --target upload --environment esp32s3
  1. Install PlatformIO (VS Code extension or CLI)
  2. Open the repo root as the workspace
  3. PlatformIO resolves all library dependencies automatically from platformio.ini
  4. Select the esp32s3 environment, build, and upload
  5. After boot, connect to WiFi SSID RoboController (password robot1234) and navigate to http://192.168.4.1

Library Dependencies

All dependencies are declared in platformio.ini and resolved automatically by PlatformIO. For manual Arduino IDE installs use the Library Manager names below.

LibraryVersionPurpose
madhephaestus/ESP32Servo^3.0.6RC servo 50 Hz PWM
bodmer/TFT_eSPI^2.5.43ST7735S SPI display driver + graphics
ESP32Async/AsyncTCP^3.3.2Async TCP foundation for web server
ESP32Async/ESPAsyncWebServer^3.7.4Async HTTP + WebSocket server
h2zero/NimBLE-Arduino^1.4.3BLE stack (GATT server + scanning)
Wirebuilt-inI2C for IMU
WiFibuilt-inSoft AP + network scanning

TFT_eSPI user config: The library reads pin assignments from User_Setup.h. Ensure the file in your PlatformIO build includes the ST7735S settings matching config.h (MOSI=37, SCLK=38, CS=35, DC=36, RST=39).

Firmware Architecture

The firmware is organized as a set of independent peripheral modules — each with its own header and source file — all coordinated from main.cpp:

text
ESP32RoboticsController/
├── main.cpp                         ← setup() + loop() entry point
├── config.h                         ← All pin definitions and tuning constants
│
├── motors.h / motors.cpp            ← DRV8871 LEDC-based motor control
├── servos.h / servos.cpp            ← RC servo PWM control
├── ultrasonics.h / ultrasonics.cpp  ← HC-SR04 distance measurement
├── hall_sensors.h / hall_sensors.cpp← Interrupt-based pulse counting
├── imu.h / imu.cpp                  ← I2C IMU read abstraction (MPU-6050)
├── buttons.h / buttons.cpp          ← Debounced button state machine
├── led.h / led.cpp                  ← Onboard LED control
├── pot.h / pot.cpp                  ← Potentiometer / ADC helper
│
├── display.h / display.cpp          ← TFT_eSPI display abstraction + colour palette
├── ui.h / ui.cpp                    ← On-device tabbed UI state machine
├── games.h / games.cpp              ← Mini-game / demo logic
├── autonomous_modes.h / autonomous_modes.cpp
│                                      ← Autonomous driving state machine
├── robot_modes.h / robot_modes.cpp  ← Robot mode selector + active-mode runner
│
└── wifi_server.h / wifi_server.cpp  ← WiFi soft AP, AsyncWebServer, WebSocket push,
                                        BLE GATT server, WiFi/BLE scanner helpers

All pin assignments and tunable parameters are centralized in config.h — adapting the firmware to a modified hardware revision only requires editing that single file.

PWM Configuration

Motor PWM is generated using the ESP32-S3's LEDC peripheral, which provides hardware-timed PWM independent of the CPU:

ParameterValueNotes
Frequency20 kHzAbove human hearing — eliminates audible motor whine
Resolution8-bit0–255 duty cycle values
Channels4 (0–3)One per motor H-bridge input

WiFi Access Point & Web Dashboard

The firmware starts a soft Access Point on boot. Connect any browser-capable device to control and monitor the robot.

SettingValue
SSIDRoboController
Passwordrobot1234
IP Address192.168.4.1
WebSocketws://192.168.4.1/ws

The dashboard is a single-page app served from PROGMEM with four tabs:

TabContents
SensorsLive IMU (accel + gyro axis bars), ultrasonic proximity radar, heap gauge, hall encoder counts, button tiles, uptime
WiFi ScannerScan nearby networks — SSID, signal strength bar, channel, security badge
BLE RadarScan for BLE devices — name, RSSI, MAC address
ControlVirtual joystick (touch + mouse), Servo 1 control, emergency stop, command log

Sensor data is pushed over WebSocket (no polling) at a configurable interval (WIFI_WS_PUSH_MS, default 200 ms).

REST Endpoints
EndpointMethodResponse
/GETFull HTML dashboard
/api/scanGETJSON array of nearby WiFi networks
/api/bleGETJSON array of scanned BLE devices (~4 s scan)
WebSocket Commands (browser → robot)

The robot accepts inbound JSON commands over the same WebSocket connection:

json
// Drive both motors (speed: -255 to +255)
{ "t": "drive", "l": 200, "r": -150 }

// Set Servo 1 angle (angle: 0–180°)
{ "t": "servo", "id": 1, "angle": 90 }

// Emergency stop — coasts both motors
{ "t": "stop" }

BLE GATT Server

The firmware advertises a custom BLE GATT service alongside the WiFi AP — connect from nRF Connect, LightBlue, or any GATT-capable app.

ItemUUIDPropertiesFormat
ServiceAB12——
Sensor NotifyAA13Read + NotifyCompact JSON: accel, gyro, ultrasonic
Motor WriteAA14Writel:<speed>,r:<speed> e.g. l:200,r:-150
Servo WriteAA15Write<id>:<angle> e.g. 1:90

The sensor characteristic sends a live data notification every 500 ms when a central is connected:

json
{"ax":0.01,"ay":-0.03,"az":9.81,"gx":0.2,"gy":-0.1,"gz":0.0,"u":[45.2,120.0,-1.0,88.4]}

(u values are ultrasonic distances in cm; -1 = no echo / out of range)


On-Device UI

A tabbed menu system runs on the 160×80 TFT display. Navigation uses two push buttons and the onboard potentiometer. An auto-idle screensaver activates after 20 seconds of inactivity.

Navigation:

  • Top button / GPIO 41 — enter, open, select, or primary action
  • Bottom button / GPIO 42 — back, stop active mode, or return to menu
  • Potentiometer — main menu selection and analog controls inside demos/games

In the main menu the potentiometer maps directly across the list: pot minimum selects the first item, and pot maximum selects the last item. It does not wrap around.

Main Menu
Menu ItemScreenDescription
SensorsLive readoutAll sensor values: ultrasonic distances, hall encoder counts, button states, uptime
IMU DataLive readoutAccelerometer (X/Y/Z in g) and gyroscope (X/Y/Z in °/s) with temperature
Tilt DemoAnimationGraphical liquid-level tilt visualiser driven by IMU pitch/roll
MotorsLive readoutCurrent motor speed and direction for both motor channels
UltrasonicRadar demoReal-time 4-direction proximity radar on TFT
Hall DemoLive readoutWheel pulse counts and pulses-per-second for both encoder channels
Servo DemoManual servo controlServo 1 starts at 90°; moving the pot commands 0–180°
SystemInfo screenFirmware uptime, heap usage, CPU frequency, chip info
GamesSub-menuArcade game launcher (see Games section below)
Robot ModesSub-menuAutonomous / RC mode launcher; bottom button stops active mode
WiFi InfoInfo screenAP SSID, password, IP address, connected client count
WiFi ScanScannerNearby WiFi networks with RSSI bars; pot scrolls list
BLE RadarScannerNearby BLE devices with RSSI bars; 4-second active scan
Robot Modes

The Robot Modes menu starts the autonomous-mode engine from the display UI. The top button starts the highlighted mode, the bottom button exits the menu, and while a mode is running the bottom button stops the mode and returns to the Robot Modes list.

ModeDescription
RC ControlXbox BLE joystick / tank-drive control
UART ControlUART-commanded forward control
Socket CtrlSocket motor pass-through
AutonomousAdvanced state-machine mode
Simple AutoPID forward motion with recovery behavior
Wall FollowLeft-hand PID wall follower
Premap NavMap-seeded autonomous navigation
Games

The Games menu launches a sub-menu with three sprite-rendered arcade games. All games use a full-screen off-screen framebuffer (TFT_eSprite) pushed via DMA for zero-flicker 40 fps rendering. Win/loss statistics are stored in RAM for the session and displayed in the game menu next to each title.


Snake

Classic snake — eat food to grow, avoid your own tail. Walls wrap.

DetailValue
Grid40 × 14 cells (4 px each)
Win conditionScore 20 food pieces
ControlsPotentiometer zones or top button to turn; bottom returns from game-over/menu screens
SpeedIncreases with score (160 ms → 50 ms minimum tick)
Visual effectsGradient tail fade, pulsing food, particle burst on eat/death, screen shake on collision

Pong

Single-player Pong — keep the ball alive and score paddle hits.

DetailValue
Win condition10 paddle hits
Lives3
ControlsPotentiometer maps directly to paddle Y position; top button retries from game-over
DifficultyBall speed +0.15 per hit, capped at 5.5 px/frame
Visual effects6-frame ball trail, glowing neon paddle, particle bursts on wall/paddle hits, screen shake on miss

Asteroids

Side-scrolling asteroid dodge — survive as long as possible.

DetailValue
Win conditionSurvive 1500 score ticks (~37 s at 40 fps)
Lives3
ControlsPotentiometer steers ship Y (smoothed); top button retries from game-over
DifficultyRock speed 2.2 → 5.0 px/frame; spawn interval 1100 → 350 ms
Visual effects3-layer parallax starfield, procedural 8-vertex asteroid shapes, thruster flame + exhaust particles, invulnerability blink after hit, screen shake on collision

All three games share:

  • Particle system — 24-particle pool with gravity and colour fade, reused across all effects
  • Screen shake — configurable intensity applied as DMA push offset
  • Session W/L stats — shown in the games menu and on the game-over screen
  • LED feedback — green on score/win, red on death/hit, blue on game start

Repository Structure

text
ESP32BasedRobiticsPCB/
│
├── platformio.ini                     ← PlatformIO project config + lib_deps
│
├── firmware/
│   └── ESP32RoboticsController/
│       ├── main.cpp                   ← setup() + loop() entry point
│       ├── config.h                   ← Pin map & constants (start here)
│       ├── motors.h / motors.cpp      ← DRV8871 LEDC motor control
│       ├── servos.h / servos.cpp      ← RC servo PWM
│       ├── ultrasonics.h / ultrasonics.cpp  ← HC-SR04 distance
│       ├── hall_sensors.h / hall_sensors.cpp← Interrupt pulse counting
│       ├── imu.h / imu.cpp            ← MPU-6050 I2C abstraction
│       ├── buttons.h / buttons.cpp    ← Debounced buttons
│       ├── led.h / led.cpp            ← Onboard LED
│       ├── pot.h / pot.cpp            ← ADC potentiometer
│       ├── display.h / display.cpp    ← TFT_eSPI wrapper + colour palette
│       ├── ui.h / ui.cpp              ← On-device tabbed UI state machine
│       ├── games.h / games.cpp        ← Demo / mini-game logic
│       ├── autonomous_modes.h / autonomous_modes.cpp
│       │                                ← Autonomous driving state machine
│       ├── robot_modes.h / robot_modes.cpp
│       │                                ← Robot mode selector + active-mode runner
│       └── wifi_server.h / wifi_server.cpp  ← WiFi AP, web dashboard,

Hardware Files

KiCad design files are in the hardware/ directory.

  1. Install KiCad 7 or later
  2. Open hardware/kicadProject/Tank.kicad_pro
  3. The schematic opens in Eeschema; the PCB layout opens in Pcbnew

Generating Gerbers for fabrication (Pcbnew → File → Fabrication Outputs → Gerbers):

FileLayer
*-F_Cu.gbrTop copper
*-In1_Cu.gbrInner GND plane
*-In2_Cu.gbrInner power plane
*-B_Cu.gbrBottom copper
*-F_SilkS.gbr / *-B_SilkS.gbrSilkscreen
*-F_Mask.gbr / *-B_Mask.gbrSolder mask
*-F_Paste.gbrSolder paste
*-Edge_Cuts.gbrBoard outline
*.drlDrill file (Excellon)

Pre-generated Gerber files are available in hardware/gerbers/.


Contributing

Contributions are welcome! To contribute:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/my-improvement)
  3. Commit your changes with a clear message
  4. Open a pull request describing what you changed and why

For hardware changes: please include updated Gerber files and a brief description of the PCB modification.
For firmware changes: please test on hardware before submitting.


License

MIT License — see LICENSE for details.


Made with ❤️ for the robotics community

Parts

36
QtyValueFootprintReferences
4Conn_01x04_PinConnector_PinHeader_2.00mm:PinHeader_1x04_P2.00mm_VerticalUltrasonic1, Ultrasonic2, Ultrasonic3, Ultrasonic4
4RResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_Vertical4.7k, 4.7k, 4.7k, 4.7k
3RResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal10k, 10k, 10k
2C_PolarizedCapacitor_THT:CP_Radial_D4.0mm_P1.50mm100uf, 100uf
2Conn_01x03_PinConnector_PinSocket_2.00mm:PinSocket_1x03_P2.00mm_VerticalHALL1, HALL2
2Conn_01x03_PinConnector_PinHeader_2.00mm:PinHeader_1x03_P2.00mm_VerticalServo1, Servo2
2DDiode_THT:D_A-405_P7.62mm_HorizontalD1, D2
2Push_ButtonButton_Switch_THT:SW_PUSH_6mmSW1, SW2
2Screw_Terminal_2_P3.50mmTerminalBlock_Phoenix:TerminalBlock_Phoenix_PT-1,5-2-3.5-H_1x02_P3.50mm_HorizontalBATTERY1, SWITCH1
2~Library:DRV8871U3, U6
2~Library:LM2596Adj3.3vRail1, 5vRail1
1C_PolarizedCapacitor_THT:CP_Radial_D8.0mm_P2.50mm300uf
1Conn_01x02_PinConnector_PinHeader_2.00mm:PinHeader_1x02_P2.00mm_VerticalBTNEXT1
1Conn_01x16_PinConnector_PinHeader_2.00mm:PinHeader_1x16_P2.00mm_VerticalGPIOHEADER1
1FuseFuse:Fuseholder_Blade_ATO_Littelfuse_Pudenz_2_PinF1
1LOGOImages:wormholeG***
1LOGOImages:worldG***
1~Library:SPI 0.96 LCDST1
1~Library:MPU6050MPU6050Breakout1
1~Library:ESP32S3ESP32-S3WROOM45Pin1

Questions

How big is the Tank PCB?

It measures 133.8 × 75.6 mm and has 4 copper layers, 1.6 mm thick.

What parts does the Tank use?

36 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 Tank KiCad files?

From the averyizatt/ESP32BasedRobiticsPCB repository on GitHub, at the commit this page was made from: the board is hardware/kicadProject/Tank.kicad_pcb and its schematic hardware/kicadProject/Tank.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

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

Similar boards

  • 4 layers24.4 × 24.4 mmOSO SWAT C1-rounded, the printed circuit board in 3D

    OSO SWAT C1-rounded

    joeycastillo/Sensor-Watch

    A board replacement for the classic Casio F-91W wristwatch

    36 parts2.1k
  • 4 layers19.1 × 19 mmKeyword bottom, the printed circuit board in 3D

    Keyword bottom

    notaroomba/keybytes

    A truly modular keyboard

    36 parts444
  • 4 layers56.4 × 24 mmFilter bank, the printed circuit board in 3D

    Filter bank

    loxodes/vna

    Under development open hardware microwave vector network analyzer

    36 parts205
  • 4 layers74.1 × 24 mmDevelopment board, the printed circuit board in 3D

    Development board

    portapack-mayhem/mayhem-mdk

    PortaPack - Module Develoment Kit

    36 parts88GPL-3.0
  • 4 layers90 × 70 mmDiffpair test, the printed circuit board in 3D

    Diffpair test

    rjwalters/kicad-tools

    Standalone Python tools for parsing and manipulating KiCad schematic and PCB files

    36 parts73MIT
  • 4 layers38 × 38 mmReSDMAC, the printed circuit board in 3D

    ReSDMAC

    mbtaylor1982/ReSDMAC

    Verilog code to replace the Commodore SDMAC found in the A3000

    36 parts51CC-BY-SA-4.0
  • 4 layers30 × 18 mmFdcanusb, the printed circuit board in 3D

    Fdcanusb

    mjbots/fdcanusb

    fdcanusb adapter

    36 parts42Apache-2.0
  • 4 layers45.8 × 49.7 mmRcp rdram, the printed circuit board in 3D

    Rcp rdram

    dmkfasi/nus-cpu

    This tends to re-create Nintendo 64 schematics and lay out a board suitable for portable version

    36 parts35