Drawings: connections

Stage 1 wiring: ESP32 DevKit, PCA9685 16-channel 12-bit servo driver (0x40) and 0.96" SSD1306 OLED (0x3C) on one I2C bus, 16 MG90S servos on their own power bus.

Wiring diagram

Wiring diagram: 2S LiPo to UBEC (servo power bus with 1000 µF capacitor) and to a 5 V regulator for the ESP32; ESP32 3V3, GND, GPIO21 SDA and GPIO22 SCL to the PCA9685 and the OLED; 16 servo signal wires from the PCA9685; common ground.

Open the diagram full size

Power

FromToNotes
2S LiPo (7.4 V)UBEC input
UBEC out + (5–6 V)servo power bus + → every servo’s red wireUBEC rated ≥ 8 A, thick wire
UBEC out −servo power bus − → every servo’s brown wirethick wire
1000 µF capacitor (≥ 10 V)across the servo busnear the servos
2S LiPo5 V regulator → ESP32 VIN (5V)or USB; the ESP32 gets its own 5 V
UBEC −, PCA9685 GND, ESP32 GND, OLED GNDjoinedcommon ground; without it the signals don’t work

Logic and I2C

ESP32 pinPCA9685OLED SSD1306
3V3VCC (logic)VCC
GNDGNDGND
GPIO21 (SDA)SDASDA
GPIO22 (SCL)SCLSCL
–OE: leave open
–V+: not used for servo current (see notes)

I2C addresses: PCA9685 0x40, OLED 0x3C. Logic runs at 3.3 V, so the I2C pull-ups stay at 3.3 V.

Servo channels (PCA9685)

Channel = corner × 4 + limb × 2 + joint. Corners FL, FR, RL, RR; inner limb then outer; hip then knee. Plug each servo’s signal (orange) wire into its channel; red and brown go to the servo power bus.

ChCornerLimbJointMount

Notes