Introduction to using your OpenTx powered
Taranis Radio with an APM, PX4 or PixHawk
Your Host: Lee Schofield (Painless360)
To download a PDF copy of this article to your download location, click HERE
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://planner.ardupilot.com/ 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.
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.
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.
When 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 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.
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.
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.
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.)
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 Point Curve to Set Rotary Switch Outputs
Step Two: Assign it to the 6 Position Switch
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.
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.
Using the ‘Logical switches’ menu create a logical switch for each of the positions. Make sure that you cover each of the combinations:
Assign each of the values needed to one of the new logical switches.
Special Functions to Implement Logical Switches
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.
Taranis Simulator in Companion
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.
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:
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%).
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.
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.
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).
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.
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.