In this post we detail our configuration of the APM/Pixhawk mode selection on Taranis.
After fiddling around and watching many great youtube videos we decided that came up with a way which seemed simpler, to us anyway. Our main gripe with the standard methods, which work fine I might add, is that they are principally based on the T9X setup. This method uses the maths in the mixer screen to change modes. Essentially, as you cycle through the switches the maths gets more complicated as the next mix uses the results from the previous mix to calculate the required result. This build up over several mixes creates a dependency which can be quite fiddly as a change to one will affect the others.
We came up with a method where each mode was independent of each other. As a result, you can quickly fine tune one mode and not have to continuously check the others modes to see if they had moved. Although in our experience with this method, near enough was good enough as there is no multiplier effect.
The Taranis has many 3 position switches, 2 pots and 2 sliders and a 1 position switch. As there is no 6+ position switch, we have chosen to use the two 3 position switches, SC and SD. The SC switch acts as a toggle wheres as the SD goes through the 3 modes. This essentially gives you six modes (2×3). Although The SC switch has 3 positions, we are only using two of these. If the Mission Planner could handle more mixes these two switches could potentially deliver 9 modes (3×3).
Please note what each mode corresponds to in your APM/Pixhawk is irrelevant as the the modes are defined in your Mission planner. Our goal here is nothing more than to have a specific RC channel, channel 8 in our case, deliver a predefined PWN signal. The PWN signal is typically designated by a number between 1000 is 2000. In other words, as we flick the various switches, we want the Taranis to spit out a redetermined PWN number. The APM will recognise that number within a defined PWN number range, and correlate that with a mode you specified in Mission Planner.
The first step is to create six custom switches with each custom switches being a mode. Essentially, custom switches are variables which are Boolean in nature, either on or off. They are not actual switches but rather a virtual switch. As one switch is ON we want to make that all other custom switches are OFF.
As there is no 6 position switch, we will use two physical switches and link them in the software with the AND operand. In other words, if switch 1 AND switch 2 are in a defined position, the custom switch will be ON. As we only want one mode at a time, we need to be careful that no two custom switches are in the ON position at one time.
Follow the steps, we use companion9x to create the following switches, Feel free to use alternative two physical switches including the Sf two position switch.
In the first step, we linked physical switch positions to Custom Switches. We now link the Custom Switches to a radio Channel being 8 in this example. You are welcome to use any channel. You also need to make sure the same channel is selected in Mission Planner.For example, in the mission planner image above, channel 5 was used.
On the mixer menu, add the following mixes to your chosen channel, any order is fine. Key points to note are as follows:
- This weight/percentage is mathematically applied to the system’s global static variable, MAX.
- The MAX variable is essentially a PWN number of 2000
- When your CS1 is switched ON, it will then deliver a 2000 PWN result on channel 8.
- Importantly, no other custom switch is active or ON at the same time.
- We used the REPLACE method meaning that none of the results for channel 8 would be added to this result. Each result is independent, it replaces the previous result above.
Once this is done, all you need to do is test it. Initially you can do this with the Taranis or companion9x. On the servos page, select the relevant channel and you will see the PWM result at the top as you scroll through the switches.
After you are happy with the values, connect up to Mission Planner and fine tune the percentages for each mode making sure the result is close to the middle of the range for that mode.
If you have any questions, please post a comment below.
In our next post we will detail how to connect sounds to each of the modes. This quite useful when looking up at your plane and want confirmation of which mode you have selected.