Saturday, December 29, 2012

er9x Tutorial: Mixing (good for Turnigy 9xr)

Here's some notes to go along with the tutorial/video for er9x mixing.  Some people have said that they thought er9x was more complicated than traditional Tx software, but in many ways I think it's simpler.

Here's a few examples that should cover most of what you need to know to make good use of the mix screen, with accompanying video tutorial. (longer version to be uploaded later)

Mixing a Stick to a Channel

This is the simplest mix you can make.  Here's Channel 1, mapped 100% from the rudder (the "source").  The "+" is just a redundant note that  it's positive 100%; all percentages are shown with the sign.
  • CH01 +100%RUD 
Set this up, and you'll see the servo attached to channel 1 moves with the rudder stick.

The default 4-channel model definition is nothing more than the four sticks mixed to the first four channels.:
  • CH01 +100%RUD 
  • CH02 +100%ELE 
  • CH03 +100%THR 
  • CH04 +100%AIL

Mixing a Stick to Two Channels

Now let's do something that's not especially useful in a practical sense, but will be handy for this tutorial.  We'll map the rudder stick to two output channels.
  • CH01 +100%RUD
  • CH02 +100%RUD 
Moving the rudder stick now moves the two servos attached to channels 1 and 2.  In some of the following examples, we'll modify channel 2 and leave channel 1 unmodified as a reference.


There's a reversing option on the Limits menu, but it's not really necessary.  We'll reverse channel 2 by changing the +100% to -100%.
  • CH01 +100%RUD
  • CH02 -100%RUD 
Now the two servos move in opposite motion.

Reducing Rates

Change channel 2 to +50%.
  • CH01 +100%RUD
  • CH02  +50%RUD 
Now the two servos move in the same direction again, with channel 2 at 50%.  Of course, you could have a reversed lower rate throw by making the percentage negative.

HALF and FULL: Confusing yet Powerful Switch Controls

In order to do anything with switches, we'll use the HALF and FULL inputs.  By themselves, they don't do much of anything.  Let's channels 1 and 2 to to the sources HALF and FULL, respectively:
  • CH01 +100%HALF
  • CH02 +100%FULL 
This results in both channels 1 and 2 being output at a value of 100%.  Not particularly useful, so let's mix in the GEAR switch to both of these.  Keep the default Multiplex setting of ADD.

  • CH01 +100%HALF Switch(GEA)
  • CH02 +100%FULL Switch(GEA)

Now we see the channels acting like switches.  As we toggle the GEAR switch, we see channel 1 switching between 0% and 100%; channel 2 switches between -100% and 100% (just as we typically want most switches to behave for real).

So, what's happening?  Unlike a stick which varies smoothly from -100% to 100%, HALF returns either 0% or +100%, depending on the switch.  Likewise, FULL returns either -100% or 100% (the exact value can be modified by the Weight: parameter, but we'll just use 100% to keep things simple).

So, with the GEAR switch specified, the channels output -100% and 0% respectively when the switch is off, and both output 100% when the switch is on.  To reverse any of the switches, just select the switch name that starts with "!", such as "!GEA".

Setting up a Switch

So, the standard way to set a simple on/off toggle switch is to use the FULL input.  For example, to map the GEAR switch to channel 5, we would do this:
  • CH05  +100%FULL Switch(GEA) 
Note that you can specify a delay and a speed in seconds.  The speed is especially nice for things such as flaps and landing gear, since you can get a smooth scale operation.

Mixing a Stick and a Switch ("throttle enable")

Now let's mix a stick and a switch.  As a practical example, we'll set up the THR switch to enable the throttle stick.  If the THR switch is off, the throttle stick is ignored. This is a good safety feature; when you're plugging in your batteries or carrying the model before you've unplugged your batteries, you won't have to worry that the radio will bump your chest and spin up the prop.

To do this:
  • Map the throttle stick to the output channel, as covered above.
  • Specify the THR switch.
  • Set the Multiplex parameter to REPLACE
The Multiplex parameter can be one of ADD, MULTIPLY, or REPLACE.  We specify REPLACE so that when the THR switch is off the output value which would normally be specified by the stick position is replaced by -100%.  So, no matter what the stick position, the throttle can't be activated.
  • CH03   +100%THR
  •      R -100%FULL Switch(!THR)
Combining Multiple Mixes ("dual rates")

Finally, let's look at what we need to do to set up dual rates.  This is pretty simple.  You can add multiple mixes to the same channel.  The switch specifies which mix takes effect (it can actually be a lot more sophisticated, but we'll cover that later).  So, this mix:
  • CH01 +100%AIL Switch(AIL)
  •       +80%AIL Switch(!AIL)
follows this logic:
  • If the AIL switch is in the normal position, map the AIL stick at 100% to channel 1.
  • If the AIL switch is in the toggled position, map the AIL stick at 80% to channel 1.
The nice thing about er9x is that you can use a single dual rate switch to manage multiple channels.  You could repeat the above lines for the elevator and rudder channels, both of them specifying the AIL switch.

But Wait, There's More!

There's quite a bit more that can be done with er9x mixing, but this covers most of what you need to know.  If you're interested in seeing some more, drop me a line!


  1. This comment has been removed by the author.

  2. Well done, very usefull information. 5*****

  3. I'd love to see lots more like this. Very helpful. I used the stock software so long I got used to it. Now er9x is a little funky to me

  4. Thank you Mark, and yes I would like to see more like this. You were a great help with this tutorial for a beginner like me.

  5. I am new to quadcopter and I have 9xr how do I program two servos for camera?

  6. a great start , how about aileron differential ? can you give an example on how to achieve this with ER9X ?

  7. Your contribution here should be part of the standard 9xr manual.

  8. This comment has been removed by the author.

  9. Hi, I am new to using the 9xr for my scratch build projects, I was wondering how I could set up any of the POTS knobs to change the weight of the rudders and ailerons. I have not been able to find much stuff with the knobs, everyone seems to use switches.

  10. can i use mixer to output a digital signal to turn led on and off?

  11. I believe your AIL switch setting example is inverted. Dual state switches have a state of 0/off or 1/on. Physically, the /0/off state is in the up position, while the 1/on state is the down position. So if you want 100% AIL when the AIL switch is off, 80% AIL when the AIL switch is on, your mix should be:
    CH01 +100%AIL Switch(!AIL)
    • +80%AIL Switch(AIL)

    By the way, the eepe software simulator is a great way to test you settings, and you don't even need to turn your transmitter on.

  12. Hi there,
    thank you for this excellent tutorial.

    Am trying to do something different.
    When my quad is at the desired height/level i want with P1 Knob to control "Yaw".

    In fact, i want to shoot smooth videos with my GoPro.

    Is it possible to use P1 as "auto Yaw"?


  13. Hey on the wings I have a cervo on both how do i get lift from them and turn the plane with the same cervos and do i need to put my flaps down to get lift off

  14. Your articles are inventive. I am looking forward to reading the plethora of articles that you have linked here. Thumbs up! dark0de market url

  15. Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained! dark0de market link