WidowMaker-Pico
A 4 legged 3 degrees of freedom per leg spider robot controlled via WiFi, phone app control, capable of walking in all directions and stabilizing itself.
Author: Gociu Cristian
Github Project Link: https://github.com/UPB-PMRust-Students/fils-project-2026-cristiang888/tree/main
Description
A 4 legged spider robot controlled via a PC/mobile app over WiFi with a TCP server for real time commands. The robot uses 12 MG90S servo motors (3 per leg) controlled by a PCA9685 PWM 16 channel controller with a Raspberry Pi Pico W running Rust firmware via Embassy-rs. The robot will have a walking pattern with inverse kinematics, will be PC/phone controlled with joystick movement via WiFi, it will have emote animations, faces display and body pose tilting via the MPU6050 gyroscope that I will also use for body orientation sensing and auto leveling.
Motivation
I chose this project because I always was interested in the design and mechanical movement of robots, practically I wanted to combine mechanical design with embedded programming into this project. Building a walking robot would make me learn and understand inverse kinematics, real time control and sensor fusion, all implemented in a Rust microcontroller, also the app should add a practical and fun user interface that makes the robot interactive.
Architecture
The system consists of three main components:
- Pico W: Runs Embassy-rs async tasks for WiFi, gait engine, servo control, IMU reading
- I2C Peripherals: PCA9685 servo driver, MPU6050 gyroscope, OLED SSD1306 display all on a shared I2C bus
- PC App: TCP client with joystick, emote buttons and body pose control
Task Architecture
| Task | Frequency | Purpose |
|---|---|---|
wifi_task | Event-driven | CYW43 WiFi driver background processing |
tcp_server_task | Event-driven | Accept connections, parse JSON commands |
gait_task | 50 Hz | Compute walking foot trajectories and IK |
servo_task | 50 Hz | Write angles to PCA9685 via I2C |
imu_task | 100 Hz | Read MPU6050, complementary filter |
display_task | Event-driven | Render faces on SSD1306 OLED |
emote_task | Event-driven | Play pre-defined animation sequences |
Tasks communicate via Embassy Channel and Signal primitives
Log
Week 5 - 8
I brainstormed ideas, chose my desired topic and got its approval. I ordered components. Verified Pico W blink and I2C channel.
Week 9
Downloaded Fusion, learned how to use it and designed chassis and legs.
Week 10
Implemented PCA9685 servo control. Calibrated all 12 servos. Implemented inverse kinematics for 3-DOF legs.
Week 11
Implemented trot gait engine. Robot can now walk forward/backward. Started the Wifi TCP server.
Week 12
MPU6050 integration. Body pose control allowing auto-leveling while walking. OLED display with multiple emotion faces.
Week 13
App with joystick control. Robot responds to phone commands. Added emote animations.
Hardware
Components
The system uses a Raspberry Pi Pico W (RP2040) as the main controller and for WiFi, a PCA9685 16-channel as a servo driver, 12 MG90S servos as leg joints, a MPU6050 (GY-521) gyroscope for body orientation sensingm an OLED SSD1306 display and a 7.4V 2S LiPo battery as power source.
Schematics
Pin Connections
| Pico W Pin | GPIO | Function | Connected to |
|---|---|---|---|
| Pin 6 | GP4 | I2C0 SDA | PCA9685, MPU6050, SSD1306 |
| Pin 7 | GP5 | I2C0 SCL | PCA9685, MPU6050, SSD1306 |
| Pin 36 | 3V3 | Power | All I2C device VCC |
| Pin 39 | VSYS | 5V input | Buck Converter output |
Power Architecture
7.4V LiPo → Switch → UBEC (3A 5V) → Pico W VSYS
→ Buck Converter (5A 5V) → PCA9685 V+
Pico W 3V3 → PCA9685 VCC, MPU6050 VCC, SSD1306 VCC
Photos



Schematics
Bill of Materials
| Device | Usage | Price |
|---|---|---|
| Raspberry Pi Pico W | Main controller | 64 RON |
| Pca9685 Servo Driver | 16 channel PWM I2C servo driver | 42 Ron (for 2) |
| MG90S Servo Motor | 3 DOF movement for walking, rotating and stabilizing | 200 Ron |
| MPU6050 Module (GY-521) | IMU data | 20 Ron |
| OLED SSD1306 Display 128x64 | Display for the faces | 15 Ron |
| 7.4V 2S LiPo Battery 1000mAh | Power source | 56 Ron |
| 2s LiPo charger | Charger for battery | 43 Ron |
| 5V 5A Buck Converter | Buck converter to reduce 7.4V down to 5V for the servos | 15 Ron |
| 5V 3A UBEC | Buck converter to reduce 7.4V down to 5V for the RPi | 24 Ron (for 5) |
| Protoboard | Board to solder all the power and communication rails | 13 Ron (for 5) |
| Switches | Switch for powering on and off | 12 Ron (for 5) |
| XT30 pair connectors | Tips for wires to connect eachother | 15 Ron |
| Pin Headers (male+female) | To help soldering the board and components | 19 Ron |
| 3D Printing Filament | Used for the custom design of my project | 100 RON |
| Wires for power, heat shrinks and jumper wires | Soldering on the board and power insulation | 70 Ron |
| Total | 708 |
Software
PC Python App
App with 4 tabs:
- Move: Virtual joystick for walking direction
- Emotes: Grid of emote buttons (wave, dance, bow, etc.)
- Faces: Grid of face buttons (happy, sad, angry, etc.)
- Pose: Virtual joystick for body pitch/roll control
| Library | Category | Usage |
|---|---|---|
embassy-executor | Async Runtime | Provides the async task executor to run background routines concurrently |
embassy-rp | HAL Layer | Low level peripheral hardware abstraction layer for the RP2040 (GPIO, I2C, Time-driver) |
embassy-time | Timing | Manages asynchronous timers and clock ticks required for servo PWM adjustments |
embassy-sync | Synchronization | Implements Channel and Signal blocks to pass data safely between tasks |
embassy-net | Networking | TCP/IP network stack handling the embedded TCP socket listener on port 8080 |
cyw43 and cyw43-pio | Wireless Driver | Controls the CYW43439 physical hardware chip on the Pico W for stable Wi-Fi operations |
pwm-pca9685 | Hardware Driver | I2C driver used to command the 16-channel PWM controller handling the 12 leg servos |
mpu6050-dmp | Hardware Driver | Decodes Digital Motion Processor sensor fusion inputs from the gyroscope for stabilization |
ssd1306 | Hardware Driver | I2C interface driver used to control the 0.96" OLED display graphics buffer |
embedded-graphics | Graphics UI | Draws pixel art, rendering the active emotions animation frames on the OLED |
serde and serde-json-core | Data Parsing | Embedded no allocation JSON framework to deserialize app movement packets into system data structs |
heapless | Data Structures | Provides static, fixed size data arrays and rings without requiring memory heap allocations |
libm | Core Math | Trigonometric implementation tracking (sin, cos, atan2, sqrt) required for the Inverse Kinematics math |
defmt and defmt-rtt | System Logging | Provides information back to me regarding the robot |
panic-probe | Safety Diagnostics | Intercepts firmware runtime panic failures and streams the exact file via probe-rs |
cortex-m and cortex-m-rt | Target Runtime | Assembly routines and execution initialization for Cortex-M0+ processing hardware |