Rusty Drone
A compact freestyle drone powered by an STM32 and ESP32 that streams real-time video over WiFi and is controlled via Bluetooth using a PS4/PS5 controller.
Author: DUTU Ana-Antonia
GitHub Project Link: https://github.com/UPB-PMRust-Students/fils-project-2026-anto987678
Description
This project aims to develop a compact freestyle drone using Rust for embedded systems, combining real-time flight control on an STM32 microcontroller with wireless communication handled by an ESP32 module. The drone will stream live video over WiFi while being controlled via Bluetooth using a PS4/PS5 controller, and will also provide telemetry data such as altitude, temperature, speed, and battery level.
Motivation
I chose this project because it combines multiple areas that interest me, such as embedded systems, wireless communication, and real-time control. Building a drone allows me to work with both hardware and software, while also gaining practical experience with Rust in an embedded context. Additionally, the project is challenging and interactive, involving sensors, communication protocols, and control algorithms, making it a great opportunity to better understand how complex systems are designed and integrated.
Architecture
The system is structured into several main components: the flight control unit, the communication module, the sensing subsystem, and the power management system. The flight control unit, running on the STM32 microcontroller, is responsible for processing sensor data and generating control signals for the motors using a control algorithm. The sensing subsystem includes the IMU and environmental sensors, which provide real-time data (orientation, altitude, temperature) to the flight controller.
The communication module, implemented using the ESP32, handles both Bluetooth and WiFi connectivity. It receives user input from a PS4/PS5 controller via Bluetooth and transmits video data from the camera to an external device over WiFi. Additionally, telemetry data can be sent back to the user device.
All components are powered directly from the LiPo battery through the ESC and the step-down voltage regulator, which provides the necessary voltages for the STM32, ESP32, and sensors. The STM32 communicates with sensors via I2C and controls the ESC using PWM signals, while the ESP32 communicates with the STM32 through a serial interface (e.g., UART).
Week 1-4
Researched potential project ideas, focusing on my interest in embedded systems and understanding how drones work behind the scenes. Explored different types of drones and considered their design and manufacturing aspects before choosing a suitable direction.
Week 5 - 6
Started researching how drones work and selecting suitable components, including choosing the appropriate motors. Placed orders for the required hardware and began writing the project documentation.
Week 7-8
Started working on the hardware by assembling the drone frame and mounting the motors. Continued by soldering the motors to the ESC and connecting the battery, while integrating the step-down voltage regulator into the power system. Also researched proper soldering techniques and component connections, and began considering different layouts for positioning the battery, STM32, ESP32, sensors, and IMU within the drone frame.
Hardware
The project uses an STM32 Nucleo U545RE-Q microcontroller for flight control, along with an ESP32-CAM module for WiFi video streaming and Bluetooth communication. It includes brushless motors with a 4-in-1 ESC, an MPU6050 IMU for motion sensing, and BMP280 and MAX6675 sensors for environmental data. Power is provided by a LiPo battery with a step-down converter, all mounted on a 5-inch drone frame with standard supporting components.
Schematics
Place your KiCAD or similar schematics here in SVG format.
Bill of Materials
Software
| Library | Description | Usage |
|---|---|---|
| embassy-executor | Async task executor for embedded systems | Runs concurrent tasks like sensor reading and motor control |
| embassy-time | Time management utilities | Handles delays, timers, and scheduling |
| embassy-sync | Synchronization primitives | Enables safe communication between async tasks |
| embassy-stm32 | HAL for STM32 microcontrollers | Interfaces with peripherals like GPIO, UART, I2C |
| embedded-hal | Hardware abstraction traits | Standard interface for embedded components |
| embedded-hal-async | Async version of embedded-hal | Enables non-blocking peripheral communication |
| esp-idf-hal | HAL for ESP32 | Interfaces with ESP32 hardware |
| esp-idf-svc | High-level ESP32 services | Provides WiFi and Bluetooth functionality |
| embassy-net | Async networking stack | Handles WiFi communication |
| smoltcp | TCP/IP stack | Used internally for network protocols |
| mpu6050 | IMU driver | Reads acceleration and gyroscope data |
| nalgebra | Linear algebra library | Processes sensor data and calculations |
| pid | PID controller implementation | Stabilizes the drone during flight |
| panic-probe | Debugging and panic handler | Helps with runtime error debugging |