How to make a sequencer (it's easy!)

Introduction to sequencers

Sequencers are a cool way of getting servos to follow a predefined sequence. They're great for retractable undercarriages, swing wing systems, turbine startup sequences, and bomb dropping mechanisms.

In this article I describe a simple method for creating a sequencer. Unlike other methods you might see on YouTube, it doesn't rely on delays and logical switches. Instead, it uses an intuitive time based system. The method supports

Time-based sequencing method

The method is simple, with just two elements:

So let's get started with a real life example...

Example: an undercarriage sequencer

As an example, we'll make a sequencer for a retractable undercarriage. We'll assume two servos - one for the door, the other for the gear. SF is the retract switch. The total transit time is 6 seconds.

The goal is to achieve the following sequence pattern:

Sound tricky? Well no, it's actually pretty simple! In the following sections we'll build a complete solution.

Create the timebase

For our undercarriage example, we'll use CH1 as the timebase. The mixer source is the retract switch SF. Let's say it should take 6 seconds to open the doors and drop the gear, then slow↑ and slow↓ should each be set to 3 seconds (half the transit time).

CH1:Time

Source=SF, Weight=100%, slow↑=3, slow↓=3

Create mixers for door and gear

With the timebase completed, it's time to turn our attention to the door and gear mixers. The source of each of them is the Timebase channel.

CH2:Door

Source=CH1:Time, Weight=100%

 

CH3:Gear

Source=CH1:Time, Weight=100%

If you try it, you'll see that both outputs follow the timebase, that is to say they ramp between -100% and +100% over 6 seconds as SF is switched. In order to follow an irregular motion, we need to add a couple of curves...

Create the motion curves

Finally, create the motion curves for the door and gear mixers. The x-axis is time (since the mixer input is the timebase), and the y-axis is position.

Set the curve type 'custom', as this will allow you to set custom x values.

For the u/c example, 2 segments are required for the door motion, and 3 for the gear, so the curves will require 3 and 4 points respectively.

The steeper a segment, the faster the commanded speed. A horizontal segment generates a pause. A vertical segment generates an instantaneous jump in the commanded position (to create a vertical segment, set identical x-values for adjacent points). Consider using the 'Smooth' option to soften the transitions between adjacent segments.

To ensure that the mechanics and sequencer remain in sync throughout the sequence, ensure that each segment is slow enough for the servo to keep up.

Below are the door and gear curves for our undercarriage example. The LH end is T-zero, (SF resting in the up position). The RH end is 6 seconds after SF transitions to down.

Note the vertical segment in the Gear curve - this will command an instantaneous movement of the gear servo. In practice, you would slow down the gear drop, by introducing a slope into that segment.

mixer curves

Trajectory curves for door and gear. x-axis is time, y-axis is position.

A curve in EdgeTX may have up to 17 points or 16 segments. To unlock the x-values for editing, choose curve type 'Custom'.

Here's a screengrab of Companion showing the final mixer configuration including the motion curves:

mixers

Note the simplicity of the solution!

Adjusting the servo limits and centres

The servo directions, travels and centres should be adjusted in the Outputs menu. Keep the mixer weights at +100%.

Maintaining sync at startup

When the radio is switched on, the retract state and switch must be in sync otherwise the servos will jump suddenly, potentially causing a clash. (This is not a limitation of this particular sequencing method... it's because our radios have no way of knowing the actual position of the servos!)

To ensure a safe switch-on: (a) always put the u/c in the same state (retracted or deployed) before switching off, and (b) always put the retract switch in the corresponding state when the radio is switched on - use EdgeTX's startup checks to remind you.

Undercarriage sequencer video

Here is a video of the sequencer running in the Companion simulator.

Expanding the sequencer

The method can be easily expanded for additional servos, or more complex paths. For example, you could arrange for the doors to close again, after the gear is deployed - it's just an additional segment. In fact, the complexity of the motion is limited only by the maximum number of segments.