Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/MuShibo/Micro-Wheeled_leg-Robot/llms.txt

Use this file to discover all available pages before exploring further.

The Micro Wheeled-Leg Robot is built around four custom PCBs, all designed in LCEDA (EasyEDA Pro). Together they handle motor drive, position sensing, inertial measurement, and servo bus communication. Each board ships Gerber files, a component BOM in CSV format, and the original EasyEDA JSON source so you can modify and re-order them freely. The sections below describe each board’s role, key components, and connector pinout.

Controller PCB

ESP32-WROOM-32 main MCU paired with two L6234PD013TR 3-phase BLDC motor driver ICs, USB programming via CH340C, and all inter-board connectors.

Encoder PCB

AS5600 12-bit magnetic rotary encoder, one board per motor. Communicates with the Controller over I2C via a GH1.25 4-pin cable.

IMU PCB

MPU6050 6-axis inertial sensor (3-axis accelerometer + 3-axis gyroscope) sharing the right-side I2C bus with the right encoder.

Servo Debug PCB

Half-duplex UART converter that bridges the ESP32’s full-duplex Serial2 to the single-wire TTL bus required by the FEETECH STS3032 leg servos.

Controller PCB

The Controller PCB (2.Hardware/1.ControllerPCB/) is the brain of the robot. It hosts the ESP32 module, both BLDC motor drivers, USB programming circuitry, power regulation, and all connectors to the other boards and peripherals.

Key ICs

ReferencePartPackageFunction
U5ESP32-WROOM-32ModuleMain MCU — dual-core 240 MHz, WiFi/BT, 34 usable GPIOs
U1, U4L6234PD013TRPOWESO-20ST 3-phase brushless motor driver (2 channels)
U7CH340CTSOT-23-8USB-to-UART bridge for Arduino/USB programming
U11AMS1117-3.3SOT-2233.3 V LDO linear regulator
Q1, Q2SS8050SOT-23NPN transistors — motor enable logic
Q3SS8550SOT-23PNP transistor — motor enable logic

Passives and Indicators

ReferenceValue / PartFunction
L14.7 µH inductorPower supply filter
C3, C5100 µF electrolytic (TAJD107M020RNJ)Bulk decoupling
R7 / R8100 kΩ / 40.2 kΩBattery voltage divider → GPIO 35 ADC
LED1Red, 0805Power indicator
LED2Blue, 0805Battery level indicator (GPIO 13)
KEY1K2-1107STEN (reset) button
KEY2K2-1107STBOOT (flash mode) button

Connectors

ReferencePart NumberTypeSignals
USB2Micro-USB BProgramming / debugUSB D+, D− → CH340C
H3HX25003-3WAP3-pin JST-PHBattery input + motor phase alternates
J2, J4HDR-M-2.54_1x44-pin 2.54 mm headerI2C / encoder connections
J1, J3HDR-M-2.54_1x33-pin 2.54 mm headerSerial2 / servo and auxiliary signals
CN3, CN5A1257WV-S-4PGH1.25 4-pinEncoder and IMU GH1.25 cable connections

Source Files

FileDescription
Schematic.pdfHuman-readable schematic
Gerber_PCB_Controller.zipFabrication Gerbers
BOM_PCB_Controller.csvComponent bill of materials
SourceFile/PCB_WLRobot.jsonEasyEDA PCB layout source
SourceFile/SCH_WLRobot.jsonEasyEDA schematic source
Counterfeit L6234 motor driver ICs are common on secondary marketplaces. Purchase the L6234PD013TR only from authorised ST Microelectronics distributors (e.g. Mouser, DigiKey, or LCSC). Counterfeit parts may appear to pass basic continuity checks but fail under PWM load, causing erratic motor behaviour or immediate failure.
Before connecting the battery, verify the polarity of the XH2.54 battery connector against the board silkscreen. The power silk was corrected in the latest PCB revision; if you are using an older Gerber or a self-sourced battery with a non-standard wiring, confirm pin 1 (positive) and pin 2 (negative) with a multimeter before applying power.

Encoder PCB

The Encoder PCB (2.Hardware/2.EncoderPCB/) carries a single AS5600 12-bit magnetic rotary position sensor. Two identical boards are built — one per wheel motor — and each is mounted so that a diametrically-magnetised disc magnet on the motor shaft rotates within the AS5600’s sensing range.

Key IC

PartInterfaceResolutionAddress
AS5600I2C (up to 1 MHz)12-bit (4096 counts/rev)0x36 (fixed)

Cable Interface

Each Encoder PCB connects to the Controller via a GH1.25 4-pin double-ended cable (15 cm). The four conductors carry VCC (3.3 V), GND, SDA, and SCL.

Left vs. Right Assignment

BoardI2C BusESP32 SDA / SCL GPIOs
Left encoderI2C 0 (Wire0)GPIO 19 (SDA) / GPIO 18 (SCL)
Right encoderI2C 1 (Wire1)GPIO 23 (SDA) / GPIO 5 (SCL)
Because the AS5600 has a fixed I2C address (0x36), it is essential that the two encoders are on separate I2C buses. Do not connect both encoder boards to the same bus.

Source Files

FileDescription
Schematic.pdfSchematic
Gerber_PCB_Encoder.zipFabrication Gerbers
BOM_PCB_Encoder.csvComponent BOM
SourceFile/PCB_Encoder.jsonEasyEDA PCB source
SourceFile/SCH_Encoder.jsonEasyEDA schematic source

IMU PCB

The IMU PCB (2.Hardware/3.IMUPCB/) hosts an MPU6050 module, providing the robot’s tilt and rotation data used by the LQR balancing controller.

Key Sensor

PartAxesInterfaceI2C Address
MPU60503-axis accelerometer + 3-axis gyroscopeI2C0x68 (AD0 = LOW, default)

Shared I2C Bus

The IMU PCB shares I2C bus 1 (GPIO 23 SDA / GPIO 5 SCL) with the right-side Encoder PCB. This works because the AS5600’s address (0x36) and the MPU6050’s address (0x68) do not conflict. Both devices are initialised together on I2Ctwo at 400 kHz. The IMU connects to the Controller via a GH1.25 4-pin cable (VCC, GND, SDA, SCL) plugged into connector CN5.

Source Files

FileDescription
Gerber_PCB_IMU.zipFabrication Gerbers
BOM_PCB_IMU.csvComponent BOM
SourceFile/PCB_IMU_Board.jsonEasyEDA PCB source

Servo Debug PCB

The Servo Debug PCB (2.Hardware/4.ServoDebugPCB/) solves a protocol mismatch between the ESP32’s full-duplex UART and the FEETECH STS3032 servo’s half-duplex single-wire TTL bus. It uses time-division multiplexing to merge the TX and RX signal paths onto one wire.

Half-Duplex Conversion

The ESP32’s Serial2 port presents separate TX (GPIO 16) and RX (GPIO 17) lines. The STS3032 bus uses a single bidirectional data line — the master drives the line to transmit, then releases it to receive the servo’s response. The Servo Debug PCB implements a direction-controlled buffer circuit that:
  1. Buffers TX → bus using the SN74LVC1G125DBV (U2) — a single tri-state buffer, enabled during transmission.
  2. Gates RX ← bus using the SN74LVC1G126DBV (U3, U10) — a buffer with enable, active during the receive window.
  3. Switches direction automatically based on the UART idle state, eliminating the need for a separate direction-control GPIO from the ESP32.

Key ICs

ReferencePartFunction
U2SN74LVC1G125DBVTri-state buffer — TX path to servo bus
U3, U10SN74LVC1G126DBVBuffer with enable — RX path from servo bus

Source Files

FileDescription
Schematic.pdfSchematic
SpecialInstruction.pngWiring and assembly special instruction (review before building)
Gerber_PCB_ServoDebug.zipFabrication Gerbers
BOM_ServoDebug.csvComponent BOM
SourceFile/PCB_ServoDebug.jsonEasyEDA PCB source
SourceFile/SCH_ServoDebug.jsonEasyEDA schematic source
Review SpecialInstruction.png in the 4.ServoDebugPCB/ folder before assembling or connecting this board. It contains wiring notes specific to the half-duplex direction control that are not fully captured in the schematic alone.

PCB Fabrication

All four boards can be ordered from any standard PCB fabrication service. The following notes apply to all boards:
  • Gerbers are provided as .zip archives, ready to upload directly to a fabricator.
  • Source files are EasyEDA JSON format. Open them in LCEDA (EasyEDA Pro) to modify footprints, add copper pours, or re-export Gerbers.
  • BOMs are CSV files listing reference designators, values, footprints, and LCSC part numbers where applicable. They can be imported directly into JLCPCB’s SMT assembly service.
  • Recommended fabricators: JLCPCB (pairs well with the LCSC BOM part numbers) or PCBWay.
  • Standard 2-layer, 1.6 mm FR-4, HASL or ENIG finish is sufficient for all four boards.
  • Order at least two Encoder PCBs (one per motor). All other boards require only one unit.

Build docs developers (and LLMs) love