Senior Design Project
STM32 Quadcopter Flight Controller
Development and Implementation of an STM32-Based Quadcopter Drone Flight Controller Board
A flight controller is the system that allows a quadcopter to interpret sensor measurements, respond to pilot commands, and coordinate its four motors.
In this senior design project, we’re developing our own STM32-based flight controller from the ground up. The work brings together embedded programming, sensing, wireless communication, and control systems—progressively developing and testing these functions before moving toward a dedicated, custom-designed circuit board.

How the flight controller works
A quadcopter steers by changing the speed of its four motors. The flight controller combines the pilot’s commands with motion measurements to decide what each motor should do.
- Pilot commands
- Desired tilt and throttle
- Motion sensor
- Acceleration and rotation
STM32 flight controller
Estimates tilt, calculates corrections, and combines them with throttle into four motor commands.
ESCs and motors
Electronic speed controllers use the commands to drive the motors.
Technical signal path and hardware
- Controller hardware
- Two STM32F407G-DISC1 development boards
- Firmware
- Embedded C
- Sensing and radio
- MPU-6050 and CC1101
- Actuation
- Four PWM-controlled ESCs
- Project period
- 2026–2027
Transmitter and radio
Joystick references
Two joysticks provide throttle, roll, and pitch inputs.
Command mapping
The transmitter converts calibrated joystick inputs into reference commands.
CC1101 wireless link
The boards exchange command packets wirelessly through SPI2-connected CC1101 modules.
Receiver inputs
Received references
The receiver reads throttle, roll, and pitch commands from valid radio packets.
MPU-6050 measurements
The receiver reads accelerometer and gyroscope data over I²C2.
Attitude estimation
Bias correction and complementary filtering produce estimated roll and pitch angles.
Control and actuation
Control calculations
At a nominal 100 Hz, TIM6 schedules roll and pitch corrections using provisional proportional gains.
Motor mixing
The X-frame mixer combines throttle and both corrections into four motor commands.
PWM outputs
TIM4 generates four PWM signals at 50 Hz for the ESCs.
Four ESCs
Each speed controller receives its own PWM signal.
Four brushless DC motors
The ESCs drive the motors on the X-frame.
The motor-induced frame motion that would feed back into the IMU remains unverified. Bench checks used hand-applied tilts.
Our development journey
We tested the board’s functions one at a time before combining them on the four-motor frame. Each stage links to its experiment or next validation step.
Experimentally Verified
Set up and test the STM32 board
Verified the STM32’s serial transmit and receive path with a loopback test and onboard LEDs.
Experimentally Verified
Measure the motor-control signals
Verified four PWM outputs at about 50 Hz, with an independently set pulse width on each channel.
Bench-Tested
Estimate tilt from motion readings
Confirmed MPU-6050 communication and checked that the roll and pitch estimates responded to hand-applied tilts.
Bench-Tested
Run one motor on the bench
Ran a single motor from STM32 PWM commands and checked that hand-applied tilt changed the command.
Experimentally Verified
Check radio range and signal loss
Verified wireless packet reception and confirmed that signal loss triggered a stop command in a single-motor test.
Bench-Tested
Test all four motors together
The transmitter, receiver, and four motor channels worked together on the bench under a shared throttle command.
Bench-Tested · Current stage
Check how tilt changes motor commands
The controller calculated different commands for the motor groups, and all four timer compare values matched the calculated commands.
Planned
Test stabilization and develop the PCB
Measure how the frame responds to motor commands, tune the controller, and use the validated requirements to design and test the dedicated PCB.
Explore the Full Development Journey
Follow the experiments in order to see the test setups, decisions, observations, photographs, and limitations behind each stage.
The bench tests verify the control signals and calculations. Physical stabilization, motor speed and thrust measurements, systematic PID tuning, validation of the dedicated PCB, and autonomous flight remain ahead.
See All Stages and ExperimentsAlongside the current STM32 prototype work, I have started learning PCB design with KiCad. This preparation will support the later transition from development boards and external modules toward a dedicated flight-controller PCB.
PCB Design & KiCad