STM32 Based Autonomous Quadcopter: Building a Customizable Foundational Flight Controller for Autonomous Aerial Systems
The Project
Many modern drones use pre-built flight controllers that limit customization. Existing open-source options are often complex and hard to modify, making it difficult for users to create drones for niche applications without spending excessive time just getting the basics to work. A proper head start is needed. My project solves this issue by developing a from scratch, fully-customizable, library-free, open-source flight controller which can be used as a foundation for countless autonomous aerial systems like terrain-mapping. The system uses an STM32 microcontroller to integrate an IMU for orientation, a barometer for altitude, a GPS module for navigation, and a compass for heading data. Three PID loops regulate pitch, roll, and yaw by adjusting motor speeds to counteract deviations from level. Simultaneously, an altitude PID corrects vertical drift, while a GPS PD compensates for horizontal displacement. These controllers must communicate with each other to ensure stable flight while also responding to pilot inputs and waypoint navigation. A telemetry module provides real-time drone data and remote control capabilities through a custom software interface. Testing showed reliable user control and consistent autonomous flight functionalities. This project solved the problem of limited flexibility in pre-built flight systems by providing a customizable platform. Though it takes more time to customize it to yourself, this work pays off because you get to not be bound to some prebuilt sliders or configurations and learn all about this area of study. This open source program gives users a place to start so they don’t have to develop their program from scratch. The autonomous functionalities in my drone give a good starting point for people who want to develop their very own flight controller either for personal or business use. Drones are very versatile so they can be used anywhere. Some examples are tasks like terrain mapping, search and rescue, or agricultural monitoring, where customizable drones offer an advantage. One problem that came up was that the barometer was very sensitive to light, especially sunlight. To solve this, I designed and 3D printed a custom case with carefully placed holes that allowed air to flow in while blocking direct sunlight. I also painted the case black to improve light absorption. After multiple tests in various conditions, I discovered that in windy environments, the altitude value began to oscillate a lot more, negatively affecting altitude hold. In my next design, I plan to make the case wind-resistant as well, so the barometer can function more reliably in windy conditions. I chose to make this project because I was always fascinated by RC vehicles, especially ones that fly. With my love for electronics and programming I went for the challenge of making and coding my own drone, having a lot of fun and learning so much along the way.
Judge Feedback
I liked this as it tackles complex real world problem - creating a fully customizable flight controller from scratch using STM32, GPS, barometer, IMU, and PID loops—showing depth in both hardware and software engineering.
From Amar Kedare
About the team
Team members
More cool Advanced programming projects
Colour Confusion Pygame
Advanced programming
TGSW Coding academy Ethical Hacking
Advanced programming
All health
Advanced programming