OpenTX logo
Safe motor arming system

Safe motor arming system

Introduction to arming

With the high power output of modern electric motors, safety has never been of greater importance, yet our radios provide only weak protection.

In this article, I describe a simple framework for a safe motor arming system. The technique is very flexible and well proven in my E-Soar Plus templates.

By the end of the article, you should be able to design and construct your own customised system. You'll also learn how to use the powerful Sticky logical switch.

Definitions of terms

First let's define some commonly used terms:

What is a 'safe' arming system?

So what do we mean by a 'safe' system? I'll throw out four key conditions which must be satisfied:

Implementation overview

An arming system consists conceptually of two parts.

The first part is the arming switch. From the point of view of the motor, the arming system acts like a switch. When the switch is 'On', the motor is armed and allowed to run. 'Off' means it's disarmed and stopped. In reality, our switch will be a sticky logical switch as this provides much more flexibility than a real switch.

The second part consists of two mixes, one to control the motor using the throttle, and the other to force it stopped. The arming switch is used to switch between these two mixes.

The Sticky logical switch

For the arming logic, we will use a Sticky logical switch. Here's a quick tutorial.

A Sticky acts like a physical on/off switch, except that the 'on' and 'off' actions can be customised. The Sticky takes two parameters, V1 and V2. These define the on and off triggers. Each trigger may be a physical or logical switch.

LS1: Type=Sticky, V1={On trigger}, V2={Off trigger}

A simple example, where a Sticky mimics a 2-position switch:

LS1: Type=Sticky, V1=SF↓, V2=SF↑

With the example above, moving SF down flips LS1 true. Moving it up flips LS1 false. In effect, LS1 is equivalent to 'SF↓'. Not very useful!

Things get more interesting when triggers are themselves logical switches, as this allows us to flip the sticky using gestures like 'stick in corner + pull momentary'. But before we explore further, let's explore another benefit of using a sticky...

Arming without switch checks

One of the cool things about a Sticky switch is that it's off (false) by default. This means that the motor is guaranteed to be safe until the 'on' gesture is carried out - without the need for switch checks. (Avoiding switch checks is a safety benefit since switch checks are easily bypassed.)

There's one condition which you, the programmer, should observe when programmig the sticky switch: namely, the arming condition (V1 parameter) must not be a regular 2- or 3-p switch. Why? Because if - perhaps by mistake - the switch is in the On position at startup, the sticky switch will immediately transition to On and the motor will be armed - something we specifically want to avoid.

Instead, V1 should be either a momentary switch, or a logical switch representing a complex gesture. That way, the motor only will be armed when you decide!

Example 1: arming using a complex gesture

Okay, we're now ready to create our first 'safe' arming system. First, we need to specifiy the degree of safety needed as these will guide our choices of gesture for arming and disarming. It's up to you to decide on the balance between security and convenience, but for our first example let's set the following goals:

To this end, we'll use a 3-step gesture for arming, and a simple gesture for disarming.

Arming:

  1. Move throttle stick to idle
  2. Move elevator stick fully back
  3. Pull momentary switch briefly

Disarming:

The screenshot below shows the logical switch scheme as they're entered in Companion.

image

Logical switch scheme

How it works:

Note that 'Thr' and 'Ele' refer to sticks (not inputs). In the mixer menu, inputs are prefixed with 'I', sticks have no prefix.

Example 2: arming via 'smart' 2-position switch

Some F5J competition pilots like to use a simple 2-position switch for arming. However, there's a problem with using a regular switch: we cannot guarantee that it's in the 'Off' position (disarmed) at switch on. That disqualifies it from being 'safe'.

However, there's a trick that we can apply so that the switch reports 'Off' at startup, regardless of the actual position. To do this, we put the physical switch behind a Sticky logical switch, with further logic for the V1 (True) parameter. Here's an example showing how 2-position SF can be made smart:

L2: Edge SF↑ [0, infinite]

L3: Sticky (L2, SF↑) -- arming switch

The key here is the word 'transition'. If SF is On at startup, it must be toggled Off-to-On in order to arm. [Credit to Jesper Frickmann for this snippet.]

Note: In practice, a condition would be added to L2 for the throttle to be at idle.

Integrating the arming switch

We've seen how to program an arming switch. In this section, we learn how to apply it to the motor channel. Two mixers are needed, one to force the motor to idle (the default condition), and a second 'Replace' mix to pass control to the throttle stick when the system is armed.

In the example below, CH7 is the motor channel, and L3 is the sticky arming switch.

CH7:Motor

Source=MAX Weight (−100%)

Source=Thr Weight (+100%) Switch (L3) Multiplex=REPLACE

How it works:

Notes:

The Override special function - not!

Some pilots use the 'Channel override' special function to turn off the motor. However it has some major drawbacks:

I don't recommend this approach. (Interestingly FrSky agree, since their Ethos operating system - while similar in many ways to EdgeTX - does not provide an override function).

Flight mode considerations

So far we've made no mention of flight modes, and that's for a simple reason: the arming system should be independent of flight mode. So, if you have different flight modes for the power-on and power-off phase, your arming system logic does not need to take this into account.

Conversely, any 'power-on' flight modes should not be triggered by the arming system. Instead, define a logical switch to determine if the motor is actually running, and use that switch to trigger the power-on flight mode.

Logical switches

Lxx: CH7(motor) > -100 -- true if motor running

Flight modes

FM:Power switch=Lxx

Download

Arming/kill switch demo

Requirements

  • For OpenTX 2.2 and above

Files

Safety first!

Links