Skip to main content
Version: FILS English

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.

info

Description

A 4 legged spider robot controlled via a Flutter 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 phone controlled with joystick movement, it will have some emote animations 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 kinmatics, 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

Arachne Architecture

The system consists of three main components:

  1. Pico W: Runs Embassy-rs async tasks for WiFi, gait engine, servo control, IMU reading
  2. I2C Peripherals: PCA9685 servo driver, MPU6050 gyroscope, all on a shared I2C bus
  3. Flutter App: TCP client with joystick, emote buttons and body pose control

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.

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 sensing and a 7.4V 2S LiPo battery as power source.

Bill of Materials

DeviceUsagePrice
Raspberry Pi Pico WMain controller64 RON
Pca9685 Servo Driver16 channel PWM I2C servo driver
MG90S Servo Motor3 DOF movement for walking, rotating and stabilizing
MPU6050 Module (GY-521)IMU data
7.4V 2S LiPo Battery 1000mAhPower source
2s LiPo chargerCharger for battery
5V 3A UBECBuck converter to reduce 7.4V down to ~6V for the servos
ProtoboardBoard to solder all the power and communication rails
Pin Headers (male+female)To help soldering the board and components
3D Printing FilamentUsed for the custom design of my project
Wires, heat shrinksSoldering on the board and power insulation
Total

Software

LibraryDescriptionUsage
embassy-executorAsync task executorRuns concurent tasks
embassy-rpRP2040 HAL (GPIO, I2C, PIO)Provides low level interface for the RP2040 GPIO, I2C buses and PIO state machines
embassy-timeAsync timers and delaysHandles timing fot servo PWM updates and delays
embassy-netTCP/IP networking stackAllows the robot to communicate with the control interface via wireless network
embassy-syncChannels, signalsSafe communication between async tasks (sending movement commands from the WiFi task to the gait engine)
cyw43WiFi driver for CYW43439Handles the WiFi radio and data transmission
cyw43-pioPIO-based SPI for CYW43Handles high speed SPI communication with the WiFi chip
pwm-pca9685PCA9685 I2C servo driverDrives the 16 channel PWM controller via I2C
mpu6050-dmpMPU6050 gyro/accel driverRetrieves orientation data, used for active stabilization algorithms
serde-json-coreno_std JSON parsingParses incoming JSON packets from the WiFi control wheel into Rust structures for movement commands
libmMath functions for Inverse KinematicsTrigonometry functions (sin, cos, atan2, sqrt) required for IK
defmtEfficient logging for embeddedHighly efficient logging and formatting console
defmt-rttRTT transport for defmt logsThe transporter that sends defmt logs from the Pico W to the host PC
panic-probePanic handler for probe-rsPanic handler that catches code failures and prints the file and line number where the error occurred
  1. Embassy
  2. PCA9685 product data sheet
  3. Project inspiration