Flight Controller
I developed a custom flight controller in C++ using an Arduino Nano and an MPU6050 IMU. The controller continuously reads the drone’s orientation and angular velocity from the IMU, along with throttle, roll, pitch, and yaw commands from the RC receiver.
I implemented PID controllers for roll, pitch, and yaw to stabilize the drone and respond to pilot commands. The controller calculates the correction required for each axis and uses motor mixing to distribute those corrections across the four motors. For example, if the drone begins tilting to one side, the controller adjusts the motor speeds to counteract the tilt and bring the drone back toward the desired orientation.
The flight software communicates with the IMU over I2C and includes safety features such as throttle limiting and PID integrator resets at low throttle. The drone is currently in the flight-testing and tuning stage and has not yet achieved a fully stable flight. I am using results from each test to iteratively tune the PID gains, with the current focus on achieving consistent roll and pitch stability.
Mechanical Design

I designed the drone’s airframe in SolidWorks, with the frame geometry and component layout built around the motors, battery, and onboard electronics. Since motor and propeller vibrations can interfere with the IMU measurements used by the flight controller, I also incorporated vibration isolation into the flight-controller mounting design. The structural components were then 3D printed and assembled into the final airframe.
Future Development
The next version will move from Arduino to STM32 for increased processing capability and more flexible peripheral control. Planned improvements include:
- STM32-based flight controller
- Barometer-based altitude hold
- Improved state estimation and sensor fusion
- Raspberry Pi integration for computer vision
- Autonomous flight capabilities