Turnigy9X

From Rebeldroids Wiki

Back to R/C Basics

A popular controller for droids is the Turnigy 9X, aka FlySky or iMax. It's cheap and has lots of channels. Most of the concepts here apply to other models though.

Tank Mode

Tank drive is a common way of controlling a droid. Astromechs and Treadwell droids are examples.

Basically tank drives are two motors, one on each side of the droid. If both move forward, the droid moves forward. If they move in opposite directions or at different speeds, then the droid turns.

Typically we want to use one stick for both motors. You can also use two sticks where the left stick moves the left wheel and the right stick moves the right wheel, but often our controllers have 1 stick that doesn't self-center so it's annoying. We'll assume that your controller has the right stick sprung in both axis and you'll use that to drive your droid.

Since the stick has a left/right output and a forward/back output, we'll need to add (also called mix) the values together to get the appropriate movement for the motors.

There are multiple ways to program a tank drive. Some motor controllers can mix two input channels so that the left/right and forward/backward movement of a stick controls the appropriate motors. A microcontroller like an Arduino could also be used to figure out the magic. But easiest is probably a transmitter that can be programmed for mixing.

Mixing at the Transmitter (Tx)

This depends on the transmitter model, however some airplane transmitters have a "V-Tail" mode that can be used to mix the rudder and aileron channels to provide combined outputs. For that to work, you'll also need a transmitter mode that has the rudder and aileron on the same stick.

Another mechanism for some transmitters is to program the mix in directly, so that servo channel X moves with input a + b and servo channel Y moves with input a - b. That doesn't work well on the Turnigy 9X though so we'll describe the V-Tail method for the 9X transmitter. If you don't have a V-Tail mode or a mode with rudder & aileron on the same stick, you'll need to do some other form of mixing.

Airplane's V-Tail Perspective

On a traditional plane, the tail has a vertical rudder | (controlled by moving an RC stick left & right, though real planes have that on the foot pedals) that control's the yaw of the aircraft. They also have a horizontal elevator _ that controls the pitch of the aircraft (controlled by moving the stick forward and back).

A V-Tail combines the control surfaces into to independent surfaces in a V shape. In order for the plane to go up and down, both surfaces have to act like the elevator and move up or down when the RC stick moves forward/backward. In order for the plane to yaw left or right, both surfaces have to move to the left or right when the stick moves from side to side.

Depending on how the linkages are connected, one or both directions may be the opposite of the stick movement, so the V-Tail programming lets us define how we want the two inputs combined.

From a Tank Perspective

From a tank's perspective, we need the same mix as a V-Tail. When the stick moves forward/backward, both motors need to move forward/backward. When the stick moves sideways, we need both motors to do steer right or left (which for a tank means generally opposite directions).

In other words, since the V-Tail programming allows us to add or subtract each of the inputs for each output, we can use the same system for the tank drive.

Programming V-Tail Mode

Typically the airplane Tx "Modes" that have rudder and aileron on the same stick are Mode 1 for left side sticks that self-center in both directions, and Mode 4 for right side sticks that self-center in both directions. We'll presume a Turnigy 9X "Mode 2" Tx programmed to "Mode 4" for this example.

Different Transmitters can have different channel assignments, and if they support V-Tail they may have a different way of programming it, however the concepts are similar to this Turnigy example.

First you'll need to set your Model to Mode 4 (or Mode 1) to have the elevator and rudder on the same stick. On the Turnigy this information is part of the "Model" menu.

  • Press Menu, then Menu again to enter the model menu.
    • You can change the selected model on the first submenu item for model, the Turnigy remembers 8 models
    • The second menu item lets you edit the model name.
    • The third item selects the model type. WARNING: Changing the type will erase all the settings for this model! For this mode we need the acrobatic airplane mode (not glider nor helicopter)
  • The setting we're interested in is "Stick Set", the next to last item in the menu.
    • Press Menu to select the stick set item, then select the correct mode. Probably Mode 4 or Mode 1. Notice that the channel numbers for this mode are listed next to the stick. In this case those are 2 & 4. They'll be mixed, so not exactly like the diagram, but you'll still connect the receiver (Rx) channel 2 to one side's motor and channel 4 to the other side.

Next, you need to select v-Tail mode.

  • Go back to the main page with the 2 pictures and select the settings side.
  • Go down quite a bit until you get to "V-Tail"
  • Set the state to "Active" (ACT) from INH

This setting has Elev1, Elev2, Rudd1 & Rudd2. Elev1 means how much of the elevator (forward/back) input you want on the 1st output (actually Rx channel 2). Rudd2 means how much of the rudder (left/right) stick input you want on the 2nd output (actually Rx channel 4).

These values will depend on your wiring and if one motor is "reversed" in it's orientation/wiring, however here's an example

  • Set Elev1 & Elev2 to 100%, so both motors will move forward as the stick moves forward
  • Set Rudd1 to 100% so that the left motor will move forward when the stick moves right (eg, turning right)
  • Set Rudd2 to -100% so that the right motor will move backward when the stick moves right (eg, turning right)
    • If one of your motors is reversed, flip the signs on the appropriate "1" or "2" channel
    • If it isn't moving right, play with the signs to get the right behavior. There are tips below.

The channel assignments for our Mode 4 V-Tail Tank are:

Channel Stick Aircraft Usage Tank Droid Usage
1 Right stick left/right Ailerons Usually Head Motor
2 Right stick forward/back mixed with left/right Mixed V-Tail A Motor A (Left)
3 Left stick forward/back Throttle Auxiliary
4 Right stick forward/back mixed with right/left Mixed V-Tail B Motor B (Right)

Find something fun for Auxiliary :)

It's OK if you flip left/right for Motor A/B, it just changes the +/- values when programming the V-Tail mode.

See troubleshooting tips down below if it doesn't move correctly.

Mixing with Motor Controllers

These vary a bit, however controllers that accept two RC inputs can often be programmed to mix those to provide motor power. If you have individual controllers for each side, you'll need two Y cables to connect each of the appropriate Rx channels to both of the motor controllers.

When you use a motor controller to mix the channels, what you're hoping for is to move the stick forward and move the motors both in the same direction. And then moving the stick to the left needs to turn left, so the right motor needs to spin faster and the left slower.

In other words:

Right Motor Speed = Stick forward/back speed - stick left/right speed Left Motor Speed = Stick forward/back speed + stick left/right speed

Oftentimes robots are symmetrical with the left/right drive motors being mechanically reverse of each other. In other words, when one motor goes forward, the other goes backwards, so you may need something like:

Right Motor Speed = Stick forward/back speed - stick left/right speed Left Motor Speed = Stick left/right speed - stick forward/back speed

If you hook everything up and it doesn't work right, then you can swap motor inputs, or reverse one or both channels at the Tx (transmitter) or motor controller. Or you can change the + and - of one or both of the channels.

Debugging Tank Drives

It may be easiest to isolate the channels and move the stick directly forward and directly backward first.

  • If it moves directly backwards instead of forwards, then either the motor leads are backwards (for DC motors), or the channels are being mixed wrong.
    • You might reverse (invert) that channel from the Tx (transmitter)
    • Alternatively reverse the value of the mix (-100% instead of +100%) for both motors on that channel.
    • For motor controllers you may also be able to invert the channel at the controller instead of the Tx.
      • If nothing changes, then you reversed the wrong channel (eg: 2 instead of 4 or aileron instead of rudder or vice versa)
  • If it turns when moving the stick forwards/backwards, then you either have the channels backwards or your motors need to move in opposite directions. It sort of doesn't matter which.
    • For simple DC motors, you can just swap the 2 wires of the appropriate motor (whichever one is moving the wrong way)
    • Alternatively you need to reverse the value of the mix for one channel on one motor.
      • If nothing changes, you reversed the wrong channel (eg: 2 instead of 4 or rudder instead of aileron)
      • If it's moving the wrong direction, then you reversed the wrong motor.

Then check side-to-side stick. The droid should rotate left when the stick goes left

  • If it turns the wrong direction, then the mix for that channel is backwards.
    • You might be able to reverse (invert) that channel at the Tx.
    • Alternatively reverse the value of the mix (-100% instead of +100%) for both motors on that channel.
    • For motor controllers you may also be able to invert the channel at the controller instead of the Tx.
      • If nothing changes, then you reversed the wrong channel (eg: 2 instead of 4 or aileron instead of rudder or vice versa)
  • If it moves straight instead of turning, then the mix is wrong for one of the motors on that channel
    • Reverse the value of the mix for one channel on one motor.
      • If nothing changes, you reversed the wrong channel (eg: 2 instead of 4 or rudder instead of aileron)
      • If it's now turning the wrong way, then you reversed the wrong motor.

Back to R/C Basics