Using Flight Controllers

Introduction to using your OpenTx powered

Taranis Radio with an APM, PX4 or PixHawk

Flight Controller

Your Host:  Lee Schofield (Painless360)

To download a PDF copy of this article to your download location, click HERE

Introduction:

In recent years one of the most popular models for pilots and builders to build is the multirotor. The explosion in multirotors has accelerated the introduction of a large number of flight controllers onto the market.

One of the most capable flight controllers for smooth aerial video, FPV and autonomous flight are the controllers that run with Mission Planner – the APM, PX4 and PixHawk. Mission Planner is a software application similar to OpenTX Companion that is used to configure your flight controller. See http://ardupilot.org/planner/ for more detail.

You can see a complete set of videos that cover all aspects of the APM and its setup in my video series here: APM Video Series by Painless360 .

You can watch a series on YouTube that covers the setup and configuration of the PX4 and PixHawk by visiting Introduction to PixHawk Flight Controller .

In this article we will cover how to configure your Taranis radio to get the best from these flight controllers and discuss the basic steps. We will not discuss telemetry setup in this article but will dedicate another paper to that topic.

Configuring the main flight controls

 

As with any model these flight controllers need the normal controls for flight – throttle, elevator, aileron and rudder. In addition to the basic four flight controls the flight controller (FC) also needs a ‘mode’ channel to tell it how you want it to fly and another channel or two for key operations like auto tune to help setup.

Channel order and PPM/S-BUS

The APM supports PWM (Pulse Width Modulation) connection while the PixHawk only supports PPM (Pulse Position Modulation) and S-BUS. Channel order when using PPM/S-Bus is critical as the FC expects the channels in a very specific order.

2-Taranis_WebWhen setting up your model using CPPM or S-BUS setup the channels in this order:

  • CH1: Aileron
  • CH2: Elevator
  • CH3: Throttle
  • CH4: Rudder
  • CH5: Flight Mode Switch
  • CH7: Auto Tune Switch
  • CH8: Aux Switch

 

Using Exponential and D/R

Using exponential on the main flight controls (aileron, elevator and throttle) is recommended. Modern flight controllers allow you to setup expo on the board itself and while this can provide improved resolution it does not allow for altering this value ‘on the fly’ using the Taranis Radio.

Dual rates are of less value when using the APM or PixHawk as the FC has many setting like the maximum lean angle to help with the flight and stability.

Mode Channel

This is one of the areas that create the most questions.

In Mission Planner, a pilot can setup and configure up to 6 flight modes that change how the flight behaves. These modes are selected by changing the value of channel 5. As the PWM value of channel 5 changes, the mode selected changes. Modes available include Stabilize, Acro, AltHold, Auto, Guided, Loiter, RTL, Circle, Land, OF_Loiter, Drift, Sport and PosHold.

For a full detailed overview of how all of these flight modes work and what they do you can watch this video – Introduction to APM Flight Modes.

3-Mode_Channel_WebMission Planner Flight Modes Screen

Any three position switch can be used to send a value of -100%, 0 and +100% via channel 5. This will allow you to select three flight modes. Commonly pilots are looking to be able to control all six directly from the Taranis and there are two main ways to do this. Fitting and using a six position switch or using a combination of two existing switches.

 

Using a 6 position switch

3-Way Switch S3 Replaced w/6-Position Rotary Switch

3-Way Switch S3 Replaced w/6-Position Rotary Switch

An option for the APM/Pixhawk pilot is to install and use a six position switch. This can replace one of the existing S1 or S2 controls on the shoulders of the radio but a popular option is to install the new switch into the top of the radio and assign it as S3 in the OpenTX in the ‘Hardware’ menu in the radio setup menus.

*Note the S3 switch is not currently available in the OpenTX Companion radio emulator (June 2015)

For a video that shows the entire process you can watch Taranis Plus: Installing a 6-Position Switch

The challenge is that the default PWM values sent by the 6 position switch do not correspond to the values needed by the APM or PixHawk. To make this work you need to alter the PWM so the switch outputs land firmly in the middle of the PWM ranges for each of the six flight modes (roughly 1040, 1300, 1550, 1700 and 1900). (See below.)

5-Mapping_6_Position_Web Switch Positions Correlated to PWM Values and Curve Data Points

 Step One: Create a custom Curve

There are many ways to do this in the radio but one of the easiest is to create a custom curve using these values in the radio as shown here.

6-Custom_Curve_Web

 6 Point Curve to Set Rotary Switch Outputs

Step Two: Assign it to the 6 Position Switch

Input Screen for CH-5 Mode

Input Screen for CH-5 Mode

Create an input, then assign the new curve to the input so that the new PWM values are sent to the flight controller for each of the switch positions.

Using the Servo menu is a useful way to check that the PWM values you want are being sent at each switch position. Select the CH5 mode channel and move the 6 position switch and confirm that the PWM value shown at the top of the screen is in the middle of the ranges shown in the image at the top of this section.

 8-PWM_Check_WebCH5 Servo Output at 1705 Microseconds

Selecting 6 modes using a mix and two existing switches.

The second method, that it slightly longer but allows you to use two switches already on your radio is outlined below. In this example we will use SE (three positions) and SF (two positions) to give is us the six positions we need to assign to the mode channel to select all six flight modes.

Step One: Create the logical switches for each SE/SF switch combinations

Using the ‘Logical switches’ menu create a logical switch for each of the positions. Make sure that you cover each of the combinations:

9A-Logical_Switches_WebLogical Switch Table for 2-Switch Operation

Step Two: Assign each of these logical switches to override the Mode channel

Assign each of the values needed to one of the new logical switches.

 10-Special_Functions_WebSpecial Functions to Implement Logical Switches

Step Three: Test the PWM values using the Servo menu

Use the servo menu as you move SE and SF to check that the PWM values on the Mode channel CH5 are in the middle of the ranges the APM/PixHawk needs for each mode at the top of this section. In the example below the value is 1705 which would be ‘Mode 5’ on the flight controller.

 11-PWM_Check_WebTaranis Simulator in Companion


Using Flight Modes

Now that you can select six flight modes you can go back into Mission Planner and decide on what each switch position does.

It can become easy to lose track of which switch position(s) deliver which modes so using Flight Modes is an excellent way to remind yourself of which mode you are in and which mode you have selected. The flight mode can be edited to show the name of the mode you have setup in Mission Planner and also play a suitable sound clip.

Assigning flight modes with using a combination of two switches.

Simply assign each of the flight modes, with the updated names that match the modes you have setup on in Mission Planner, to the logical switch already setup up in the previous step. See Flight Mode names, below:

 12-Flight_Modes_2Switches_WebFlight Mode Names Correlating to Mission Planner Modes

Assigning flight modes with the 6 position switch

The easiest way to do this is by creating 6 logical switches that turn on when the value of the CH% mode channel is at one of the pre-defined values (-90%, -40%, -20%, 10%, 40% and 80%).

 13-Flight_Modes_6-Position_WebCreating Logical Switches for Flight Mode Operation

 Then assign each of the flight modes, with the updated names that match the modes you have setup on in Mission Planner, to the logical switch setup up in the previous step.

 14-Create_Flight_Modes_Companion_WebAssigning FM1 to Logical Switch L1

Once setup the radio will display the mode you are in on the screen and, by also setting up voice alerts, will announce it too. The simulated display is showing the GPS RTH mode.

15-GPS_RTH_WebTaranis Main Screen w/FM6 (GPS-RTH) Selected

The ‘Oh No’ switch and failsafe

The APM and PixHawk flight controllers have excellent GPS abilities with the ability to fly back to where it was armed autonomously, at a predetermined height then land and disarm – all without pilot intervention. This mode is called RTL (Return to Launch).

The ‘Oh No’ switch

Assigning a single switch that will override the Mode value and force the flight controller to come back to you is very useful. Often, in the heat of the moment, trying to remember which combination of switches of position of a rotating control will initiate RTL can mean the difference between recovering the craft and crashing. It is recommended that you also setup one switch with only one purpose – to engage RTL and override all other controls. Use the ‘Special Function’ menu to create the override.

Setting up failsafe

In Mission Planner you can tell the flight controller how to detect a failsafe and what to do when it sees it. Make sure that the failsafe on the receiver is setup and sends the appropriate signal level to the FC to initiate a RTL. You can learn more by watching Setting Up Throttle Failsafe.