Skip to the content
2 layers62.8 × 62.8 mmSwarm robot project, the printed circuit board in 3D

Mach swarm robot (KiCad 10): STM32F103 + ESP32-C3, DRV8833, ICM-42670-P

Size
62.8 × 62.8 mm
Copper layers
2
Thickness
1.6 mm
Parts
87
Nets
92
Pads
376
Tracks, vias
741, 136
Pours
2
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
27 Oct 2026
Updated
2 Nov 2026

Overview

Swarm robot project is an open-source printed circuit board by Khoi281248, from the Khoi281248/Swarm_Robot_Hardware repository on GitHub, published under the MIT licence. It is a 2-layer board of 62.8 × 62.8 mm with 87 parts on 92 nets, routed with 741 tracks and 136 vias.

It is built around the STM32F103C8T6, ESP32-C3-WROOM-02-H4 and DRV8833PWP, with the MT3608, TPS63802DLAR and BQ24075RGT among its other parts. Its parts include 29 capacitors, 29 resistors, 7 ICs, 5 connectors and 5 switches. It belongs with the robots and motor control boards and the ESP32, STM32 and RISC-V boards of this library.

Main components

9

README

README.md

Swarm Robot – Hardware

Mạch điều khiển cho robot bầy đàn (swarm robot), thiết kế bằng KiCad 10.

Một mạch duy nhất gồm hai vi điều khiển:

  • STM32F103C8T6: điều khiển thời gian thực. Lo 2 động cơ có encoder, IMU 6 trục và đo điện áp pin.
  • ESP32-C3-WROOM-02: truyền thông không dây giữa các robot. Chip này cũng nạp firmware cho STM32 qua UART.

🔗 Firmware: Swarm_Robot_Firmware 📄 Sơ đồ nguyên lý dạng PDF (xem không cần KiCad): Swarm_robot_project.pdf

PCB 3D

Mặt trên (3D)Mặt dưới (3D)
PCB mặt trênPCB mặt dưới

Ảnh render 3D từ KiCad 10. Linh kiện xuyên lỗ J1–J4, SW3, SW5 là DNP (tự hàn) nên không hiện model 3D.

Đi dây lớp đồng (bấm để xem)
Lớp trên F.CuLớp dưới B.Cu (nhìn từ dưới)
Đi dây lớp trênĐi dây lớp dưới

Thông số mạch

Thông sốGiá trị
Kích thước62,8 × 62,8 mm, hình bát giác
Số lớp2 lớp (F.Cu tín hiệu, B.Cu nguồn/GND), dày 1,6 mm
Lỗ bắt vít4 lỗ M2 (H1–H4)
NguồnPin LiPo 1S (2000 mAh), sạc qua USB-C
Linh kiện87 footprint: 77 linh kiện SMD lắp tại JLCPCB, 6 linh kiện xuyên lỗ tự hàn (J1–J4, SW3, SW5), 4 lỗ vít

Sơ đồ khối

text
 USB-C (J5) ──┬── D+/D- ── USBLC6 (U7) ──────────────► ESP32-C3 (USB Serial/JTAG)
              │
              └── VBUS ──► BQ24075 (U3) ◄──► Pin LiPo 1S (J4)
                           sạc + power-path
                                │ VOUT   (SW5: bật/tắt nguồn)
                  ┌─────────────┴──────────────┐
                  ▼                            ▼
          TPS63802 (U1)                 MT3608 (U2) + SS34 (D1)
          buck-boost → +3,3 V           boost → +6 V
                  │                            │
   STM32, ESP32-C3, IMU, encoder         DRV8833 (U4) ──► Motor A (J1), Motor B (J2)

   ESP32-C3 ── UART (TX_ESP / RX_ESP) ──► STM32F103 ── I2C ──► ICM-42670-P (MT1)
   ESP32-C3 ── NRST, BOOT0 ────────────► STM32F103 ── PWM ──► DRV8833
                                         STM32F103 ◄── encoder A/B ── J1, J2

Linh kiện chính

Ký hiệuLinh kiệnChức năngMã LCSC
U5STM32F103C8T6Vi điều khiển chính, thạch anh 16 MHz (Y1)C8734
U6ESP32-C3-WROOM-02Wi-Fi / ESP-NOW, nạp code qua USB-CC2934560
U4DRV8833PWPDriver 2 động cơ DC, giới hạn dòng khoảng 1 A/kênh (R17, R18 = 0,2 Ω)C50506
MT1ICM-42670-PIMU 6 trục (gia tốc + con quay), giao tiếp I2CC3288646
U3BQ24075RGTSạc pin LiPo 1S có power-pathC15464
U1TPS63802DLARBuck-boost tạo +3,3 VC2845237
U2MT3608Boost tạo +6 V cho động cơC84817
U7USBLC6-2SC6Chống tĩnh điện (ESD) cho đường USBC7519

Danh sách đầy đủ: production/BOM_JLCPCB.csv.

Đầu nối, nút bấm, đèn

Ký hiệuLoạiChức năng
J1, J2JST PH 6 chân 2,0 mmMotor A, Motor B: 2 dây động cơ, 3,3 V, GND, encoder A/B
J3Header 4 chân 2,54 mmSWD nạp/debug STM32: 3,3 V, SWDIO, SWCLK, GND
J4JST PH 2 chân 2,0 mmPin LiPo 1S
J5USB-CSạc pin, nạp code và debug ESP32-C3
SW1Nút nhấnReset STM32 (NRST)
SW2Nút nhấnReset ESP32-C3 (EN)
SW3Công tắc gạtChọn BOOT0 của STM32 (chạy chương trình / bootloader)
SW4Nút nhấnBOOT ESP32-C3 (IO9), giữ khi reset để vào chế độ nạp
SW5Công tắc gạtBật/tắt nguồn (chân SYSOFF của BQ24075)
D2LED đỏBáo đang sạc (chân CHG của BQ24075), tắt khi sạc đầy hoặc không cắm USB
D4LED đỏLED do STM32 điều khiển

Lưu ý về nguồn và sạc

  • Cắm USB-C thì động cơ tắt (có chủ đích). Chân PGOOD của BQ24075 nối vào EN của MT3608 và nSLEEP của DRV8833. Khi có nguồn USB, mạch boost +6 V tắt và DRV8833 ngủ, để dòng vào dành cho sạc pin. Muốn test động cơ thì rút USB, chạy bằng pin.
  • Muốn sạc pin phải gạt SW5 sang ON. Khi SW5 ở OFF (SYSOFF mức cao), BQ24075 tắt cả việc sạc. Nếu lúc đó cắm USB thì robot vẫn chạy bằng nguồn USB nhưng pin không được sạc.

Sơ đồ chân vi điều khiển và cấu hình ngoại vi: xem stm32/docs/CAU_HINH.md và esp32/docs/CAU_HINH.md trong repo firmware.

Mở project

  1. Cài KiCad 10 trở lên. File được lưu bằng KiCad 10.0.7, nên KiCad 9 trở xuống không mở được.
  2. Clone repo:
    bash
    gh repo clone Khoi281248/Swarm_Robot_Hardware
  3. Mở Swarm_robot_project.kicad_pro bằng KiCad.

Thư viện riêng của project được khai báo bằng đường dẫn tương đối ${KIPRJMOD}/Libraries/... trong sym-lib-table và fp-lib-table. Vì vậy không cần cài thêm thư viện. Model 3D chuẩn lấy từ thư viện có sẵn của KiCad 10.

Cấu trúc thư mục

text
Swarm_Robot_Hardware/
├── Swarm_robot_project.kicad_pro   Project KiCad
├── Swarm_robot_project.kicad_sch   Sơ đồ nguyên lý
├── Swarm_robot_project.kicad_pcb   Mạch in (PCB)
├── Swarm_robot_project.pdf         Sơ đồ nguyên lý dạng PDF
├── sym-lib-table, fp-lib-table     Khai báo thư viện riêng của project
├── Libraries/
│   ├── Symble/                     Symbol riêng (DRV8833, ICM-42670-P, TPS63802...)
│   ├── Footprint.pretty/           Footprint riêng
│   └── 3D_models/                  Model 3D (.step) riêng
├── production/
│   ├── BOM_JLCPCB.csv              Danh sách linh kiện kèm mã LCSC
│   └── CPL_JLCPCB.csv              Toạ độ đặt linh kiện
├── Datasheet/                      Datasheet PDF của các IC chính
└── docs/                           Ảnh PCB, logo

Datasheet

Bản PDF lưu trong thư mục Datasheet/ để tra cứu nhanh, đúng phiên bản nhóm đã dùng khi thiết kế. Bản mới nhất có thể tải từ trang của hãng (bản quyền thuộc về hãng sản xuất):

Linh kiệnTrong repoTrang hãng
STM32F103C8DS_stm32f103c8.pdfDatasheet
STM32F103 (reference manual RM0008)rm0008-...pdfRM0008
ESP32-C3-WROOM-02esp32-c3-wroom-02_datasheet_en.pdfDatasheet
DRV8833drv8833.pdfDatasheet
BQ24075 (cùng họ BQ2407x)bq24074.pdfDatasheet
TPS63802tps63802.pdfDatasheet
ICM-42670-PDS-000451-ICM-42670-P-v1.0.pdfTrang sản phẩm TDK
MT3608MT3608.pdfLCSC C84817
USBLC6-2SC6–Datasheet

Làm việc nhóm

  1. Mỗi lúc chỉ một người sửa file .kicad_pcb. Hai bản PCB sửa song song gần như không gộp được. Báo cả nhóm trước khi bắt đầu route.

  2. Commit message bắt đầu bằng phần bị sửa:

    • sch: sơ đồ nguyên lý
    • pcb: mạch in
    • lib: thư viện
    • prod: file sản xuất
    • docs: tài liệu

    Ví dụ: pcb: sua 2 loi DRC clearance gan U4.

  3. Sửa sơ đồ nguyên lý xong thì xuất lại PDF (File → Plot → PDF), commit cùng lúc.

  4. Thêm linh kiện mới: đặt symbol, footprint, model 3D vào Libraries/ và dẫn đường dẫn bằng ${KIPRJMOD}. Không trỏ tới file nằm ngoài repo.

  5. Chạy ERC (sơ đồ) và DRC (PCB) trước khi push, đảm bảo không có lỗi mới.

  6. Khi gửi mạch đi sản xuất:

    • Xuất lại BOM/CPL vào production/.
    • Tạo GitHub Release (ví dụ v1.0) và đính kèm file Gerber .zip. Gerber không commit vào repo.

Tiến độ

Hạng mụcTrạng thái
Sơ đồ nguyên lý✅ Xong
Bố trí linh kiện✅ Xong
Đi dây (routing)✅ Xong (2 lớp, 135 via, 0 chân chưa nối)
Kiểm tra DRC✅ Không còn lỗi, schematic và PCB đồng bộ
Xuất Gerber, BOM, CPL✅ Xong (Gerber đính kèm ở mục Releases)
Đặt mạch JLCPCB, lắp ráp, test⏳ Chưa làm

Giấy phép

Thiết kế phát hành theo giấy phép MIT. Giấy phép MIT không áp dụng cho datasheet trong Datasheet/ và thư viện, model 3D của hãng; các tài liệu này thuộc bản quyền của nhà sản xuất.

Parts

87
QtyValueFootprintReferences
1110kResistor_SMD:R_0402_1005MetricR5, R10, R11, R14, R15, R19, R20, R21, R22, R27, R28
9100nFCapacitor_SMD:C_0402_1005MetricC3, C15, C16, C17, C18, C22, C23, C28, C29
610uFCapacitor_SMD:C_0805_2012MetricC4, C5, C8, C12, C14, C24
422uFCapacitor_SMD:C_0805_2012MetricC2, C6, C7, C9
4MountingHoleMountingHole:MountingHole_2.2mm_M2H1, H2, H3, H4
3100kResistor_SMD:R_0402_1005MetricR1, R25, R26
310nFCapacitor_SMD:C_0402_1005MetricC10, C13, C19
31uFCapacitor_SMD:C_0603_1608MetricC1, C20, C21
3SW_PushButton_Switch_SMD:SW_SPST_TS-1088-xR025SW1, SW2, SW4
20.2Resistor_SMD:R_1206_3216MetricR17, R18
21.2kResistor_SMD:R_0402_1005MetricR9, R12
210pFCapacitor_SMD:C_0402_1005MetricC26, C27
21kResistor_SMD:R_0402_1005MetricR13, R29
24.7KResistor_SMD:R_0402_1005MetricR6, R7
25k1Resistor_SMD:R_0402_1005MetricR23, R24
2LED_REDLED_SMD:LED_0603_1608MetricD2, D4
10.47uHFootprint:INDC2016X120NL1
1100Resistor_SMD:R_0402_1005MetricR16
1120RInductor_SMD:L_0603_1608MetricFB1
116MHzCrystal:Crystal_SMD_3225-4Pin_3.2x2.5mmY1
11uFCapacitor_SMD:C_0402_1005MetricC25
12.2uFCapacitor_SMD:C_0603_1608MetricC11
1200kResistor_SMD:R_0402_1005MetricR2
122kResistor_SMD:R_0402_1005MetricR8
14.7uHFootprint:WE-PD2_5848L2
147kResistor_SMD:R_0402_1005MetricR3
156kResistor_SMD:R_0402_1005MetricR4
1BQ24075RGTPackage_DFN_QFN:VQFN-16-1EP_3x3mm_P0.5mm_EP1.6x1.6mm_ThermalViasU3
1DRV8833PWPPackage_SO:HTSSOP-16-1EP_4.4x5mm_P0.65mm_EP3.4x5mm_Mask2.46x2.31mm_ThermalViasU4
1ESP32-C3-WROOM-02RF_Module:ESP32-C3-WROOM-02U6
1ICM-42670-PFootprint:XDCR_ICM-42670-PMT1
1Lipo_2000mAhConnector_JST:JST_PH_B2B-PH-K_1x02_P2.00mm_VerticalJ4
1MT3608Package_TO_SOT_SMD:SOT-23-6U2
1Motor_AConnector_JST:JST_PH_B6B-PH-K_1x06_P2.00mm_VerticalJ1
1Motor_BConnector_JST:JST_PH_B6B-PH-K_1x06_P2.00mm_VerticalJ2
1SS34Diode_SMD:D_SMAD1
1STM32F103C8T6Package_QFP:LQFP-48_7x7mm_P0.5mmU5
1SWConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ3
1SW_POWERButton_Switch_THT:SW_Slide_SPDT_Straight_CK_OS102011MS2QSW5
1SW_SPDTButton_Switch_THT:SW_Slide_SPDT_Straight_CK_OS102011MS2QSW3
1TPS63802DLARFootprint:VREG_TPS63802DLARU1
1USBLC6-2SC6Package_TO_SOT_SMD:SOT-23-6U7
1USB_C_Receptacle_USB2.0_16PConnector_USB:USB_C_Receptacle_HRO_TYPE-C-31-M-12J5

Similar boards

  • 2 layers83.7 × 53.7 mmNode Analog, the printed circuit board in 3D

    Node Analog

    maivananh111/DoAnTotNghiep

    LoRaWAN wireless sensor network

    131 parts
  • 4 layers46.3 × 38.6 mmRrr, the printed circuit board in 3D

    Rrr

    PositiveAltitude/rrr-hardware

    77 parts10
  • 4 layers82 × 54.2 mmSecure edge logger, the printed circuit board in 3D

    Secure edge logger

    landjas09/Secure-Ready-Battery-Powered-Edge-Logger

    Custom ESP32-C3 Secure-Ready Battery-Powered Edge Logger with environmental, light and acoustic sensing, local storage, DS3231 RTC, BQ27441 fuel gauging, SE050E2 secure element and TPS63802 buck-boost power.

    109 parts
  • 4 layers60 × 37 mmRevolute, the printed circuit board in 3D

    Revolute

    tongtongwang86/Revolute

    NRF52833 Based ScrollWheel Key

    53 parts5
  • 4 layers70 × 99.9 mmMicromouse, the printed circuit board in 3D

    Micromouse

    UBIEEE/FrankenMouse

    FrankenMouse is a MicroMouse robot that was designed, built, and programmed from scratch by members of the University at Buffalo's IEEE Student Branch.

    100 parts6MIT
  • 2 layers100 × 100.1 mmDiploma, the printed circuit board in 3D

    Diploma

    t3ry4git/stm32Co2

    A simple CO2 and environmental monitor based on the STM32F103C8 microcontroller. The firmware reads temperature and humidity from a DHT22 sensor, measures CO2 concentration using an MHZ19B module and displays values on…

    62 parts
  • 4 layers65 × 65.5 mmTiltbox, the printed circuit board in 3D

    Tiltbox

    Freek-Freak/tiltbox-kicad

    kicad files voor tiltbox

    225 parts
  • 2 layers60 × 40.5 mmEnvironmental Monitoring Node, the printed circuit board in 3D

    Environmental Monitoring Node

    kothanikhil9/Environmental-Monitoring-Node

    The system continuously measures environmental temperature using a digital sensor and processes the data through a microcontroller.

    35 parts

Questions

How big is the Swarm robot project PCB?

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

What parts does the Swarm robot project use?

87 parts, built around the STM32F103C8T6, ESP32-C3-WROOM-02-H4, DRV8833PWP and MT3608. 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 Swarm robot project KiCad files?

From the Khoi281248/Swarm_Robot_Hardware repository on GitHub, at the commit this page was made from: the board is Swarm_robot_project.kicad_pcb and its schematic Swarm_robot_project.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Swarm robot project 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).