A fully documented, from-scratch quadcopter — flight controller, radio system and control software built on low-cost Arduino hardware, with the complete B.Eng thesis explaining every design decision.
Oboh Edward Osaretin · Department of Computer Engineering, University of Benin, Nigeria · July 2021
Most affordable drone platforms are built from proprietary "black-box" modules — flight controllers, radios and motor controllers you cannot inspect or modify. This project removes those black boxes: every part of the quadcopter is specified, built and programmed from scratch on cheap, easy-to-find hardware, making the platform a practical starting point for students and researchers who want to understand or extend multi-rotor flight control.
The project covers, end to end:
- Modelling — a reference frame and control objectives for a quadcopter (Euler angles: pitch θ, roll φ, yaw ψ)
- Orientation estimation — reading a MPU-6050 IMU (3-axis accelerometer + 3-axis gyroscope) and fusing both sensors with a complementary filter
- Control — PID controllers for roll and pitch that auto-level the craft, mixing the corrections into the four motor outputs
- Hardware — a flight controller (Arduino UNO), a custom-built radio remote controller (Arduino Nano + nRF24L01), electronic speed controllers, and A2212 brushless motors on a DJI F450 X-frame
- Verification — test-bench experiments constraining the quadcopter to rotational motion before free flight
The result: the quadcopter armed, stabilised itself and responded to remote commands over the 2.4 GHz RF link, as designed.
| Path | What's in it |
|---|---|
docs/thesis.md |
The full thesis, converted to clean markdown for reading on GitHub |
| Thesis PDF | Original thesis document (PDF, with all figures) — also as DOCX |
docs/presentation/ |
Slides used for the project defence (PDF and PPTX) |
firmware/flight_controller/ |
Arduino UNO sketch: IMU reading, complementary filter, PID control, motor mixing, arming logic |
firmware/radio_transmitter/ |
Arduino Nano sketch for the hand-held remote (joysticks → nRF24L01) |
firmware/radio_receiver/ |
Arduino Nano sketch: receives the 6 radio channels and outputs a PPM sum signal |
firmware/esc_calibration/ |
Utility sketch to calibrate each ESC's throttle range before first flight |
firmware/README.md |
Wiring tables, required libraries, upload order, arming procedure, PID tuning notes |
assets/diagrams/ |
Block diagrams and figures (control loop, sensor fusion, hardware architecture) |
assets/photos/ |
Build photos of every subsystem and the finished quadcopter |
hardware/ |
Editable draw.io source for the flight-controller block diagram |
Flight controller (Arduino UNO). Every loop it reads raw gyroscope and accelerometer data from the MPU-6050 over I²C, converts both to angle estimates, and fuses them with a complementary filter (98% gyro integration, 2% accelerometer) to get a drift-free, noise-resistant attitude estimate. Roll and pitch PID controllers compare that estimate against the pilot's commanded angles and mix their outputs — together with throttle — into four PWM signals for the ESCs:
Radio system. The custom remote controller reads two joysticks (throttle, yaw, pitch, roll) and two toggle switches on an Arduino Nano, and transmits them with an nRF24L01 PA/LNA module at 250 kbps. On the quadcopter, a second Nano receives the six channels and regenerates them as pulse signals that the flight controller measures with pin-change interrupts. If the radio link drops for more than a second, the receiver resets to safe values (throttle zero) automatically.
Safety and arming. Motors only spin after an explicit stick command (throttle low + yaw right, held), and disarm the same way (throttle low + yaw left). An LED on pin 13 shows the armed state.
- Gather the parts — the full bill of materials is in section 4.2 of the thesis. Core items: DJI F450 frame, 4× A2212 1000KV motors, 4× 30A ESCs, 10×4.5 propellers, 3S 11.1V LiPo, MPU-6050, 2× nRF24L01 (one PA/LNA), Arduino UNO + 2× Nano, joystick modules, veroboard.
- Assemble the hardware — wiring for every subsystem is documented in
firmware/README.md, with block diagrams inassets/diagrams/and reference photos of the real boards inassets/photos/. - Calibrate the ESCs — flash
esc_calibrationand run the serial procedure once per ESC (propellers off!). - Flash the radio —
radio_transmitterto the remote's Nano,radio_receiverto the on-board Nano. Calibrate the joystick ranges as described in the firmware README. - Flash the flight controller —
flight_controllerto the UNO. - Test on a bench first — constrain the frame so it can only rotate (as in chapter 4), verify auto-levelling, then tune the PID gains before free flight.
⚠️ Safety: spinning propellers are dangerous. Always remove propellers while calibrating, testing code changes, or tuning; do bench tests with the craft restrained; and disconnect the battery before touching wiring.
- Chapter 1 — Introduction. History and applications of quadcopters; the problem of proprietary black-box modules; motivation for a fully specified open platform; scope (attitude control via PID — altitude and autonomous navigation stay with the pilot).
- Chapter 2 — Related Works. Survey of quadcopter control research (state-space, MPC, LQR, H∞) and open-source platforms (CleanFlight, OpenPilot, Pixhawk); background on motor types, frame configurations (X, H, +) and overall system architecture.
- Chapter 3 — Methodology. The core of the work: reference frame and control objectives; component selection; how the accelerometer and gyroscope work, their trade-offs, and the complementary filter that fuses them; PID theory and its software implementation; software architecture and timing; and the hardware design of the flight controller, remote controller, ESCs and motors.
- Chapter 4 — Expected Results. Test-bench verification of the controller and the bill of materials (₦87,400 total, 2021 prices).
- Chapter 5 — Conclusion. Summary of contributions and future work (see below).
- Appendix. The complete Arduino source code, maintained as ready-to-use sketches in
firmware/.
The thesis' future-work section lays out natural next steps, any of which would make a solid student project on top of this platform:
- Replace the Euler-angle complementary filter with a quaternion-based filter (avoids singularities, better interpolation)
- Add yaw stabilisation (currently only roll and pitch are PID-controlled) and improve tuning
- Try advanced control — LQR or model predictive control — against the same hardware
- Add GPS / lidar / camera for autonomous navigation or data gathering
- Integrate the custom-designed ESC hardware described in the thesis
The firmware README also lists a few quirks preserved from the original code that are worthwhile first exercises for anyone studying it.
Oboh, E. O. (2021). Control Design and Hardware Implementation of a Multi-Rotor System (B.Eng thesis). Department of Computer Engineering, University of Benin, Nigeria.
Looking for the repository as it was originally uploaded? It is preserved unchanged on the v0 branch.





