← All projects

PGNTA: 17-DOF Humanoid Robot

ESP32, PCA9685, MPU6050, HC-SR04, servos
first-year summer project, 2024
code

A 53 cm bipedal humanoid I designed and built from scratch. An ESP32 drives 17 servos (14 MG995, 3 SG90) through a PCA9685 on a 3 mm plywood frame, with an MPU6050 IMU and an HC-SR04 ultrasonic sensor, a six-cell 18650 pack and live data on Arduino Cloud. It waves, dances and turns its head toward objects.

Parts
Choosing the components

Balanced torque, cost and availability: 14 high-torque MG995 servos for the major joints, 3 SG90 servos for light joints, an ESP32 as the main controller, a PCA9685 16-channel servo driver, an MPU6050 for acceleration and gyro data, and an HC-SR04 for object detection.

Components laid out on a whiteboard: ESP32, Nano, sensors, servo, buck converter, batteries
Frame
Plywood structure

The frame is 3 mm plywood: a 14×11 cm body, box-shaped limbs, C-shaped hinge joints and a 6×3×5 cm head for the sensors. Each servo is held by four 2 mm screws, with 7 mm holes for the servo horns and nails as support on the opposite side. Final size: 53 cm tall, 25 cm long, 8 cm wide.

PGNTA frame during assembly in the workshop, surrounded by tools
Joints
17 degrees of freedom

The servos copy human joints: 10 in the legs (LL1–LL5, RL1–RL5), 6 in the arms (LH1–LH3, RH1–RH3) and 1 to turn the head.

Annotated photo of PGNTA showing the ESP32, HC-SR04, MPU6050, LED, PCA9685 and Nano positions
Power
Battery pack

9 V batteries could not supply the current for 17 servos. The final pack uses six 18650 cells (3.7 V, 2000 mAh): two parallel strings of three cells in series, about 11.5 V. A DC-DC buck converter steps it down to 5 V for the servos and electronics.

Six 18650 cells in two holders with a switch and a buck converter module
Wiring
Circuit

The ESP32 sends PWM commands to the PCA9685 over I2C. A 25 V 100 µF capacitor smooths the servo supply. The HC-SR04, MPU6050 and a circular LED connect to the ESP32. An Arduino Nano version of the circuit is used to interface with servo control software.

Circuit diagram: ESP32, PCA9685, 18650 batteries, HC-SR04, MPU6050, LED ring and 16 servos
ESP32 version of the circuit.
Control
Programming and cloud

Programmed in the Arduino IDE with PWM servo control. I tuned each servo position with Tim's Servo x16 Controller and saved preset poses and movement scripts. Arduino Cloud shows live data: head angle, distance and acceleration.

Arduino Cloud dashboard with gauges for head rotation, distance and acceleration
Result
What it can do

Arm movements (up, down, front), simple dance routines, waving “hi”, and turning the head toward detected objects, with live data on Arduino Cloud.

Finished PGNTA upper body with the ultrasonic sensor head and glowing LED ring

Challenges and fixes

  • Servo range: the MG995 servos are limited to 0–180°. I fine-tuned positions in Tim’s Servo x16 Controller and made preset poses.
  • Power: 9 V batteries could not give enough current. I moved to the 18650 pack.
  • Weight: 3 mm plywood made the robot heavy. A next version needs a lighter material.
  • Assembly: I mounted some servos before testing them, which limited some motions. Now I test every part before final assembly.
  • Soldering: bad joints on the PCA9685 pins caused connection faults. I re-soldered them with a 30 W iron.

Next versions

  1. V2: web-based control interface; smoother and wider movements.
  2. V3: ESP32-CAM for image detection; copy human movements in real time.
  3. V4: voice control and natural-language interaction through an AI API.
▶ Watch PGNTA on YouTube