Skip to the content
PCBKitNew board
4 layers62 × 28 mmMdd32-bot, the printed circuit board in 3D

A compact ESP32-S3 based differential drive controller board designed in KiCad

Size
62 × 28 mm
Copper layers
4
Thickness
1.6 mm
Parts
66
Nets
83
Pads
302
Tracks, vias
511, 99
Pours
9
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
10 Oct 2026
Updated
8 Nov 2026

Overview

Mdd32-bot is an open-source printed circuit board by rhammell, from the rhammell/mdd32-bot repository on GitHub, published under the MIT licence. It is a 4-layer board of 62 × 28 mm with 66 parts on 83 nets, routed with 511 tracks and 99 vias.

It is built around the ESP32-S3-MINI-1-N8, DRV8833PWPR and BQ24072RGTR, with the AO3401A and SD103AW among its other parts. Its parts include 22 capacitors, 19 resistors, 5 ICs, 5 diodes and 4 connectors. It belongs with the robots and motor control boards and the ESP32 boards of this library.

Main components

5

README

README.md

MDD32 Bot

A minimal two-wheeled differential-drive robot built around an ESP32-S3. The project includes the custom PCB, the 3D-printable chassis, and the firmware (packaged as an Arduino library).

The MDD32 board is a small, battery-powered controller for two-wheeled robots. It pairs an ESP32-S3 module with a dual H-bridge motor driver and connectors for two N20 gear motors with quadrature encoders. A single-cell Li-ion/LiPo battery powers the board, and it charges over USB-C. The same USB-C port is used for programming and serial debugging through the ESP32-S3's native USB.

MDD32 Bot board, top view

Repository Layout

FolderDescription
firmware/ESP32 firmware, packaged as the MDD32_Bot Arduino library, plus example, test, and tuning sketches.
hardware/KiCad project for the PCB (schematic, board layout, and footprint/symbol/3D-model libraries).
mechanical/FreeCAD source (mechanical/src/) and exported STLs (mechanical/export/) for the chassis.
images/README images.

Board Features

  • ESP32-S3-MINI-1-N8 module with Wi-Fi and Bluetooth LE
  • Native USB-C for programming, serial, and charging; no USB-UART bridge needed
  • Single-cell Li-ion/LiPo charging with power-path management (TI BQ24072)
  • 5 V boost converter for the motor supply (TI TPS61023)
  • 3.3 V LDO for the logic supply (Diodes AP2114H-3.3)
  • Dual H-bridge motor driver with per-channel current limiting (TI DRV8833)
  • Two 6-pin JST-SH motor ports for N20 encoder motors
  • Battery voltage sensing that only draws current while the board is switched on
  • Charge and USB-power status, shown on LEDs and readable by the ESP32
  • Slide power switch, plus RESET and BOOT buttons
  • 4-layer, 62 × 28 mm PCB with four M2.5 mounting holes

Hardware

Power

RailSourceFeeds
VBUSUSB-C (5 V)Battery charger input
VBAT1S Li-ion/LiPo via JST-PH 2-pinCharger battery pin
VSYSCharger power-path output, through the power switchLDO and boost converter
+3V3AP2114H-3.3 LDOESP32-S3 and encoders
+5VTPS61023 boost (≈4.96 V)DRV8833 motor supply
  • Charger: the BQ24072's input current limit is set to about 1.4 A (R9 = 1.1 kΩ) and its fast-charge current to about 330 mA (R10 = 2.7 kΩ). Size your battery for this charge rate, or change R10.
  • Motor current limit: each DRV8833 channel limits at about 0.67 A (300 mΩ sense resistors).

ESP32-S3 Pin Map

GPIOSignalFunction
IO0BOOTBOOT button (strapping pin)
ENRESETRESET button
IO10VBAT_MONBattery voltage, ½ divider (ADC)
IO35PGOOD_MONUSB power present (active low)
IO36CHG_MONCharging (active low)
IO40SLEEPDRV8833 nSLEEP (high = enabled)
IO47MOT1_IN1Left motor driver input 1 (AIN1)
IO33MOT1_IN2Left motor driver input 2 (AIN2)
IO38MOT1_ENCALeft encoder channel A
IO39MOT1_ENCBLeft encoder channel B
IO48MOT2_IN1Right motor driver input 1 (BIN1)
IO34MOT2_IN2Right motor driver input 2 (BIN2)
IO41MOT2_ENCARight encoder channel A
IO42MOT2_ENCBRight encoder channel B
IO19/20USB_D-/USB_D+Native USB

Connectors

RefConnectorPinout
J1JST-PH 2-pin1: VBAT, 2: GND
J2USB-C (USB 2.0)Power and data
J4JST-SH 6-pin (MOT L)1: GND, 2: ENC_B, 3: ENC_A, 4: 3V3, 5: M2, 6: M1
J5JST-SH 6-pin (MOT R)1: GND, 2: ENC_B, 3: ENC_A, 4: 3V3, 5: M2, 6: M1

Opening the PCB

  1. Open hardware/MDD32_Bot/MDD32_Bot.kicad_pro in KiCad 10 or newer.
  2. The project's symbol, footprint, and 3D model libraries are referenced relative to the project folder, so no extra library setup is needed.
  3. Each component in the schematic has an LCSC part number in its LCSC field for JLCPCB assembly. The Fabrication Toolkit plugin can generate the Gerbers, BOM, and placement file in one step.

Firmware

The firmware lives in firmware/MDD32_Bot/, structured as an Arduino library with no external dependencies:

PathDescription
src/MDD32_Bot.h / .cppTop-level MDD32_Bot class that ties the subsystems together.
src/definitions/Compile-time configuration: pin_definitions.h (wiring) and robot_definitions.h (tuning/behavior).
src/battery/MDD32_Battery: battery voltage and charger-status monitoring.
src/drive/Differential drive stack: MDD32_Motor, MDD32_Encoder, MDD32_PID, MDD32_Motor_Controller, and MDD32_Drive.
examples/Basics/Standalone feature demos: BatteryTest, WifiTest.
examples/Tuning/Calibration sketches, numbered in the order they should be run: 1_PIDTuning, 2_WheelSyncTuning, 3_DistanceTuning.
All sketches report over the Serial Monitor at 115200 baud.

Installing

Copy or symlink firmware/MDD32_Bot into your Arduino libraries folder (for example ~/Documents/Arduino/libraries/MDD32_Bot), and install the esp32 by Espressif Systems board package.

Board settings

In the Arduino IDE, select ESP32S3 Dev Module and set:

  • USB CDC On Boot: Enabled (required for Serial output over the native USB port)
  • Flash Size: 8MB
  • PSRAM: Disabled

The ESP32-S3 is programmed over USB-C. If the port doesn't appear, hold BOOT, press and release RESET, then release BOOT to enter the bootloader.

Firmware API

Include the library and create a single MDD32_Bot instance. It exposes two subsystems as public members: battery and drive.

cpp
#include <MDD32_Bot.h>

MDD32_Bot bot;

void setup() {
    Serial.begin(115200);
    if (!bot.begin()) {
        Serial.println("MDD32 Bot init failed");
        while (1);
    }
    bot.drive.straight(6.0f);   // drive forward at 6 cm/s
}

void loop() {
    bot.drive.update();         // must be called frequently for PID control
}

MDD32_Bot

MemberDescription
bool begin()Initializes the battery monitor and drive subsystems. Returns false if either fails.
batteryMDD32_Battery instance (see below).
driveMDD32_Drive instance (see below).

MDD32_Battery

MethodDescription
bool begin()Initializes battery voltage and charge-status monitoring. Called by MDD32_Bot::begin().
float voltage()Battery voltage in volts.
bool charging()true while actively charging.
bool chargerConnected()true when a charging source is plugged in.

MDD32_Drive

Differential drive with per-wheel PID speed control, acceleration ramping, and wheel-sync correction. Call update() frequently from loop() to run the control loop.

MethodDescription
bool begin()Initializes the motor driver, both motor controllers, and encoders. Called by MDD32_Bot::begin().
void straight(float speed_cm_s)Drives both wheels at the given speed (negative = reverse). Clamped to MAX_SPEED_CM_S.
void spin(float speed_cm_s)Spins in place, with the wheels at equal and opposite speeds. Positive spins clockwise.
void stop()Stops both motors immediately and goes idle.
void update()Runs the drive control loop; call as often as possible.
bool isMoving()true while a drive command is active.
DriveTelemetry getTelemetry()Returns current motor telemetry.
float getDistance()Returns cumulative straight-line distance, in cm, driven since power-on. Spins don't add to it.
void resetDistance()Resets the cumulative drive distance to zero.

DriveTelemetry contains: leftRPM, leftPWM, rightRPM, rightPWM, leftCount, and rightCount (wheel-output RPM, applied PWM, and raw encoder counts).

Tuning overrides

The control parameters default to the values in src/definitions/robot_definitions.h. These setters override them at runtime; call them after bot.begin(). The sketches in examples/Tuning/ use them so you can tune without editing the library.

MethodDescription
void setPIDGains(float kp, float ki, float kd)Sets the PID gains for both wheels. Default: PID_KP, PID_KI, PID_KD.
void setWheelSyncKP(float kp)Sets the wheel-sync correction gain (0 disables it). Default: WHEEL_SYNC_KP.
void setMaxAccel(float rpmPerSec)Sets the acceleration ramp rate (0 disables ramping). Default: MAX_ACCEL_RPM_S.

License

This project, including the firmware, PCB design files, and mechanical/3D-printed parts, is licensed under the MIT License.

Parts

66
QtyValueFootprintReferences
610uFCapacitor_SMD:C_0805_2012MetricC6, C9, C10, C15, C16, C20
50.1uFCapacitor_SMD:C_0603_1608MetricC2, C3, C7, C14, C19
522uFCapacitor_SMD:C_0805_2012MetricC4, C12, C18, C21, C22
4100kResistor_SMD:R_0603_1608MetricR2, R3, R4, R11
410kResistor_SMD:R_0603_1608MetricR1, R7, R8, R12
4MountingHoleMountingHole:MountingHole_2.7mm_M2.5H1, H2, H3, H4
34.7kResistor_SMD:R_0603_1608MetricR15, R18, R19
3LEDLED_SMD:LED_0805_2012MetricD3, D4, D5
2300mResistor_SMD:R_1206_3216MetricR13, R14
2470uFCapacitor_SMD:CP_Elec_6.3x7.7C8, C17
25.1kResistor_SMD:R_0603_1608MetricR5, R6
2AO3401APackage_TO_SOT_SMD:SOT-23Q1, Q3
2Conn_Motor_N20_EncoderConnector_JST:JST_SH_BM06B-SRSS-TB_1x06-1MP_P1.00mm_VerticalJ4, J5
2SD103AWDiode_SMD:D_SOD-123D1, D2
10.01uFCapacitor_SMD:C_0603_1608MetricC13
11.1kResistor_SMD:R_0603_1608MetricR9
1100uFCapacitor_SMD:C_1206_3216MetricC5
11uFCapacitor_SMD:C_0603_1608MetricC1
11uHMDD32_Bot:L_Coilcraft_XxL4030L1
12.2uFCapacitor_SMD:C_0603_1608MetricC11
12.7kResistor_SMD:R_0603_1608MetricR10
1220kResistor_SMD:R_0603_1608MetricR16
12N7002Package_TO_SOT_SMD:SOT-23Q2
130kResistor_SMD:R_0603_1608MetricR17
1AP2114H-3.3Package_TO_SOT_SMD:SOT-223-3_TabPin2U4
1BQ24072RGTMDD32_Bot:VQFN-16-1EP_3x3mm_P0.5mm_EP1.6x1.6mm_ThermalViasU2
1DRV8833PWPRMDD32_Bot:HTSSOP-16-1EP_4.4x5mm_P0.65mm_EP3.4x5mm_Mask2.66x2.46mm_ThermalViasU3
1ESP32-S3-MINI-1MDD32_Bot:ESP32-S3-MINI-1U1
1JST_PHConnector_JST:JST_PH_B2B-PH-K_1x02_P2.00mm_VerticalJ1
1SW_BOOTButton_Switch_SMD:SW_SPST_TS-1088-xR020SW2
1SW_RESETButton_Switch_SMD:SW_SPST_TS-1088-xR020SW1
1SW_SPDT_SHMDD32_Bot:SW_SPDT_Shouhan_MSK12C02SW3
1TPS61023DRLRPackage_TO_SOT_SMD:SOT-563U5
1USB_C_Receptacle_USB2.0_16PMDD32_Bot:USB_C_Receptacle_G-Switch_GT-USB-7010ASVJ2

Questions

How big is the Mdd32-bot PCB?

It measures 62 × 28 mm and has 4 copper layers, 1.6 mm thick.

What parts does the Mdd32-bot use?

66 parts, built around the ESP32-S3-MINI-1-N8, DRV8833PWPR, BQ24072RGTR and AO3401A. 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 Mdd32-bot KiCad files?

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

Can I use the Mdd32-bot 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

  • 2 layers188.1 × 58.2 mmAN ESP32 S3, the printed circuit board in 3D

    AN ESP32 S3

    laforestlabs/KiCraft

    KiCad PCB automation toolkit — placement, routing, scoring, and experiment management

    36 parts
  • 4 layers62 × 42 mmHybrid Controller, the printed circuit board in 3D

    Hybrid Controller

    DesignStraub/ringwheel-hybrid-drone

    A 5-inch FPV drone whose prop ducts fold down and become wheels. Design study in Fusion 360 and KiCad, CC BY-NC-SA 4.0.

    103 parts
  • 4 layers58.5 × 26.5 mmEsp32s3-bms, the printed circuit board in 3D

    Esp32s3-bms

    amar-jay/kicad-templates

    amarjay's kicad templates

    32 parts1
  • 2 layers127.3 × 82.2 mmLittle red rover, the printed circuit board in 3D

    Little red rover

    little-red-rover/lrr-hardware

    Hardware design files for Little Red Rover.

    65 parts1CERN-OHL-W-2.0
  • 4 layers54 × 120 mmKartonaut, the printed circuit board in 3D

    Kartonaut

    Jan-Philipp-Munsch/kartonaut

    TVC model rocket (after BPS.space Scout F): Teensy 4.1 flight firmware, mainboard spec, project log

    174 partsMIT
  • 2 layers82 × 60 mmEEE3088F PCB Project, the printed circuit board in 3D

    EEE3088F PCB Project

    LlamaLuLu/Micromouse-Lula-and-Rejoice

    Our Micromouse power subsystem for the Design course EEE3088F

    107 parts
  • 2 layers70 × 50 mmBilly, the printed circuit board in 3D

    Billy

    ryandrake08/billy

    Offline Big Mouth Billy Bass voice jokester powered by an ESP32-S3 and a local GPU backend.

    82 partsApache-2.0
  • 2 layers46.5 × 78.5 mmShaun proj, the printed circuit board in 3D

    Shaun proj

    SFBdragon/eee3088f-project

    Collaborative repo for the UCT EEE3088F Project of team 69.

    99 partsCERN-OHL-P-2.0