Quadruped Spider Robot
A 4-legged spider robot controlled via Bluetooth, capable of walking in all directions.
Author: Vlad-Ștefan DAMIAN
GitHub Project Link: https://github.com/UPB-PMRust-Students/fils-project-2026-vladduu
Description
A quadruped spider robot with 4 legs and 3 degrees of freedom per leg (12 servo motors total). Each leg has an ankle, knee and hip joint driven by SG90 servo motors through a PCA9685 16-channel PWM driver. The robot is controlled wirelessly using an HC-05 Bluetooth module and can get up from a lying position, walk forward, walk backward, turn left, turn right and it is controlled from the Arduino Bluetooth Control Application. The firmware runs on an STM32 NUCLEO-F446RE microcontroller written in Rust using the embassy-rs async framework.
Motivation
I have always been fascinated by robots, especially biomimetic robots, machines that move like living creatures. With that idea in mind, i wanted to build a quadruped spider robot cause it was one of my childhood dreams. Also, i knew that the challenge of making 12 motors work together in a coordinated gait, all in real time on a microcontroller will push me to deeply understand both hardware and software design.
Architecture
The system is composed of:
- STM32 NUCLEO-F446RE — the main microcontroller that runs the Rust/embassy-rs firmware. It communicates with the PCA9685 over I2C and receives Bluetooth commands over UART.
- PCA9685 PWM Driver — generates PWM signals for all 12 servo motors simultaneously. Powered by a dedicated 5V external power supply.
- HC-05 Bluetooth Module — receives single-character commands (F/B/L/R/S) from a mobile RC app and forwards them to the MCU over UART.
- DC-DC Step Down module XL4005 - used for the current regulation of the PCA9685 PWM Driver.
- DC-DC Step Down module LM2596 - used for the current regulation of the microcontroller.
- 18650 Li-Ion batteries - to power the circuit.
The gait algorithm uses diagonal leg pairs (FL+RB, FR+LB) stepping one leg at a time. Each step consists of: lift knee → swing hip forward → plant foot → push hip back → reset. While a leg steps, the opposite hips shift slightly for balance stabilization.
Log
Week 1 - 3
Bought all the components needed.
Week 4 - 7
Started building the main frame and installig the SG90 servo motors, batteries, regulators, to test the idea and also the weight. First i made it just as a prototype.
Hardware
The robot frame is built using PLA 3D printed parts and metal brackets. 12 SG90 servo motors are mounted across 4 legs (3 per leg: ankle, knee, hip). All servos are connected to a PCA9685 PWM driver which is controlled by the STM32 NUCLEO-F446RE over I2C. An HC-05 Bluetooth module connects to the MCU over UART for wireless control. The servos are powered by a dedicated 5V/3A external power supply to avoid overloading the MCU's onboard regulator.
Servo Channel Mapping:
| Channel | Joint |
|---|---|
| 0 | Right Back Ankle |
| 1 | Right Back Knee |
| 2 | Right Back Hip |
| 3 | Left Back Ankle |
| 4 | Left Back Knee |
| 5 | Left Back Hip |
| 6 | Front Left Ankle |
| 7 | Front Left Knee |
| 8 | Front Left Hip |
| 9 | Front Right Ankle |
| 11 | Front Right Knee |
| 12 | Front Right Hip |
| 13 | Front Right Ankle (remapped - ch10 damaged) |
Schematics
Bill of Materials
| Device | Usage | Price |
|---|---|---|
| STM32 NUCLEO-F446RE | Main microcontroller | 131 RON |
| PCA9685 PWM Driver | 16-channel I2C PWM servo driver | 32 RON |
| SG90 Servo Motor | Leg joints (x12) | 13,5 RON x12 = 162 RON |
| HC-05 Bluetooth Module | Wireless RC control | 46 RON |
| 18650 Batteries | External servo power | 23 RON |
| Building Materials | Robot frame | 100 RON |
| Jumper wires | Connections | 15 RON |
| 18650 Batteries Case | Used for conecting the batteries in series (7.4V) | 20 RON |
| DC-DC Step Down module LM2596 | Regulating the current to 5V for the microcontroller | 15 RON |
| DC-DC Step Down module XL4005 | Regulating the current to 6V for the servo driver | 15 RON |
| Total | 559 RON |
Software
| Library | Description | Usage |
|---|---|---|
| embassy-executor | Async task executor for Cortex-M | Runs concurrent tasks for the gait sequence and Bluetooth handling |
| embassy-stm32 | STM32 Hardware Abstraction Layer | Hardware drivers for I2C (servo), UART (Bluetooth), and GPIO |
| embassy-time | Time management utilities | Handles asynchronous time delays between servo movements |
| embassy-sync | Synchronization primitives | Sharing state and passing Bluetooth commands between async tasks |
| pwm-pca9685 | PCA9685 PWM driver | Independent control of all 12 servo motors over I2C |
| cortex-m | Low-level Cortex-M processor access | Core processor operations and register access |
| cortex-m-rt | Cortex-M minimal runtime | Device boot sequence and interrupt vector routing |
| defmt | Deferred formatting logging framework | Highly efficient console logging and formatting |
| defmt-rtt | RTT transport for defmt | Transmitting log messages to the host PC via Real-Time Transfer |
| panic-probe | Panic handler | Catches system errors/panics and prints them via defmt |