

SG SGMB
The SG-SGMB (SpiderGwen MotherBoard) is the embedded controller board at the heart of the SpiderGwen hexapod. It handles all real-time motor control and sensor interfacing, offloading these low-latency tasks from the…
- Size
- 56 × 85 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 66
- Nets
- 128
- Pads
- 370
- Tracks, vias
- 582, 158
- Pours
- 3
- Routed
- Yes
- KiCad
- KiCad 10.0 (file 20260206)
- Created
- 13 May 2026
- Updated
- 8 Jun 2026
Overview
SG SGMB is an open-source printed circuit board by WAAAJIAN, from the WAAAJIAN/SG-SGMB repository on GitHub. It is a 2-layer board of 56 × 85 mm with 66 parts on 128 nets, routed with 582 tracks and 158 vias.
It is built around the ESP32-S3-WROOM-1-N8, MPU-6050 and LESD5D5.0CT1G, with the AO3401A among its other parts. Its parts include 22 capacitors, 19 resistors, 10 connectors, 4 ICs and 4 diodes. It belongs with the ESP32 boards of this library.
Main components
4ESP32-S3-WROOM-1-N8
SMD,25.5x18mm-40℃~+85℃ -98.2dBm 2.4GHz 20.5dBm 355mA 3V~3.6V 95mA Bluetooth5.0 ESP32-S3 Chip On-board PCB Antenna UART、SPI、I2C、I2S、USB SMD,25.5x18mm WiFi Modules ROHSEspressif SystemsWiFi ModulesMPU-6050
QFN-24-EP(4x4)-40℃~+85℃ 16bit 1KB 2.375V~3.46V 5uA Accelerometer Gyroscope I2C X,Y,Z X,Y,Z ±16g ±2000dps QFN-24-EP(4x4) Accelerometers ROHSTDK InvenSenseAccelerometersLESD5D5.0CT1G
SOD-523-55℃~+150℃ 100W 12pF 16V 1uA 5V 7A 7V Bidirectional ESD IEC 61000-4-2 SOD-523 ESD and Surge Protection (TVS/ESD) ROHSGOODWORKUncategorisedAO3401A
SOT-231 P-Channel 14nC@10V 30V 47mΩ@10V、60mΩ@4.5V、85mΩ@2.5V 4A 55pF 645pF 80pF 900mV SOT-23 MOSFETs ROHSAlpha & Omega SemiconductorMOSFETs
README
README.mdSG-SGMB — SpiderGwen MotherBoard
Part of the SpiderGwen Hexapod Project Hardware design for the ESP32-S3-WROOM-1 based motor controller and sensor hub board.
Overview
The SG-SGMB (SpiderGwen MotherBoard) is the embedded controller board at the heart of the SpiderGwen hexapod. It handles all real-time motor control and sensor interfacing, offloading these low-latency tasks from the Raspberry Pi brain. It physically stacks onto the Raspberry Pi via the 40-pin GPIO header and communicates over SPI0.
Power is supplied externally by the SG-SGPB (SpiderGwen Power Board), which converts the 2S LiPo battery voltage into the servo and logic rails used by this board.
Hardware
| Component | Part | Function |
|---|---|---|
| MCU | ESP32-S3-WROOM-1U | Main processor, Wi-Fi/BLE |
| USB-to-UART Bridge | CP2102N (QFN-28) | USB-C programming interface |
| Servo Line Driver | SN74LVC2G241 (VSSOP-8) | Half-duplex TX/RX isolation for servo bus |
| IMU | MPU-6050 (QFN-24) | 6-axis gyro + accelerometer, I²C |
| LDO Regulator | SGM2212-3.3 (SOT-223) | 3.3V rail from USB-C VBUS (programming only) |
| Host Interface | RPi 2×20 stacking header | Physical mount + SPI0 to Raspberry Pi |
| Foot Switches | 6× Microswitches | Foot contact detection |
| ESD Protection | LESD5D5.0CT1G (SOD-523) | USB D+/D− line protection |
| Power Switch | AO3401A (P-ch MOSFET, SOT-23) | Power path switching |
| Auto-Reset | L8050QLT1G (NPN, SOT-23) × 2 | DTR/RTS-controlled CHIP_PU / GPIO0 |
Power Architecture
Power is sourced from the SG-SGPB via a 6-pin connector. When programming via USB-C, the SGM2212 LDO provides 3.3V locally from VBUS.
| Rail | Source | Consumers |
|---|---|---|
| +7.4V (servo) | SG-SGPB | ST3215 servos (×18) via servo connectors |
| +5V | SG-SGPB or RPi 40-pin header (pins 2/4) | Board logic |
| +3.3V (ESP) | ESP32-S3 internal regulator (from +5V) | MCU, IMU, logic |
| +3.3V (LDO) | SGM2212 from USB-C VBUS | CP2102N, programming circuit only |
Pin Mapping
Servo Bus (ST3215 — Half-Duplex UART via SN74LVC2G241)
| ESP32 Pin | GPIO | Function |
|---|---|---|
| Pin 10 | IO17 | UART1 TX → servo bus |
| Pin 11 | IO18 | UART1 RX ← servo bus |
| Pin 4 | IO4 | SERVO_DIR — tri-buffer output enable |
TX and RX share a single wire per the ST3215-7.4V protocol. The SN74LVC2G241 dual tri-state buffer prevents the receiver from seeing TX echoes during transmission. IO4 switches direction.
IMU — MPU-6050 (I²C, addr 0x68)
| ESP32 Pin | GPIO | Function |
|---|---|---|
| Pin 5 | IO5 | I²C SCL |
| Pin 6 | IO6 | I²C SDA |
AD0 tied low → address 0x68. Enable internal pull-ups in firmware for the I²C lines.
Raspberry Pi Interface — SPI0 (via 2×20 stacking header)
| ESP32 Pin | GPIO | RPi SPI0 Signal | RPi Pin |
|---|---|---|---|
| Pin 18 | IO10 | CE0 | Pin 24 |
| Pin 19 | IO11 | MOSI | Pin 19 |
| Pin 20 | IO12 | CLK | Pin 23 |
| Pin 21 | IO13 | MISO | Pin 21 |
The board physically mounts on the RPi via the 40-pin stacking header. +5V is drawn from the RPi (pins 2/4) when tethered without the SGPB.
Foot Microswitches
| ESP32 Pin | GPIO | Switch |
|---|---|---|
| Pin 7 | IO7 | SWITCH_0 |
| Pin 8 | IO15 | SWITCH_1 |
| Pin 9 | IO16 | SWITCH_2 |
| Pin 12 | IO8 | SWITCH_3 |
| Pin 17 | IO9 | SWITCH_4 |
| Pin 22 | IO14 | SWITCH_5 |
Each switch has a capacitor for hardware debouncing. Enable internal pull-ups in firmware — switches are active-low.
Programmer (CP2102N — USB-C)
| CP2102N Signal | ESP32 Signal | Function |
|---|---|---|
| TXD | ESP_RXD0 (IO44) | Serial data to ESP |
| RXD | ESP_TXD0 (IO43) | Serial data from ESP |
| DTR | CHIP_PU (EN) | Auto-reset via NPN transistor |
| RTS | GPIO0 | Boot mode select via NPN transistor |
DTR/RTS from the CP2102N drive two L8050QLT1G NPN transistors that pull down CHIP_PU and GPIO0, enabling automatic flashing without pressing buttons.
Reserved / Caution Pins
| GPIO | Note |
|---|---|
| IO0 | Strapping pin — boot mode. Controlled by programmer auto-reset circuit |
| IO3, IO45, IO46 | Flash strapping — leave floating or per datasheet |
| IO35, IO36, IO37 | SPI PSRAM lines — do not use |
| IO39–IO42 | JTAG — available for debug |
| IO43 / IO44 | UART0 (TXD0/RXD0) — used for flashing and serial monitor |
| IO19 / IO20 | USB D−/D+ — connected to USB-C via ESD protection |
Schematic Structure
| Sheet | File | Contents |
|---|---|---|
| 1 — Overview | SG-SGMB.kicad_sch | Top-level hierarchy |
| 2 — ESP32-S3 | ESP32-S3.kicad_sch | MCU, decoupling, pin breakout |
| 3 — RPi Interface | RPi_interface.kicad_sch | 40-pin stacking header, SPI0 routing |
| 4 — Peripherals | peripherals.kicad_sch | Servo buffer, MPU-6050, microswitches |
| 5 — Power | power_routes.kicad_sch | LDO, power rail distribution from SGPB |
| 6 — Programmer | programmer.kicad_sch | USB-C, CP2102N, auto-reset circuit |
Firmware Architecture
SG-SGMB Firmware
├── servo/ # ST3215 half-duplex UART driver (SN74LVC2G241 direction control)
├── imu/ # MPU-6050 I²C driver
├── switches/ # Foot microswitch debounce logic
├── spi_slave/ # SPI0 interface to Raspberry Pi
└── main/ # Task scheduler and state machineCommunication with Raspberry Pi
The ESP32 operates as an SPI slave on SPI0. The RPi sends motion commands and reads back sensor data (IMU readings, foot switch states) over the 40-pin stacking header.
Development Setup
Requirements
- ESP-IDF v5.x or Arduino-ESP32
- USB-C cable for flashing (CP2102N auto-reset — no buttons needed)
Flash
idf.py -p /dev/ttyUSB0 flash monitorRelated Boards
| Board | Repo | Function |
|---|---|---|
| SG-SGPB | SG-SGPB/ | Power board — 2S LiPo → servo and logic rails |
| SG-RPi | SG-RPi/ | Raspberry Pi gait controller (software) |
License
MIT — see LICENSE
Parts
66| Qty | Value | Footprint | References |
|---|---|---|---|
| 13 | 0.1uF/25V | Capacitor_SMD:C_0201_0603Metric | C3, C4, C5, C6, C7, C8, C9, C11, C12, C15, C17, C18, C20 |
| 6 | 0Ω | Resistor_SMD:R_0402_1005Metric | R2, R8, R9, R13, R15, R19 |
| 6 | HCTL HC-5264-3A | Connector_PinHeader_2.54mm:HC-5264-3A | J6, J7, J9, L3, L5, L6 |
| 5 | 10uF/25V | Capacitor_SMD:C_0805_2012Metric | C2, C14, C16, C21, C22 |
| 4 | 10kΩ | Resistor_SMD:R_0402_1005Metric | R1, R6, R7, R14 |
| 3 | 5.1kΩ | Resistor_SMD:R_0603_1608Metric | R5, R17, R18 |
| 3 | LESD5D5.0CT1G | Diode_SMD:D_SOD-523 | D2, D3, D4 |
| 2 | 1uF/25V | Capacitor_SMD:C_0402_1005Metric | C1, C19 |
| 2 | 4.7kΩ | Resistor_SMD:R_0603_1608Metric | R3, R4 |
| 2 | LRC L8050QLT1G | Package_TO_SOT_SMD:SOT-23 | Q1, Q2 |
| 2 | SW_SPST | Button_Switch_SMD:SW_SPST_PTS647_Sx38 | BOOT, RESET |
| 1 | 100kΩ | Resistor_SMD:R_0603_1608Metric | R16 |
| 1 | 10nF/25V | Capacitor_SMD:C_0402_1005Metric | C10 |
| 1 | 1kΩ | Resistor_SMD:R_0603_1608Metric | R12 |
| 1 | 2.2nF/25V | Capacitor_SMD:C_0402_1005Metric | C13 |
| 1 | 22.1kΩ | Resistor_SMD:R_0603_1608Metric | R10 |
| 1 | 47.5kΩ | Resistor_SMD:R_0603_1608Metric | R11 |
| 1 | AO3401A | Package_TO_SOT_SMD:SOT-23 | Q3 |
| 1 | CP2102N-Axx-xQFN28 | Package_DFN_QFN:QFN-28-1EP_5x5mm_P0.5mm_EP3.35x3.35mm | U4 |
| 1 | Conn_01x06_Pin | Connector_Molex:Molex_Micro-Fit_3.0_43650-0600_1x06_P3.00mm_Horizontal | J12 |
| 1 | Conn_02x02_Top_Bottom | Connector_Molex:Molex_Micro-Fit_3.0_43045-0400_2x02_P3.00mm_Horizontal | J5 |
| 1 | Conn_02x04_Top_Bottom | Connector_Molex:Molex_Micro-Fit_3.0_43045-0800_2x04_P3.00mm_Horizontal | J4 |
| 1 | ESP32-S3-WROOM-1 | RF_Module:ESP32-S3-WROOM-1U | U1 |
| 1 | J1 | Connector_PinHeader_2.54mm:PinHeader_2x20_P2.54mm_Vertical | RPi4_ModelB_Stacking_Header_2x20_Pitch_2.54mm1 |
| 1 | LED | LED_SMD:LED_0603_1608Metric | D1 |
| 1 | Logic | Package_SO:VSSOP-8_3x3mm_P0.65mm | SN74LVC2G1 |
| 1 | MPU-6050 | Sensor_Motion:InvenSense_QFN-24_4x4mm_P0.5mm | U2 |
| 1 | SGM2212_3.3 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U3 |
| 1 | USB_C_Receptacle_USB2.0_16P | Connector_USB:USB_C_Receptacle_GCT_USB4085 | J13 |
Similar boards
- 4 layers68.1 × 75 mm

- 2 layers108 × 60.9 mm

MotionBoy
CaseyRasor/custom_esp32_screen_header
Custom ESP32 PCB with screen header for 4" tft display and gpio headers
57 parts - 4 layers93 × 72 mm

- 2 layers131 × 100 mm

Panel
RamRamAndroid/ESP32Drone-CodeMatrix
ESP32 Drone by CodeMatrix is a compact, WiFi-controlled drone based on the ESP32-S3 microcontroller. Designed for hobbyists, makers, and engineers, ESP32 Drone by CodeMatrix offers a simple yet powerful platform for…
182 parts1 - 2 layers150 × 100 mm

SmartCube
kokhaie/Smart-Refrigerator-Demo
The KiCad-generated BOM is mirrored into the documentation site under docs/ so it can be published through GitHub Pages.
91 parts - 2 layers100 × 100 mm

LiteWingV2.5C
Omern187/lite-wing-drone
This repository contains the current KiCad-based LiteWing prototype package: source PCB files, manufacturing outputs, assembly data, 3D reference models, firmware binaries, datasheets, and design-review records.
87 parts - 2 layers50 × 50 mm

PCB DRONE
shreejita56/XiZi-PCB-DRONE
So I made a custom PCB based on Esp32 . It holds an IMU and a Barometer for control . It has a normal 4 Motor Layout 2 motors will move clock wise and 2 will be anti-clock wise direction.
68 parts - 2 layers74.5 × 41.3 mm

Saucey
Vulcan758/Saucey-Flight-Controller-PCB
This is a design repository for an ESP32 based flight controller I made
49 parts
Questions
How big is the SG SGMB PCB?
It measures 56 × 85 mm and has 2 copper layers, 1.6 mm thick.
What parts does the SG SGMB use?
66 parts, built around the ESP32-S3-WROOM-1-N8, MPU-6050, LESD5D5.0CT1G 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 SG SGMB KiCad files?
From the WAAAJIAN/SG-SGMB repository on GitHub, at the commit this page was made from: the board is SG-SGMB.kicad_pcb and its schematic ESP32-S3.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the SG SGMB design in my own project?
Its repository states no licence, so its author keeps all rights: ask WAAAJIAN before reusing the design.