Development of hardware and software of the flight controller of an unmanned aerial vehicle
Students Name: Yazh Andrii Bohdanovych
Qualification Level: magister
Speciality: System Design
Institute: Institute of Computer Science and Information Technologies
Mode of Study: full
Academic Year: 2023-2024 н.р.
Language of Defence: ukrainian
Abstract: Yazh A.B., Holovatyy A.I. (supervisor). Development of hardware and software for UAV flight controller. Master’s thesis. – Lviv Polytechnic National University, Lviv, 2023. Extended abstract. In the master’s thesis, the hardware and software of the UAV flight controller (quadcopter) are developed. The controller provides air stabilization of the UAV, automatic holding the UAV at a constant altitude, flight control of the UAV (quadcopter): throttle, roll, pitch and yaw according to the received commands [1-3]. The UAV (quadcopter) flight controller is developed on the Arduino Nano board with the ATmega328 microcontroller, the GY-87 IMU module with 10 DOF, which contains a digital 3-axis accelerometer and a 3-axis gyroscope on the MPU-6050 chip, digital 3-axis magnetometer HMC5883L and digital atmospheric pressure sensor (barometer) BMP180 [4-6]. The UAV flight controller is developed on the Arduino Nano platform with an ATmega328P microcontroller, GY-87 sensor module (IMU) with 10 –DOF, which contains a 3-axis accelerometer and 3-axis gyroscope on the MPU-6050 chip, the digital 3-axis HMC5883L magnetometer and BMP180 digital atmospheric pressure sensor (barometer). The UAV (quadcopter) flight controller circuit is developed. The subroutines for gyroscope calibration, determination of roll, pitch and yaw rates using the MPU-6050 gyroscope are created. The subroutine for processing the PPM signal of commands from the radioreceiver and generating PWM signals for controlling the electronic speed controllers (ESC) of the engines is developed. The short-circuit protection circuit of the flight controller, a subroutine for monitoring the voltage, current consumption, determination of the initial battery capacity at start-up and remaining during the flight are developed. A PID speed control controller is developed and implemented in C language using the Arduino IDE [7,8]. The subroutines for calibrating the MPU-6050 accelerometer and measuring accelerations are created. Software and algorithm support for obtaining absolute angles of roll and pitch by the method of integration of angular velocities measured by the gyroscope and using the trigonometric method to the acceleration values measured by the accelerometer are developed. The Kalman filter for predicting roll angle and pitch is developed and implemented in software. A PID controller with quadcopter stabilization mode is created in C using the Arduino IDE [7,8]. The model of the UAV flight controller is assembled on a solderless breadboard and tested. The results of testing the hardware and software of the UAV flight controller make it possible to perform the further research of the flight controller on the physical model of the quadcopter (UAV). Keywords: UAV, quadcopter, flight controller, Arduino Nano, ATmega328P, IMU GY-87, MPU-6050, HMC5883L, BMP180, C/C++, embedded software, Arduino IDE. Study object – process of providing control of an unmanned aerial vehicle (quadrocopter). Scope of research – methods and means of controlling the flight of an unmanned aerial vehicle (quadcopter). Goal of research – development of hardware and software of the flight controller of an unmanned aerial vehicle (quadcopter). The master’s thesis is carried out on the department subject, which concerns the MEMS design and modeling. The results of the master’s research are discussed on the CADMD’2023 international conference (“CAD in Machinery Design: Implementation and Educational Issues, 26 – 28 October, Suprasl, Poland). Based on the conference results, the conference proceedings are published: Andriy Holovatyy, Andrzej Lukaszewicz, Wojciech Giernacki, Kostyantyn Kolesnyk, Artur Pitsyshyn, Andriy Yazh. Behavioral Modelling and Simulation of Microelectromechanical Gyroscopes. // XXXI International Conference. CAD in Machinery Design Implementation and Educational Issues. 26 - 28 October 2023, Suprasl, Poland, p. 19. Andriy Holovatyy, Kostyantyn Kolesnyk, Mykhaylo Lobur, Andriy Kernytskyy, Vladyslav Vichkovskyy, Andriy Yazh. Development of HDL Models of Heterogeneous Microsystems for Behavioral Level of Computer-Aided Design. // XXXI International Conference. CAD in Machinery Design Implementation and Educational Issues. 26 - 28 October 2023, Suprasl, Poland, p. 31. References. Juan-Yao Hong, Po-Jui Chiu, Chun-Da Pong and Chen-Yang Lan. Attitude and Altitude Control Design and Implementation of Quadrotor Using NI myRIO. // Electronics 2022, 12(7), 1526; https://doi.org/10.3390/electronics12071526. Baoxu Jia, Liguo Sun, Xiaoyu Liu, Shuting Xu, Wenqian Tan and Junkai Jiao. Carrier Aircraft Flight Controller Design by Synthesizing Preview and Nonlinear Control Laws. // Drones 2023, 7(3), 200; https://doi.org/10.3390/drones7030200. Michal Waliszkiewicz, Konrad Wojtowicz, Zdizslaw Rochala and Eulalia Balestrieri. The Design and Implementation of a Custom Platform for the Experimental Tuning of a Quadcopter Controller // Sensors 2020, 20(7), 1940; https://doi.org/10.3390/s20071940. Electronic resource on Arduino Nano. [Access mode]: https://docs.arduino.cc/hardware/nano, https://store.arduino.cc/products/arduino-nano. Electronic resource on the GY-87 module datasheet. [Access mode]: https://5.imimg.com/data5/LF/FE/MY-1833510/gy-87-10dof-mpu6050-hmc5883l-bmp180-sensor-module.pdf. Electronic resource on the MPU-6050 module. [Access mode]: https://cdn.sparkfun.com/datasheets/Sensors/Accelerometers/RM-MPU-6000A.pdf. Electronic resources on Arduino. [Access mode]: https://www.arduino.cc/, https://www.arduino.cc/en/Tutorial/HomePage, https://www.tutorialspoint.com/arduino/. Laurens Raes. Carbon Aeronautics quadcopter build and programming manual. First Edition, August 2022. Electronic resource. [Access mode]: https://github.com/CarbonAeronautics/Manual-Quadcopter-Drone.