For a detailed description, refer: https://projectsjalark.wordpress.com/2016/10/24/agroquad/
The schematics and Layout of the Flight Control Board can be found here: https://drive.google.com/open?id=0B2tfhqDjs2sUbGIwY3VqNENHMXc
Modules used:
- MPU6050 - Accelerometer and Gyroscope
- HMC5883L - Magnetometer
- HC-SR04 - Ultrasonic Sensor (For Collision Avoidance)
- uBlox 6M - GPS
- XBee S2 - Wireless Communication (ZigBee)
The Modules are interfaced with the flight control board and a wireless communication is set up using two XBees. The Quadcopter is controlled using a Ground Control Station based on Windows or Android. The source code includes the custom protocol used for communication with the Ground Control Station. However, for tests, a simple terminal application had been used.
The Status Paramters (Roll, Pitch and Yaw) of the System are obtained using the Acceleromter, Gyroscope and Magnetometer (MPU6050 and HMC5883L). A Kalman Filter for State Estimation had been designed for the Quadcopter used specifically for this project. For general purposes, a Complementary Filter is used. The source code also includes a Complex Complementary Filter. This had been tested to account for vibrations generated in the system. It's use, however, is not encouraged unless the user has well understood the Design of the Complex Complementary Filter.
The Status Parameters are used as an Input to the PID Control Loop. A fine tuning of the PID Gains is required in order to achieve a stable flight. The Control Parameters (Output of the PID Loop) are the changes in Motor Speeds given in Microseconds. 4 PWM Signals are used as inputs to ESCs which in turn control the Motor Speeds. A complex PID Loop was also designed. However, a very precise tuning is necessary for its use.
The Process of Measuring the Status Paramters along with obtaining the Output Signals is done in a periodic loop of 4ms.
The project was developed using Atollic TrueStudio for STM32F407. The Source Code includes routines for Communication with the Sensor Modules and XBee. The Complementary Filter and PID Control Loop can be used with some tuning. It is important to note that the Code Calibrates ESCs everytime upon reset. REMOVE THE LINE FROM THE MAIN FILE: "Init_Motors();" in case the ESCs are calibrated. For testing purposes a terminal program can be used. The USART Interrupt is used to control the Desired State of the Quadcoter.
To directly import the Code for Atollic TrueStudio, follow: https://drive.google.com/open?id=0B2tfhqDjs2sURm9MTkpRb2diN3c
Project Developed by Siddhant Gangapurwala (Author).
I would like to thank Shreyas Shah for his help in the design of the Flight Control Board. Also, Prof. Pavan Borra for his support throughout this project.