Motor arm/kill switch for OpenTX and EdgeTX

Safe motor arming system

Powerful motors can cause serious injury! (Okay, so it's the prop that does the damage, but you get my drift...).

In this article I'll demonstrate a framework for creating arming systems which are (a) super safe and (b) avoid the need for switch checks at startup. Along the way you'll learn about the clever Sticky switch provided by EdgeTX and OpenTX. So join me as we explore how to do it.

Definitions

I'll use the following terms in the text:

The Sticky logical switch

The heart of an arming system is the 'Sticky' logical switch. Think of a sticky as an on/off switch where the 'on' and 'off' actions can be customised via parameters V1 and V2

Logical switch: Type=Sticky V1={switch for On} V2={switch for Off}

V1 and V2 may be physical or logical switches. As we'll see, using logical switches allows us to program simple gestures like 'stick in corner' - these are the heart of an arming system!

In the context of an arming system, V1 is the condition for arming, while V2 is for disarming.

How to guarantee that the motor is disarmed at startup

One great bonus of a sticky switch: we can ensure that the motor is always disarmed at startup without the need for switch checks.

To take advantage of this, we must ensure that the sticky evaluates to False (disarmed) at startup. That in turn means that the V1 parameter cannot be a standard physical switch (since we cannot guarantee its position). Instead V1 should represent a particular user action, like moving a stick to the corner or pulling a momentary switch.

Example 1: safe arming system

Okay, so that's the theory, now to the practice! We'll program a real arming system, with the emphasis on safety.

For this kind of system, (a) arming should be difficult and (b) disarming should be easy (but not so easy as to do it accidentallly whilst flying the model). So we'll use the following gestures:

Arm:

  1. Throttle to idle
  2. Elevator stick back
  3. Pull momentary switch briefly
Disarm:

Implementation

The logical switches are shown in the Companion screenshot below. SH is a momentary switch.

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: 'smart' arming switch

Many pilots like to use a simple 2-position switch for arming. The problem is that switch checks are necessary to ensure the switch starts in the disarmed position. However, by making it 'smart', we can do away with switch checks, by making it report 'Off' at startup, regardless of the actual position of the switch.

Here's the code, using switch SF.
SF↑ = Off and SF↓ is On.

L2: Edge SF↑ [0, infinite]

L3: Sticky (L2, SF↑)

The first line, L2, triggers a brief True pulse when SF transitions from Off to On. If SF starts in the On position, it will need to be moved Off then On. Therefore, regardless of the position of SF, L3 will always be False at startup.

Control the motor state

With the arming logic done, we can apply it to the motor channel. The method is the same regardless of the arming logic.

In the following example. CH7 is the motor channel. Two mixers are used:

CH7:Motor

Source=MAX Weight (−100%)

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

How it works:

Using Channel Override special function

In theory, you could use a Channel Override special function to turn off the motor. However there are some drawbacks:

I don't recommend this approach.

Download

Arming/kill switch demo

Requirements

  • For OpenTX 2.2 and above

Files

Safety first!