Thread Tools
Jan 18, 2014, 09:55 AM
AMA 697691 / FAA 13675
Thread OP

Multiwii Airplane


After not finding a thread on RCG, I decided to start a thread devoted to Multiwii Airplane mode. Since the Multiwii boards are essentially "Multirotor Electronics", this forum seemed as good as any to become the host.

Feel free to post your Multiwii Airplane projects here of any kind. I'll add more links as we gain information.

Most of my limited knowledge on the subject has come from the Multiwii forums. For my initial project, I used an older Witespy Pro2 board with Multiwii v 2.3. It doesn't really matter what board you use but the goal is to eventually use GPS for RTH and waypoint features (much like APM:Plane or Arduplane). Notice that I changed the orientation of the board 90 degrees so that it would fit inside the fuselage. As long as <#define MEGA_HW_PWM_SERVOS> is commented out in config.h, it uses the same "D" outputs as a quadcopter.

The servo table below is from PatrikE's article and essentially shows the connections you need. For my setup, I am using the bottom 4 rows in the MEGA and Airplane columns (highlighted in blue). These are the same connections used on a quadcopter.

On my Skywalker FPV plane, the ailerons are controlled by only one line and the Y-harness connects to a servo on each wing. The aileron control is reversed mechanically so I only need the "Wing2" control on D6 from Multiwii.

************* Multiwii Airplane Changes for MEGA Pro Boards in config.h *************
#define AIRPLANE
#define FREEIMUv043
#define MPU6050_LPF_20HZ
#define GPS_BAUD   115200
#define UBLOX
#define MAG_DECLINIATION  -11.62f  //For Rochester, NY
************* How to Change MEGA Pro Board Orientation in def.h *************
#if defined(FREEIMUv043)  || defined(MICROWII)
  #define MPU6050
  #define HMC5883
  #define MS561101BA
//  #define ACC_ORIENTATION(X, Y, Z)  {imu.accADC[ROLL]  = -X; imu.accADC[PITCH]  = -Y; imu.accADC[YAW]  =  Z;}
//  #define GYRO_ORIENTATION(X, Y, Z) {imu.gyroADC[ROLL] =  Y; imu.gyroADC[PITCH] = -X; imu.gyroADC[YAW] = -Z;}
//  #define MAG_ORIENTATION(X, Y, Z)  {imu.magADC[ROLL]  =  X; imu.magADC[PITCH]  =  Y; imu.magADC[YAW]  = -Z;}

  //the white arrow on the board now faces 90 degrees to the right so it fits in the Skywalker FPV
  #define ACC_ORIENTATION(X, Y, Z)  {imu.accADC[ROLL]  = -Y; imu.accADC[PITCH]  =  X; imu.accADC[YAW]  =  Z;}
  #define GYRO_ORIENTATION(X, Y, Z) {imu.gyroADC[ROLL] = -X; imu.gyroADC[PITCH] = -Y; imu.gyroADC[YAW] = -Z;}
  #define MAG_ORIENTATION(X, Y, Z)  {imu.magADC[ROLL]  =  Y; imu.magADC[PITCH]  = -X; imu.magADC[YAW]  = -Z;}
  #define MPU6050_I2C_AUX_MASTER // MAG connected to the AUX I2C bus of MPU6050
Step1: Is to test PASSTHRU and HORIZON modes on my SkyWalker FPV plane without giving throttle control to Multiwii. This tested out nicely on the ground so it is time to test it in the air. HORIZON mode uses both the gyros and ACC to keep the plane level and true in direction.

Step2: Is to use the special RTH branch code of Multiwii that works with the v2.3 GUI. It uses throttle control to maintain a user programmable altitude while Returning To Home. I believe that this branch of code is authored by Patrik Emilsson of France.

Some interesting links:
PatrikE's - Multiwii GPS Airplane New!
PatrikE's - How to Setup a Multiwii Airplane and Flying Wing
Multiwii Forum - Airplane Mode Thread
Multiwii Forum - Airplane Mode RTH Thread
Airplane Mode RTH Code
Whitespy $15.00 Flip MWC flying wing mode
Flying Lantern
Using Gyros on an RC airplane

-------------------------------------------------- Airplane RTH Code Notes ------------------------------------------------------
  1. If the GPS HOLD mode stays on all the time then it's probably the Failsafe function that detects unusual values. An example would be when the throttle reaches lower than the failsafe threshold (Set to 980Ás in config). Change the threshold value in config.h or limit the rates on your transmitter. This is a good thing to check on all control surfaces when using the Airplane RTH code.
  2. Flying wings are prone to oscillate due to the short momentum arm. Multiwii uses LPF 256 as the default setting so lower your LPF to 20 or 42 in config.h to be closer to APM.
  3. TPA should dampen PID's between 50-100% throttle. The default TPA of 50 for Airplane Mode means that ramping starts at 50% throttle. At full throttle, the PID is reduced with 50%
  4. In Gps.h, #define CLIMBTHROTTLE 1900 // Max allowed throttle in GPS modes.
Last edited by Greg Covey; Mar 22, 2015 at 08:11 AM.
Sign up now
to remove ads between posts
Jan 18, 2014, 10:16 AM
Registered User
Cool project. Subscribed and watching, don't know enough to add anything but planning to try this someday.
Jan 18, 2014, 08:15 PM
Registered User
Killer, Greg! I really want to try this on a future fixed wing project. Had this in the back of my mind for months. I'll check out the links and grab all the data.
Jan 19, 2014, 09:18 AM
AMA 697691 / FAA 13675
Thread OP
Thanks. I had gotten into FPV for a while before getting hooked on MRC for AP/AV flying. It dawned on me that I had all the spare components to create a longer range plane that could be equipped with some autonomous flight features. The nice thing about Multiwii is that you can use almost any spare plane and controller, and, add GPS, if you like. The MW WinGUI allows you to reverse the servo channel control so when my rudder compensated the wrong direction, it was an easy checkbox change in the GUI.

My guess is that PatrikE's code will eventually become part of a Multiwii release but it seems like it is working now. I like to take smaller steps in my testing to help understand the operation and keep things safer. This is the reason I am not giving throttle control to Multiwii on my initial testing.

Too bad winter isn't cooperating this weekend...time to be patient.
Last edited by Greg Covey; Jan 19, 2014 at 09:37 AM.
Jan 19, 2014, 08:35 PM
Registered User
You could start by scraping together a hook up diagram, i.e. what goes to what, and a basic config.h edit. This information doesn't seem to be out there anywhere in comprehensive form. For instance, the plane I have, still in the box unbuilt, doesn't have rudders, only ailerons. So, like, what so you do with that in the config.h ??
Jan 20, 2014, 12:44 PM
AMA 697691 / FAA 13675
Thread OP
The "How To" article linked in post #1 has some of the information you wanted. I also added some code snippets in post #1 to show what I have changed in the released Multiwii v2.3 code for my Witespy MEGA Pro2 board.

The diagram below is from PatrikE's article and essentially shows the connections you need. For my setup, I am using the bottom 4 rows in the MEGA and Airplane columns (highlighted in blue). These are the same connections used on a quadcopter.

On my Skywalker FPV plane, the ailerons are controlled by only one line and the Y-harness connects to a servo on each wing. The aileron control is reversed mechanically so I only need the "Wing2" control on D6 from Multiwii.

If your plane doesn't have a rudder, you simply don't run a connection from the Multiwii board "D2" to the rudder servo. Multiwii doesn't care if the control doesn't exist so you can use only rudder or only aileron or both.

As for the "Airplane Mode RTH" software, I don't know how that works without rudder yet so you could ask the author directly in the Multiwii forum using the link in post#1.
Last edited by Greg Covey; Jan 20, 2014 at 04:16 PM.
Jan 20, 2014, 01:03 PM
Registered User
Subscribed and will be doing a similar install on a Twinstar 2.
Jan 20, 2014, 04:46 PM
Discovering the joys of flying
Adilson's Avatar
Thinking very hard about doing something like that using my S1500 fro HK
I'm between using Multiwii or a Crius with ArduplaneNG as shown here
Jan 27, 2014, 02:37 PM
Registered User
Greg, I know you were trying to run MegaPirateNG and Arducopter on Pro boards and it was too much work. Is Adilson's approach different? I do like the APM feature set and interface.
Jan 27, 2014, 05:28 PM
AMA 697691 / FAA 13675
Thread OP

His approach was using older (v2.x) versions of MPNG which weren't a problem. It also works well the the Crius AIOP board.

The Multiwii Pro boards have not worked well with MPNG v3.1. Perhaps that will change now that Sir Alex has some of Paul's hardware.

The new Arduflyer clone boards (RC Timer and ReadytoFlyer) are now so inexpensive that you might as well go with the regular APM code for several reasons. First, it utilizes the 4MP dataflash chip for automatic data logging, flight recording and setup analysis like vibration measurement. Second, the APM firmware is highly integrated into Mission Planner such that you no longer need to use Arduino. You can update code on the fly right from Mission Planner.
Latest blog entry: Greg's Web Hangar
Jan 31, 2014, 12:35 PM
Multiwii noob
pacoswava's Avatar
Greg, looking to pick up some hardware to do this. I'm wanting something with a small form factor, cheap with gps and minim osd. I'm thinking either the Pro ez3.0 or the flip ez with nav board and gps (all from paul of course). I see that flip ez shows bluetooth, but can that be swapped to use minim osd instead? The flip would be smaller and cheaper, so i'm hoping to go that direction. Thanks in advance.
Feb 13, 2014, 01:58 PM
Registered User
Subscribed. As a long-time MWC user I have been thinking about using one of these small FC's to help stabilize an FPV parkflyer setup. It would be a bonus to be able to connect the KV_OSD modded mavlink OSD to display the flight mode, AHI, Voltage, RSSI, etc...

I would really like to be able to have it stabilize the plane in wind but also be able to activate a level flight mode to aid keeping the model flying level while I look around with the Trinity Head Tracker!
Feb 13, 2014, 05:32 PM
AMA 697691 / FAA 13675
Thread OP

Welcome aboard! I think the two Multiwii features that provide benefit over using just a stabilizer like the AS3X Spektrum receiver are the GPS and MinimOSD capability.

I'm starting without either and then I add GPS and then MinimOSD.

The rumor is that we're in for a break in the weather next weekend so it will be fun to try some tests that have been backed up for months.
Latest blog entry: Greg's Web Hangar
Feb 13, 2014, 05:47 PM
Registered User
Thanks! I really love the $15 FLIP 1.5 controller and his new KV_MOD OSD works very well with it in a nice cheap package. Now I need to figure out which FC board I want for the airplane project and how the GPS stuff works. I have some reading to do!
Feb 13, 2014, 05:59 PM
Registered User
Thanks for the docs. I was digging through the 2.3 code the other day to figure out about the pin assignment change, I had no idea about the #define MEGA_HW_PWM_SERVOS... I guess I'm back on this project, Thanks!

Quick Reply

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Multiwii Airplane V-Tail Mix / 2 Servos for Elevator??? rojowe UAV - Unmanned Aerial Vehicles 9 Dec 04, 2015 09:41 PM
Question MultiWii 2.4: Yaw creep in airplane acro/horizon mode spagoziak Multirotor Drone Electronics 1 Nov 04, 2015 11:14 PM
New Product *** mMWC shield - add ACC/Gyro stabilisation to airplane with multiwii kornetto FPV Talk 7 Aug 15, 2012 01:55 AM
New Product *** mMWC shield - the mini MultiWii Shield for airplane stabilisation kornetto FPV Talk 1 Jul 04, 2012 08:21 AM