Safe motor arming system
Powerful motors can cause serious injury! Fortunately we can minimise if not completely eliminate the risk.
In this article I'll demonstrate how to create an arming system (a) with the emphasis on safety and (b) without the need for startup checks. You'll also learn how to use a powerful feature: the Sticky logical switch. By the end of the article, you'll know how to make your own customised arming system.
Definitions
First, let's define some terms:
- Arming: an action which allows the motor to run.
- Disarming: an action which prevents the motor from running, and stops it if already running. Note that killing is a special case of disarming, whereby the motor is disarmed unconditionally.
- Gesture: a user action which involves moving switches and/or sticks in a particular sequence.
The arming switch
From outside the black box, an arming system behaves like a simple switch. When the switch is On, the motor speed is controlled by the throttle control. When the switch is Off, the motor is forced to remain stopped.
In this article, we'll first examine how to implement the switch using a Sticky. Later, we'll integrate the switch into the motor mixer.
Using a Sticky logical switch
The Sticky works like a simple on/off switch, except that the 'on' and 'off' actions can be customised. As we'll see, this makes it ideal for arming.
The Sticky switch takes two parameter, V1 and V2. Each may be a physical or logical switch.
- When V1 transitions to True, the sticky goes True.
- When V2 transitions to True, the sticky goes False
Here's the simplest possible example, where a Sticky emulates a 2-position switch:
Of course, this is not very useful (it's equivalent to physical switch 'SF↓'). However, things get interesting when V1 and V2 are themselves logical switches, as this allows us to program gestures like 'stick in corner'. But before we explore further, let's explore another benefits of using a sticky...
Arming without switch checks
One of the cools things about a Sticky switch is that it's false by default. If we use a Sticky as the arming switch, we can be sure that the motor is disarmed at startup without switch checks.
However, to take advantage of this, we must ensure that the sticky doesn't go True (armed) immediately after startup. That means that V1 must not be a physical switch (since we cannot guarantee its position at the moment of power up - at least not without switch checks).
Instead V1 should represent a user-activated gesture, like moving a stick to the corner or pulling a momentary switch. Only when that gesture is fulfilled will the Sticky go True (armed). And that means that V1 must be a logical switch.
Example 1: arming switch using gestures
Okay, so let's create an arming switch, with the following goals: (a) arming should be difficult so it can't be done by accident and (b) disarming should be easy (but not so easy as to disarm accidentally). We'll use the following gestures:
Arming:
- Throttle to idle
- Elevator stick back
- Pull momentary switch briefly
Disarming:
- Pull and hold momentary switch SH for 2 secs
We'll use a Sticky switch. The V1 parameter will be the arming gesture, and V2 will be for disarming. The screenshot below shows the logical switches as they're entered in Companion.
Logical switch scheme
How it works:
- L3 is the Sticky switch for arming and disarming the motor. L1 is the arming gesture, and L5 is the disarm gesture.
- L1 is the arming gesture: throttle to idle + elevator fully back + pull SH.
- L5 is the disarm gesture:
- L5 goes True briefly, after L4 has been true for 2 seconds.
- L4 is true while SH is pulled, but not while arming ('!L1')
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' 2-position switch
Many pilots like to use a simple 2-position switch for arming. As I mentioned earlier, there's a problem with using a physical switch: we cannot guarantee that it's in the the 'Off' position (disarmed) at switch on.
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 arming switch L3 is False (disarmed) at startup. It'll go True (armed) when L2 triggers.
- L2 triggers a brief True pulse when SF ceases to be Off, in other words, when it transitions from Off to On.
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. When arming switch is Off, the motor is forced to idle. When On, control is passed to the throttle stick.
In the following example. 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:
- The mix first line ('MAX') sets the motor to motor off. This is the default state.
- The second line ('Thr') is active when L3 is true (motor armed). It passes control to the throttle stick. The 'multiplex' option must be set to 'Replace', so that the first line is ignored.
Using Channel Override special function
Some pilots use a Channel Override special function to turn off the motor. However there are some drawbacks:
- It is not possible to determine if the motor is running via a logical switch since Override bypasses the logic
- It's more difficult to debug since the logic is split between two menus
- There will be some data duplication.
I don't recommend this approach. (Interestingly FrSky seem to agree, since their Ethos operating system - while similar in many ways to EdgeTX - does not provide an override function).
Download
Arming/kill switch demo
Requirements
- For OpenTX 2.2 and above
Files
- MotorArmKill.otx (arming/kill switch operating on CH3)
Safety first!
- Remember to set the failsafe, so motor goes to idle on loss of signal
- Use the channel monitor to test operation before connecting up the motor
- Test, test and test again
