Skip to main content
Version: FILS English

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.

info

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

DeviceUsagePrice
STM32 Nucleo U545RE-QThe microcontroller~120 RON
ESP32-CAM (WiFi + Bluetooth, OV2640, CH340)Video streaming and wireless communication~70 RON
ESC HGLRC 60A V1, 4-in-1, 2-6S, 30x30mmControls the speed of the brushless motors~208 RON
SpeedyBee Mario 5 XH 04 Advanced FrameDrone frame (structure and component mounting)~237 RON
Emax ECO II 2207 Brushless Motor (1700KV)Provides thrust for the drone (x4 motors)~4 x 80 RON
GY-521 MPU6050 (3-axis Gyroscope + Accelerometer)Measures orientation and motion (IMU)~22 RON
Tattu R-Line 6S 1550mAh 120C LiPo Battery (XT60)Power supply for the drone~305 RON
LM2596 DC-DC Step-down Module (4.5–40V, 3A)Voltage regulation (steps down battery voltage for components)~7 RON
XT60 Male-Female Connector Pair with 10cm WirePower connection between battery and ESC~24 RON
Gemfan Hurricane 51433 Propellers (3-blade, 2 CW + 2 CCW)Generates lift and thrust for the drone~33 RON
BMP280 Barometric Pressure SensorMeasures pressure and estimates altitudeAlready owned
MAX6675 Temperature SensorMeasures temperature using thermocoupleAlready owned

Software

LibraryDescriptionUsage
embassy-executorAsync task executor for embedded systemsRuns concurrent tasks like sensor reading and motor control
embassy-timeTime management utilitiesHandles delays, timers, and scheduling
embassy-syncSynchronization primitivesEnables safe communication between async tasks
embassy-stm32HAL for STM32 microcontrollersInterfaces with peripherals like GPIO, UART, I2C
embedded-halHardware abstraction traitsStandard interface for embedded components
embedded-hal-asyncAsync version of embedded-halEnables non-blocking peripheral communication
esp-idf-halHAL for ESP32Interfaces with ESP32 hardware
esp-idf-svcHigh-level ESP32 servicesProvides WiFi and Bluetooth functionality
embassy-netAsync networking stackHandles WiFi communication
smoltcpTCP/IP stackUsed internally for network protocols
mpu6050IMU driverReads acceleration and gyroscope data
nalgebraLinear algebra libraryProcesses sensor data and calculations
pidPID controller implementationStabilizes the drone during flight
panic-probeDebugging and panic handlerHelps with runtime error debugging
  1. Embassy Book
  2. STM32 32-bit Arm Cortex MCUs - Documentation
  3. [MPU6050 documentatiom] (https://docs.sunfounder.com/projects/ultimate-sensor-kit/en/latest/components_basic/05-component_mpu6050.html)