Donkey Quad Tips: Flight Controller

My original build uses the Hobbyking MultiWii MicroWii ATmega32U4 Flight Controller, running the open source MultiWii 2.3 firmware.

Here's a copy of the Flight Controller Manual

This FC uses the Atmel Atmega32U4 microcontroller.  This flight controller is basically an Arduino Leonardo clone with a few added components:
  • MPU6050 6-axis MEMs gyro (3 axis gyro + 3 axis accelerometer)
  • HMC-5883L Magnetometer (compass heading)
  • MS5611-01BA03 Pressure sensor (barometric altimeter)
The MPU6050 contains the magic fairy dust that makes flight stability and auto-leveling possible.
The magnetometer makes "heading hold" or "turn to specific heading" possible
The altimeter makes "altitude hold" or "fly to specific altitude" possible.

Note: The Atmega32U4 only has one serial UART, and we're using it for the OrangeRX R100 DSM2 satellite radio receiver.  This precludes the addition of GPS, OSD, Bluetooth interface, or anything else that would require a serial connection to MultiWii.  If you want to upgrade the quad with one of these functions you will either have to replace the R100 with a standard RC or PPM-SUM RX to free up the serial port, or upgrade the flight controller to one based on the Mega2560 (which has 4 uarts, more flash, and is much more suited to things like GPS and OSDs.)

Read about MultiWii 2.3, and in particular how to use MultiWiiConf GUI to tune the parameters or make option switch changes!

You can download the complete MultiWii 2.3 code (along with the GUI - MultiWiiConf) here:

Here's the MultiWii 2.3 config.h I used for this quad if you're interested in building or changing the firmware.  

The multirotor forums are a great source of information on Multiwii PID tuning, configuration, et al.

Flight stability and control is done via a collection of PID control loops, and the gain for each parameter (Proportional, Integral, and Derivative) is adjustable for each PID loop.  You can read the official, somewhat outdated description of MultiWii PID tuning but you may find it inadequate.  Some google searches (and plain ol' experimenting) will help you wrap your mind around what's happening.

Note: PID tuning is half science, half art.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.