Skip to the content
2 layers56 × 85 mmSG SGMB, the printed circuit board in 3D

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

4

README

README.md

SG-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

ComponentPartFunction
MCUESP32-S3-WROOM-1UMain processor, Wi-Fi/BLE
USB-to-UART BridgeCP2102N (QFN-28)USB-C programming interface
Servo Line DriverSN74LVC2G241 (VSSOP-8)Half-duplex TX/RX isolation for servo bus
IMUMPU-6050 (QFN-24)6-axis gyro + accelerometer, I²C
LDO RegulatorSGM2212-3.3 (SOT-223)3.3V rail from USB-C VBUS (programming only)
Host InterfaceRPi 2×20 stacking headerPhysical mount + SPI0 to Raspberry Pi
Foot Switches6× MicroswitchesFoot contact detection
ESD ProtectionLESD5D5.0CT1G (SOD-523)USB D+/D− line protection
Power SwitchAO3401A (P-ch MOSFET, SOT-23)Power path switching
Auto-ResetL8050QLT1G (NPN, SOT-23) × 2DTR/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.

RailSourceConsumers
+7.4V (servo)SG-SGPBST3215 servos (×18) via servo connectors
+5VSG-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 VBUSCP2102N, programming circuit only

Pin Mapping

Servo Bus (ST3215 — Half-Duplex UART via SN74LVC2G241)

ESP32 PinGPIOFunction
Pin 10IO17UART1 TX → servo bus
Pin 11IO18UART1 RX ← servo bus
Pin 4IO4SERVO_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 PinGPIOFunction
Pin 5IO5I²C SCL
Pin 6IO6I²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 PinGPIORPi SPI0 SignalRPi Pin
Pin 18IO10CE0Pin 24
Pin 19IO11MOSIPin 19
Pin 20IO12CLKPin 23
Pin 21IO13MISOPin 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 PinGPIOSwitch
Pin 7IO7SWITCH_0
Pin 8IO15SWITCH_1
Pin 9IO16SWITCH_2
Pin 12IO8SWITCH_3
Pin 17IO9SWITCH_4
Pin 22IO14SWITCH_5

Each switch has a capacitor for hardware debouncing. Enable internal pull-ups in firmware — switches are active-low.

Programmer (CP2102N — USB-C)

CP2102N SignalESP32 SignalFunction
TXDESP_RXD0 (IO44)Serial data to ESP
RXDESP_TXD0 (IO43)Serial data from ESP
DTRCHIP_PU (EN)Auto-reset via NPN transistor
RTSGPIO0Boot 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

GPIONote
IO0Strapping pin — boot mode. Controlled by programmer auto-reset circuit
IO3, IO45, IO46Flash strapping — leave floating or per datasheet
IO35, IO36, IO37SPI PSRAM lines — do not use
IO39–IO42JTAG — available for debug
IO43 / IO44UART0 (TXD0/RXD0) — used for flashing and serial monitor
IO19 / IO20USB D−/D+ — connected to USB-C via ESD protection

Schematic Structure

SheetFileContents
1 — OverviewSG-SGMB.kicad_schTop-level hierarchy
2 — ESP32-S3ESP32-S3.kicad_schMCU, decoupling, pin breakout
3 — RPi InterfaceRPi_interface.kicad_sch40-pin stacking header, SPI0 routing
4 — Peripheralsperipherals.kicad_schServo buffer, MPU-6050, microswitches
5 — Powerpower_routes.kicad_schLDO, power rail distribution from SGPB
6 — Programmerprogrammer.kicad_schUSB-C, CP2102N, auto-reset circuit

Firmware Architecture

text
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 machine

Communication 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

Flash

bash
idf.py -p /dev/ttyUSB0 flash monitor

Related Boards

BoardRepoFunction
SG-SGPBSG-SGPB/Power board — 2S LiPo → servo and logic rails
SG-RPiSG-RPi/Raspberry Pi gait controller (software)

License

MIT — see LICENSE

Parts

66
QtyValueFootprintReferences
130.1uF/25VCapacitor_SMD:C_0201_0603MetricC3, C4, C5, C6, C7, C8, C9, C11, C12, C15, C17, C18, C20
60ΩResistor_SMD:R_0402_1005MetricR2, R8, R9, R13, R15, R19
6HCTL HC-5264-3AConnector_PinHeader_2.54mm:HC-5264-3AJ6, J7, J9, L3, L5, L6
510uF/25VCapacitor_SMD:C_0805_2012MetricC2, C14, C16, C21, C22
410kΩResistor_SMD:R_0402_1005MetricR1, R6, R7, R14
35.1kΩResistor_SMD:R_0603_1608MetricR5, R17, R18
3LESD5D5.0CT1GDiode_SMD:D_SOD-523D2, D3, D4
21uF/25VCapacitor_SMD:C_0402_1005MetricC1, C19
24.7kΩResistor_SMD:R_0603_1608MetricR3, R4
2LRC L8050QLT1GPackage_TO_SOT_SMD:SOT-23Q1, Q2
2SW_SPSTButton_Switch_SMD:SW_SPST_PTS647_Sx38BOOT, RESET
1100kΩResistor_SMD:R_0603_1608MetricR16
110nF/25VCapacitor_SMD:C_0402_1005MetricC10
11kΩResistor_SMD:R_0603_1608MetricR12
12.2nF/25VCapacitor_SMD:C_0402_1005MetricC13
122.1kΩResistor_SMD:R_0603_1608MetricR10
147.5kΩResistor_SMD:R_0603_1608MetricR11
1AO3401APackage_TO_SOT_SMD:SOT-23Q3
1CP2102N-Axx-xQFN28Package_DFN_QFN:QFN-28-1EP_5x5mm_P0.5mm_EP3.35x3.35mmU4
1Conn_01x06_PinConnector_Molex:Molex_Micro-Fit_3.0_43650-0600_1x06_P3.00mm_HorizontalJ12
1Conn_02x02_Top_BottomConnector_Molex:Molex_Micro-Fit_3.0_43045-0400_2x02_P3.00mm_HorizontalJ5
1Conn_02x04_Top_BottomConnector_Molex:Molex_Micro-Fit_3.0_43045-0800_2x04_P3.00mm_HorizontalJ4
1ESP32-S3-WROOM-1RF_Module:ESP32-S3-WROOM-1UU1
1J1Connector_PinHeader_2.54mm:PinHeader_2x20_P2.54mm_VerticalRPi4_ModelB_Stacking_Header_2x20_Pitch_2.54mm1
1LEDLED_SMD:LED_0603_1608MetricD1
1LogicPackage_SO:VSSOP-8_3x3mm_P0.65mmSN74LVC2G1
1MPU-6050Sensor_Motion:InvenSense_QFN-24_4x4mm_P0.5mmU2
1SGM2212_3.3Package_TO_SOT_SMD:SOT-223-3_TabPin2U3
1USB_C_Receptacle_USB2.0_16PConnector_USB:USB_C_Receptacle_GCT_USB4085J13

Similar boards

  • 4 layers68.1 × 75 mmHomefire, the printed circuit board in 3D

    Homefire

    JhanqueliX/Smart-light-socket-for-fire-prevention

    117 parts1
  • 2 layers108 × 60.9 mmMotionBoy, the printed circuit board in 3D

    MotionBoy

    CaseyRasor/custom_esp32_screen_header

    Custom ESP32 PCB with screen header for 4" tft display and gpio headers

    57 parts
  • 4 layers93 × 72 mmPresstimer, the printed circuit board in 3D

    Presstimer

    mrksn/presstimer

    89 parts
  • 2 layers131 × 100 mmPanel, the printed circuit board in 3D

    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 mmSmartCube, the printed circuit board in 3D

    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 mmLiteWingV2.5C, the printed circuit board in 3D

    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 mmPCB DRONE, the printed circuit board in 3D

    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 mmSaucey, the printed circuit board in 3D

    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.