Self-Stabilizing Quadcopter using Arduino
Introduction
For our senior capstone design course, our group decided to build an unmanned aerial vehicle (UAV), more commonly known as a drone. None of us knew much about drones in general, but we thought it would be a cool project and a good learning experience. As electrical engineers, our focus was on the control system — the flight controller, rather than the actual vehicle.
Our goal was to use commercially-available parts to build a(n X-configuration) quadcopter which would be capable of self-stabilization. The X-configuration quadcopter is by far the most popular UAV configuration for general purposes due to the fact that it can be controlled with a simple flight control system. We chose to use an Arduino UNO as our flight controller because it was something we were all at least somewhat familiar with, and for the abundance of resources available.
Project Overview
- Type: Group (3 members)
- Timeframe: 1 semester (approx. 3 months)
- Relevant Concepts/Skills: Research, cost analysis, component selection, electronics assembly and testing, signal processing, failure analysis, Arduino/C++ programming and debugging, unmanned aerial vehicle (UAV), drone, quadcopter, flight mechanics, embedded systems, control theory, PID controller
- Tools: Arduino IDE, Arduino UNO microcontroller, soldering iron
- Deliverable(s): Final “product” with demo video + 4 class presentations (Preliminary Design Review, Progress Update, Initial Results, Final Results)
Procedures
- Researched quadcopter flight mechanics, modeling, components, and control
- Performed cost analysis and component selection to design, assemble, and test quadcopter
- Programmed and debugged flight controller code using Arduino
- Implemented complementary filter to process signals from IMU
- Set up and calibrated quadcopter and RC system using calibration code
- Implemented PID controller to control quadcopter movement
- Improved flight and self-stabilization performance by tuning PID controller
System Block Diagram
Progress Pictures
Results
Quadcopter was functional, but had a tendency to drift backwards and would occasionally “jump” unexpectedly. This was likely due to misalignment between the IMU and vehicle body.
Unfortunately, we were not able to test our theory or remedy the design before the deadline, as a crash on our last testing day resulted in a broken wire to the power distribution board (PDB) which was not discovered until later.
Future Work
The first things would of course be to fix the broken wire and the misalignment between the IMU and the vehicle body. However, a redesign could also be beneficial. For example, the use of a 4-in-1 ESC (electronic speed controller) rather than 4 separate ESC’s could reduce the weight of the quadcopter and also potentially improve the balance.
Repository
The full code/repository can be found here.