Presentation is loading. Please wait.

Presentation is loading. Please wait.

Quadroter Control System

Similar presentations


Presentation on theme: "Quadroter Control System"— Presentation transcript:

1 Quadroter Control System
ELEC3300 Team Project Presentation Chen Qi, Liu Wenxin (Group 28)

2 Project description Our aim is to get familiar with and further improve basic quadcopter control system on STM32 embedded system. A simpler description: To make a drone that flies properly. - Controllable by a normal human-being

3 What we have Drone skeleton with motor and ESC (Electronic speed control), borrowed from DJI R&D

4 What we have Main board, bought from Taobao. With Captain Autopilot program in STM32F405. Sensors include Accelerometer, Magnetic induction meter, Barometer and Gyroscope. Port definition

5 What we have Power distribution board. Used for giving 12V to ESC and 3.3V to main board.

6 What we have Remote control, bought from Taobao. With 7-channel receiver.

7 What we have Ultrasonic MB1240, borrowed from ATC.
Wireless serial port. JLINK module. UART to micro USB module.

8 What else do we have… Battery and charger Cables and wires Propellers
Transistors and resistors

9 By now, with wings, it should be able to fly in Manual (M) mode
What we did First thing was to assemble the drone. Hardware. Weld the power distribution board. Make sure power goes into main board and ESCs correctly. Connect main board, power board and RC receiver to quadroter. Connect PWM output channels to ESC inputs, and RC receiver PWM outputs to main board inputs. Check channel connection, and design cable traces to minimize interference. By now, with wings, it should be able to fly in Manual (M) mode

10 By now, with wings, it should be able to fly in Manual (M) mode

11 What we did Test the control code on the main board. Result was…
Unstable system: Unable to control height, soaring up and crashing down, Extremely shaky, Going in different directions randomly, Almost unable to control with RC… A video of our very first trials…

12 What we did Study the Autopilot code in STM32F4.

13

14 Now we can record data while the drone is flying to debug
What we did Because we were using UART1 port to send data to PC with UART to USB module and cables, we couldn’t record and monitor data from the computer while the drone was flying. So we started working on wireless serial port. Weld the antenna and pins to the module. Set channel and bitrate using serial monitor. (Arduino in our case.) Test the communication. Now we can record data while the drone is flying to debug

15 Now we can record data while the drone is flying to debug

16

17 Barometer altitude output record.

18 What we did - TODO Through our research we found the following problems for our current drone: 1. Barometer output is not accurate -> height unstable; 2. Accelerometer has bias (zero offset); 3. Quadcopter shake – control PWM signal (PID); 4. Autopilot algorithm has a lot more to improve. (e.g. attitude estimation can be done through combination of different sensor output – in current case we didn’t use magnetometer). At this point, we made the decision to go for problem #1. We wanted to stable the height first.

19 What we did Add a new module – Ultrasonic MB1240
MB1240 outputs RS232 serial data. We have UART4 on the main board left unused. The signal line needs to be inverted. So we welded an inverter with transistor and resistors to make sure the signal transmitted to UART port can be recognized correctly. Use serial monitor to check validity of data. Connect to UART4 port on board. Write MB1240.c and relative code in Autopilot.

20 What we did MB1240.c Initialize USART(UART4) UART4 interrupt handler – save data to buffer according to protocol provided in the datasheet Average function Routine function – to be called in the main loop MB1240.h header file for MB1240.c Made changes in: common.c main.c MS5611.c Quadroter.c ...

21 What we did Adjust PID Lower P term in Roll, Pitch, Yaw PID
Set I term in Altitude PID to zero (It won’t integrate absolute error) Lower P term in vertical velocity PID Further adjustments to PD terms in Altitude PID to balance

22 Our result Video! We stabilized the drone to a certain degree.

23 Our result Barometer Altitude Output Ultrasonic Altitude output

24 More to work on Our ultrasonic sensor occasionally gives wrong height (highest value – 765cm) Graph indicates: Ultrasonic altitude output (case of failing) Video

25 Summary In this semester, we successfully built up a quadcopter and significantly improved its performance on self-stabilization through embedded system c programming and PID control. We had a good teamwork on the project. We witnessed the improvements in each other and the whole process of drone design, from both hardware and software perspective. However, we still have a lot more to improve. The accelerometer is not calibrated, and the algorithm isn’t perfect. Hopefully after the course demo, we will continue to add GPS module and realize localization and self hovering.

26 Acknowledgements: DJI Innovation – for providing us the skeleton Automatic Technology Center (LAB3126) – for lending us ultrasonic sensor You provided great support to our humble learning-oriented project. Chen Qi, Liu Wenxin


Download ppt "Quadroter Control System"

Similar presentations


Ads by Google