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, flexible framework for designing a motor arming system which is both safe and easy to use. The technique is well proven in my E-Soar Plus template.

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 do we mean by 'safe'?

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 a virtual arming switch. When the switch is on, the motor is allowed to run. When it's off, the motor is forced to idle.

The second part consists of two mixers, one to force the motor to idle, and the other to pass control to the throttle stick/slider. The arming switch is used to switch between these two mixes.

The Sticky logical switch

For the arming switch, we use a Sticky logical switch. A Sticky combines the simplicity of a physical on/off switch, with the flexibility to customise the on and off actions. Here's a quick tutorial.

The Sticky is created in the Logical Switches menu. Parameters V1 and V2 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↓'.

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 at the moment of switch on. 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.)

However, 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 will only be armed when you carry out the gesture.

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 Override bypasses the mixer layer, resulting in some major drawbacks:

I therefore strongly discourage 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.

If you want a 'power-on' flight mode, define a logical switch to determine if the motor is running, and use that switch to trigger the power-on flight mode. (Whether the motor can actually run will be determined by the arming swiitch, as described above.)

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