Skip to the content
4 layers21 × 27.9 mmMiniBot, the printed circuit board in 3D

Super cheap super tiny bots for....playing chess...

Size
21 × 27.9 mm
Copper layers
4
Thickness
0.8 mm
Parts
60
Nets
73
Pads
260
Tracks, vias
675, 82
Pours
6
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
14 Jan 2025
Updated
11 Sep 2026

Overview

MiniBot is an open-source printed circuit board by DDeGonge, from the DDeGonge/MiniBot repository on GitHub, published under the MIT licence. It is a 4-layer board of 21 × 27.9 mm with 60 parts on 73 nets, routed with 675 tracks and 82 vias.

It is built around the ESP32-C3-MINI-1-H4X, STSPIN220 and MIC23050-SYML-TR, with the MMC5633NJL, EASV2010RWA0 and GSB1C41110SSHR among its other parts. Its parts include 23 resistors, 19 capacitors, 6 ICs, 3 connectors and 3 switches. It belongs with the ESP32 and RISC-V boards of this library.

Main components

7

README

README.md

MiniBot

A swarm robotics platform built around autonomous chess. The system runs 34 small differential-drive robots across an 8x8 board, each independently localized and coordinated by a central Python application running on a Raspberry Pi.

The design is general-purpose — chess is the primary use case, but the platform works for any scenario requiring coordinated movement of many small autonomous robots in a bounded space.

Per-bot hardware cost is approximately $4 excluding PCB.


Table of Contents

  1. System Architecture
  2. Hardware
  3. Communication Pathways
  4. Server-Bot Sync
  5. Localization
  6. PCB and CAD
  7. Firmware

System Architecture

The system has three layers:

Coordinator is a Python/PyQt6 application running on a Raspberry Pi. It holds board state, runs path planning, drives the GUI, and sends motion commands to the Server over USB serial.

Server is an ESP32 on the motherboard. It acts as a wireless gateway: it receives CSV commands from the Coordinator over USB serial, translates them to binary ESP-NOW messages, and broadcasts them to the bots. It also drives the electromagnets used for localization and collects ACK/NACK responses back up to the Coordinator.

MiniBots are the robots themselves. Each runs an ESP32-C3 with five concurrent FreeRTOS tasks handling motion control, wireless communication, position estimation, and battery management entirely onboard.


Hardware

MiniBot

ComponentDetails
MCUESP32-C3 (RISC-V, 2.4 GHz WiFi)
Motors2x PMO8-2 miniature stepper motors
Motor driversSTSPIN220
MagnetometerMMC5633NJL (I2C)
Power~170 mAh LiPo
ChassisFully 3D printed; 2x M2x5mm bolts, 2x 7mm ID o-rings for tires
PCBCustom 4-layer; fits in the base of the chassis

Server / Motherboard

ComponentDetails
MCUESP32-C3 (RISC-V, 2.4 GHz WiFi)
ElectromagnetsMultiple, positioned at fixed known coordinates on the board
InterfaceUSB serial to Raspberry Pi
WiFiSoft AP; bots connect on a dedicated channel

The electromagnets fire in a timed sequence that the MiniBots detect with their onboard magnetometers. This is the primary localization mechanism.


Communication Pathways

mermaid
flowchart TD
    subgraph Coordinator["Coordinator (Raspberry Pi)"]
        GUI["GUI / Path Planner"]
        SH["SerialHandler\n(QThread)"]
        GUI -->|MoveCommand list| SH
    end

    subgraph Server["Server (Motherboard ESP32)"]
        ST["SerialTask"]
        CT["CommunicatorTask"]
        ET["ElectromagnetTask"]
        ST -->|CommandMessage| CT
        CT -->|GUIStatus| ST
    end

    subgraph Bots["MiniBot #1 ... #34 (ESP32-C3)"]
        COMM["EspNowCommunicator"]
        KIN["KinematicsController"]
        PE["PositionEstimator"]
        COMM -->|MotionCommand| KIN
        COMM -->|sync time| PE
    end

    SH -->|"Serial CSV Commands"| ST

CSV Protocol (Host to Server)

All messages are prefixed with >. The Server parses these and forwards the appropriate ESP-NOW message to the targeted bot(s).

TypeDirectionFormat
0Host to ESP32>0,{id},{mode},{duty1},{duty2} -- motor test
1Host to ESP32>1,{id},{x},{y},{theta_rad},{duration_ms} -- position command
2Host to ESP32>2,{id} -- position request
3ESP32 to Host>3,{id},{x},{y},{theta_rad},{timestamp_ms},{battery_v} -- ACK
4ESP32 to Host>4,{id},{err_type},{timestamp_ms} -- NACK
5Host to ESP32>5,{id} -- mag field request
6ESP32 to Host>6,{id},{bx},{by},{bz},{timestamp_ms} -- mag field response
7Host to ESP32>7 -- sync broadcast
254Host to ESP32>254,{0 or 1} -- electromagnet enable/disable
255Both>255 -- ping/pong

Theta is transmitted in radians on the wire. The Coordinator converts internally; all application-level code uses degrees.

ESP-NOW Protocol (Server to MiniBots)

Binary packed structs defined in ESPNowMessages.h (Server) and messages_espnow.h (MiniBot). Key message types: PositionCommand, MotTestCommand, PositionRequest, PosSync, AckMessage, NackMessage, MagneticFieldRequest, MagneticFieldResponse.


Server-Bot Sync

Before a localization measurement can be taken, every MiniBot needs to know precisely when the electromagnet frame will begin so it can timestamp its magnetometer samples against a common reference.

Initiating a sync is triggered by the Coordinator sending a >7 sync command. The Server's CommunicatorTask handles it as follows:

  1. A PosSyncCommand is broadcast to all bots. The message includes a timeout indicating how long the bots should stay awake listening for the frame.
  2. After a short delay, the Server sends a rapid burst of PosSync pulses. Each carries a next_frame_us field indicating how many microseconds until the electromagnet frame starts.
  3. The ElectromagnetTask fires the frame immediately after the burst completes.

On each MiniBot, when PosSyncCommand is received, EspNowCommunicator sets a deadline and raises waiting_for_pos_sync. The ESP-NOW receive callback captures a high-resolution timestamp the instant each PosSync pulse arrives, before any further processing. The task keeps only the earliest-arriving pulse from the burst — minimum latency gives the best timing accuracy. The estimated frame start is receive_time + next_frame_us from that best pulse.

Once the deadline passes, the bot calls PositionEstimator_SetSyncTime() with the estimated frame-start, then sends an ACK with a small random delay to spread simultaneous responses from many bots. If no pulse arrived in time, it sends ERR_SYNC_TIMEOUT.

Radio duty cycling is tied to sync health. After a successful sync, each bot enables duty cycling to save power. If sync becomes stale, the radio reverts to always-on so the Server can reach the bot to re-establish sync.


Localization

The Server fires each electromagnet in sequence as part of a repeating frame. Each slot has a brief forward and reverse pulse to produce a detectable field, with a known timing offset between slots.

On each MiniBot, PositionEstimator_SensorTask reads the magnetometer continuously. Once a valid sync time is set, it timestamps each sample relative to the frame start and assigns samples to their electromagnet slot by timing alone.

Once a complete frame is collected, PositionEstimator_CalcTask performs trilateration using the field strength readings from the closest electromagnets and their known board positions. This yields an (x, y, orientation) estimate with a confidence score, which is used to weight a low-pass filter before the result is committed to the robot's true pose via robot.setTruePose().


PCB and CAD

Current board designs are in pcbs/:

  • pcbs/MiniBot_MainBoard/ -- MiniBot PCB (ESP32-C3, stepper drivers, magnetometer, LiPo charger)
  • pcbs/Server_Motherboard/ -- Motherboard (ESP32-C3, electromagnet drivers, connectors)

Gerber files are in the GERBERS/ subdirectory of each board folder.

CAD (OnShape): https://cad.onshape.com/documents/4f8eaef75458146767928ab5/w/f159d6d65b9091531e1ead34/e/13b51722310f27710438c727


Firmware

Each firmware project has its own README with task breakdowns, key objects, and build instructions.

  • firmware/MiniBot_Coordinator/ -- Python/PyQt6 host application
  • firmware/MiniBot_Server/ -- ESP32 motherboard firmware (PlatformIO)
  • firmware/MiniBot_StepperClient/ -- ESP32-C3 per-bot firmware (PlatformIO)

Parts

60
QtyValueFootprintReferences
100.1uFCapacitor_SMD:C_0402_1005MetricC2, C4, C5, C6, C9, C15, C16, C19, C20, C23
610kResistor_SMD:R_0402_1005MetricR3, R4, R5, R6, R9, R12
41Resistor_SMD:R_0402_1005MetricR18, R19, R22, R23
45.1kResistor_SMD:R_0402_1005MetricR1, R2, R14, R15
31kResistor_SMD:R_0402_1005MetricR13, R16, R20
3390kResistor_SMD:R_0402_1005MetricR7, R10, R11
34.7uFCapacitor_SMD:C_0402_1005MetricC1, C8, C10
210uFCapacitor_SMD:C_0402_1005MetricC17, C21
222nFCapacitor_SMD:C_0402_1005MetricC18, C22
247kResistor_SMD:R_0402_1005MetricR24, R25
2EVP-AWBD4Aminibot:EVPAWBD4AS2, S3
2Jumper_3_Bridged12Jumper:SolderJumper-3_P1.3mm_Bridged12_RoundedPad1.0x1.5mmJP1, JP2
2STSPIN220Package_DFN_QFN:VQFN-16-1EP_3x3mm_P0.5mm_EP1.8x1.8mmU4, U5
2TestPointTestPoint:TestPoint_Pad_D1.0mmTP1, TP2
112.4kResistor_SMD:R_0402_1005MetricR8
11uFCapacitor_SMD:C_0402_1005MetricC3
1560pFCapacitor_SMD:C_0402_1005MetricC7
1Conn_01x02Connector_JST:JST_PH_S2B-PH-K_1x02_P2.00mm_HorizontalJ2
1Conn_01x08Connector_Molex:Molex_PicoBlade_53047-0810_1x08_P1.25mm_VerticalJ1
1EASV2010RWA0minibot:EASV2010RWA0LED1
1ESP32-C3-MINI-1-H4Xminibot:ESP32C3MINI1H4XU1
1GSB1C41110SSHRminibot:GSB1C41110SSHRJ3
1LInductor_SMD:L_0805_2012MetricL1
1MCP73832-2-OTPackage_TO_SOT_SMD:SOT-23-5U3
1MIC23050-SYML-TRSamacSys_Parts:SON50P200X200X90-9N-DIC2
1MMC5633NJLminibot:BGA4C40P2X2_85X85X60IC1
1PCM12SMTRminibot:PCM12SMTRS1

More from DDeGonge/MiniBot

2
  • 2 layers48.8 × 50.4 mmServer Motherboard, the printed circuit board in 3D

    Server Motherboard

    DDeGonge/MiniBot

    Super cheap super tiny bots for....playing chess...

    110 parts47MIT
  • 2 layers197.5 × 33 mmCharge Case, the printed circuit board in 3D

    Charge Case

    DDeGonge/MiniBot

    Super cheap super tiny bots for....playing chess...

    42 parts47MIT

Similar boards

  • 2 layersQuad unibody placement0, the printed circuit board in 3D

    Quad unibody placement0

    ajwock/quadcopter

    Quadcopter designed and programmed thoroughly from scratch

    64 parts15
  • 2 layers220 × 300 mmTransit, the printed circuit board in 3D

    Transit

    thebenedict/seattletransit-hardware

    Schematic and PCB for a circuit board map of Seattle area public transit.

    448 parts14CERN-OHL-W-2.0
  • 4 layers60 × 31 mmGarageDoor pro, the printed circuit board in 3D

    GarageDoor pro

    nikolaus018/garageDoor-pro

    ESP32-C3 + GPS board that opens the garage door when you leave and arrive: firmware, KiCad PCB and perfboard build

    46 parts1MIT
  • 4 layers60 × 110 mmNucula v2, the printed circuit board in 3D

    Nucula v2

    zeugmaster/nucula-board

    Nucula Board: an ESP32-C3 hardware prototype with USB-C, PN7160 NFC, OLED and detachable keyboard. KiCad sources and manufacturing files.

    138 parts1CERN-OHL-S-2.0
  • 4 layers54 × 22 mmSerialTap, the printed circuit board in 3D

    SerialTap

    tfindlay-au/SerialTap

    PCB Design for a drop in UART serial tap

    46 partsCERN-OHL-P-2.0
  • 2 layers45 × 48 mmAetherpose custom, the printed circuit board in 3D

    Aetherpose custom

    thousandflame1000/aetherpose

    2026-10-18。已選方向:沿用 Arduino Nano 33 BLE 原版 ABX00030/帶針 ABX00034(LSM9DS1),製作供電與固定底板;六個穿戴位置各用一套。

    44 parts
  • 8 layers24 × 27.3 mmExpansion Card Retrofit, the printed circuit board in 3D

    Expansion Card Retrofit

    cdg66/ExAce

    Framework ExpansionFPGA acceleration module

    207 parts37CC-BY-4.0
  • 6 layers30 × 60 mmFlight Computer, the printed circuit board in 3D

    Flight Computer

    Pioneer-Rocketry/Flight-Computer

    Pioneer Rocketry’s latest generation flight computer for high power, STM32-based avionics system designed for experimental high-power rockets.

    116 parts2

Questions

How big is the MiniBot PCB?

It measures 21 × 27.9 mm and has 4 copper layers, 0.8 mm thick.

What parts does the MiniBot use?

60 parts, built around the ESP32-C3-MINI-1-H4X, STSPIN220, MIC23050-SYML-TR and MMC5633NJL. 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 MiniBot KiCad files?

From the DDeGonge/MiniBot repository on GitHub, at the commit this page was made from: the board is pcbs/MiniBot_MainBoard/MiniBot.kicad_pcb and its schematic pcbs/Charge_Case/ChargePort.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

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