Open TX Ultimate Arm Switch
This is the second time that I have made an arm switch tutorial for this site. The first still works pretty well; but this method is even safer. It will not let you disarm the model until your throttle is low and your arming switch is in the disarmed position. With this system, it doesn’t matter if the throttle channel is reversed. Also, it will give feedback to let you know what’s going on. This is why I’ve called this the Ultimate Arm Switch for Open TX.
Please note that this arm switch is for traditional models. By which, I mean a receiver going to servos and throttle control. With the exception of the Vector, this setup is not for use with flight controllers. However, it should be fine with simple stabilisers like the EagleTree Guardian, HobbyEagle A3, and ZOHD KoPilot.
Isn’t there an easier way?
Before starting the tutorial, I want to mention a couple of things. Firstly, there are simpler ways of implementing an arm switch. However, that simplicity comes at a cost.
- A lot of people force the throttle channel to a value. However, this is a bad practice; where possible, it is safer to change the inputs before they have been altered by anything else.
- Some people just use a switch with no checks. This is really bad because it can allow you to arm with the throttle at full power.
- There is a way to do this same arm switch with less code, using a sticky switch. But that method does not allow for feedback from the transmitter. I always find feedback useful, because we all have brain farts from time to time. I will include the sticky version for those who don’t want the feedback.
So there is a little more to programming this switch. But don’t worry, we will go through all steps with explanations, like on the video. So at the end of this tutorial, not only will you have a great arm switch. But you will hopefully have more of an understanding of some of the more complex features in Open TX. So lets get started. If you are doing this on the transmitter, I would recommend watching the video. As on this page I will go through the steps using Open TX Companion.
Creating the arm switch
Adding a disarmed curve
As I mentioned earlier, some people modify the channel output to simulate that the throttle is low. We aren’t going to do that. We’re not creating a hack, this is the ultimate arm switch. Instead, we are going to use a curve on the actual throttle input its self. This will mean that when disarmed, the throttle input will be really be low. No faking conditions here.
Open your model and go to the curves page. With a curve, the left side of the graph is the stick all the way down or left. The right side is the stick all the way up or right. The bottom of the graph is no output and the top is full output.
We want to edit the first available curve. In this case it’s curve 1. We will give this the name Drm, short for Disarmed. We need to make this a 2 point curve and set both points to -100. You will end up with a flat line along the bottom of the curve graph. What this will do is modify how the throttle stick position is reported in the transmitter. No matter where the stick is, the throttle will see it as low.
Creating a status variable
We will now use a Global Variable to keep track of the arm status. It is a simple variable that will be set to:
- -1 will mean that arming is locked. You will not be able to arm until you disarm with the switch.
- 0 will mean that the system is disarmed.
- 1 will mean that the system is armed.
In Companion and some transmitters, the Global Variables are on the Flight Modes page. On some transmitters they have their own page. All we need to do is name our Gvar Arm. But remember which number Gvar is being used, because on some transmitters don’t show the name.
Adding the logic
Now we are going to add some logical switches. These will perform all the checking that we need to arm and disarm the system. So head over to the Logical Switches page.
Checking the arm state
First we need to create two logical switches that report the arm status. We will put these at the bottom of the page so that they are out the way. Logical switches are also overridden in order, so these will always work.
Sorry if this next paragraph sounds patronising, but I want this to be easy to understand for everyone; including people who have no experience in Open TX or programming logic whatsoever.
Both of these switches use the a=x function. This is a simple switch which is turned on when a is the same as x. In Open TX, a always represents a feature on the transmitter, such as a switch, input, pot, or Global Variable. X represents a value. When the switch is turned on, we say that its true or enabled. The switches we are using here are:
L63 a=x Gv1:Arm 0 L64 a=x Gv1:Arm 1
So when the Global Variable Arm is 0 (disarmed), Logical Switch L63 is true. Likewise, when Arm = 1, L64 is true.
Checking the throttle position
The next Logical switch that we’ll create uses a different function; this time a<x. So, instead of being equal, a must be less than the value in x. This switch tests the position of the throttle.
L59 a<x Thr -98
If the throttle is -98 or lower, which should be at the very bottom of the stick movement, the switch is true. Due to calibration, you will need to test this with your throttle. So when it’s right at the bottom, the switch should light up. If it doesn’t you may need to raise the -98 slightly. This is demonstrated in the video. If it’s any higher than -96, you should probably re-calibrate your sticks.
Monitoring the status
The final three logical switches are using the AND function. These switches are true when all the features being tested are true. The other thing that I should mention is that this is where I’m introducing the physical arming switch. I am using SF in this example, with the switch towards me as disarmed. These are the logical switches we will use
L60 AND L59 !L64 SF↑ L61 AND !L59 !L64 SF↑ L62 AND L60 L63
For L60, we first test that L59 is true. This means the throttle is right at the bottom. We are also testing that the arming switch is in the position to arm. L60 introduces a new concept in Open TX, which is !. When ! is used, it is saying not. So the !L64 is testing that L64 is not true, therefore the system is not armed. This means that the throttle is in the right position and you are trying to arm
L61 tests that the throttle is above the bottom, the system is not armed, and the switched is in the arm position. This means that you are trying to arm the system, but the throttle is too high. We will use this switch to put the system in the arming locked position.
The final switch, L62, checks to see if you are trying to arm, with the throttle low, and the system is disarmed, and not locked. This this is true, we will use this to arm the model.
Making it special
Next up, we need to add some special functions to change the arm state. These tie the whole system together in the ultimate arm switch for Open TX. Special Functions perform tasks on the transmitter when triggered by a switch. These include tasks like playing sounds and resetting timers. We will be using them to adjust the Global Variable. So lets go to the Special Functions page and get started.
We’ll now create three Special Functions to change the Arm Global Variable. If you remember earlier I mentioned to note down the Gvar number for the Arm variable? This is where we need to use it. We will used three of the Logical Switches that we created to set the variable.
SF1 L62 Adjust GV1 Value 1 ☑ SF2 L61 Adjust GV1 Value -1 ☑ SF3 SF↓ Adjust GV1 Value 0 ☑
SF1 will set the Arm Global Variable to 1 (armed) when L62 is true. SF2 will set the Arm variable to -1 (arming locked) when L61 is true. And finally, SF3 will set the Arm variable to 0 (disarmed) we put the physical arming switch (SF) in the disarmed position.
The final stage is to set up our arming system on the throttle it’s self. So head to the inputs page and we’ll modify the throttle settings. The first step is to edit the current throttle. All we need to do is add a switch and set it to L64. This means, that when the system is armed, it will use this throttle input.
Next we need to create a copy of this throttle input. In Open TX Companion, you can right click and duplicate the input. Next we need to edit this new throttle input. The first thing is to change the switch to !L64. This means that whenever the throttle is not armed, this throttle input will be used. The next step is to set the curve to the Drm curve that we made in the first step. This will mean that whenever this throttle is active, it is impossible to actually have anything other than zero throttle.
The throttle cut is now all set and working. You will now no longer be able to arm the throttle until the arm switch is in the disarmed position and the throttle is low. This is a very safe system, with one of the lowest chances of accidental arming you can get. This is why I’ve called it the Ultimate Arm Switch. One final thing we can do is add some more Special Functions to let us know what’s going on. So back to the Special Functions page.
We can add feedback to tell you when the throttle is armed and disarmed. We can also add an alert for letting you know that you can’t arm when the throttle is high.
SF4 L64 Play Track Your arm sound No repeat SF5 SF↓ Play Track Your disarm sound No repeat SF6 L61 Play Sound Siren 2s
SF4 is the sound that plays when the transmitter is armed. SF5 plays when the transmitter is disarmed. And SF6 will play a siren every 2 seconds when you’re trying to arm but can’t.
We now have the complete Open TX ultimate arm switch set up. You can now feel safe in the knowledge that your model will only arm when you want it to.
This article has helped 181 people. For more useful things, please check out my YouTube Channel.