Taranis Q X7 transmitter programming for combat robots

Run Amok Combat Robotics
Programming the Taranis Q X7 Transmitter for Combat Robotics
The Taranis Q-X7 with OpenTX 2.2 firmware is a remarkably flexible transmitter that can adapt to very sophisticated control requirements. Unfortunately, all that flexibility comes with a complex user interface that confuses novices and gives experienced R/C jockeys a bewildering range of choices. For example: you can't simply turn on Elevon mixing – you need to build up a channel mix from the elements available to the transmitter. This takes some thought and planning.

This guide will skip over the bulk of the theory and provide examples of set-up, tuning, and troubleshooting for standard combat robot layouts. Once you have your 'bot operational you can take time go as deep into control theory as you like.





Functions Index



Physical Setup

There are multiple on-line tutorials that cover the process of un-boxing, hardware adjustment, preference selection, menu navigation, receiver binding, failsafe setting, and range testing. Since this is all the same for aircraft or robot I'm not going to duplicate that info here. I will assume that you have your transmitter operational and have learned the menu navigation controls. If you need some help with that process, try this tutorial:

As delivered, the Taranis Q-X7 defaults to the 'Mode 2' stick layout with channels one thru four assigned to Aileron, Elevator, Throttle, and Rudder (AETR) in that order. This guide assumes the 'Mode 2' stick layout.



Menu Navigation

The action all takes place in the Model Setup menu. Power on and dismiss any warning messages to get to your home screen:


A quick tap on the MENU button will take you to the Model Setup menu. If you hold it too long you go to the Radio Setup menu -- just a tap. Now tap the PAGE button repeatedly to flip down thru the screens. A long press on the PAGE button will move you up a screen. Almost all of our robot setup will be done on three screens: INPUTS, MIXER, and OUTPUTS.

For clarity I’ve arranged the topics in this guide to mirror the order of progression a robot builder might follow in setting up a Taranis Q X7 for use. At this point it may be helpful to follow a position signal all the way thru the transmitter to better understand the 'big picture'.

  1. A position signal is generated by a stick axis, switch, or knob.
  2. That signal is routed to the INPUTS screen for possible modification before being passed to the mixer.
  3. Signals coming into the MIXER screen may be combined with others before being assigned to a receiver output port.
  4. The OUTPUT screen allows final modification to the direction and magnitude of the combined signals from the mixer before they are transmitted to the receiver.


The Mixer Screen  Linking Inputs to Outputs

The mixer screen accepts input signals -- from the transmitter sticks, switches, and knobs -- and assigns them to output channels that will be sent to the receiver. Multiple inputs may be assigned to individual outputs to create channel 'mixes', and the signals may come direct from the inputs or after they have been modified by the INPUTS screen.


A Single-Stick Drive Mix

OpenTX has no pre-defined mixes – we must define our own. This mix allows the right-side transmitter stick to control steering and throttle. The left motor controller plugs into the CH1 receiver port and the left motor controller plugs into the CH2 receiver port.

Page down thru the Model Setup menu to the MIXER screen. Your mixer screen should look like this:
  1. Use the scroll wheel to highlight the CH1 line, then long-press the ENTER button to bring up an action menu.
  2. Scroll down to Insert After and tap ENTER to bring up a new menu.
  3. Scroll down to Source , tap ENTER, scroll to Ele , tap ENTER, tap EXIT twice.

Your MIXER screen now looks like this:
  1. Use the scroll wheel to highlight the CH2 line, and long-press the ENTER button to bring up an action menu.
  2. Tap ENTER to enter the EDIT menu.
  3. Scroll down to Weight , tap ENTER, scroll the value down to -100 .
  4. Tap enter, tap EXIT twice.
  5. Long-press the ENTER button to bring up an action menu.
  6. Scroll down to Insert Before and tap ENTER to bring up a new menu.
  7. Scroll down to Source, tap ENTER, scroll to Ail .
  8. Tap ENTER, tap EXIT twice.

Your MIXER screen now looks like this:


Output Channel on a Switch


Sometimes you don't need the range and precision of a control stick to activate an output channel. Maybe you're just activating an RC switch to fire a flipper mechanism. A transmitter switch would serve that purpose nicely. This will assign CH5 to the momentary toggle switch SH :

Page down thru the Model Setup menu to the MIXER screen. If you already have a single-stick drive mix your mixer screen should look like this:

  1. Scroll to highlight the CH5 line, then tap ENTER.
  2. Scroll down to 'Source', tap ENTER, scroll to SH.
  3. Tap ENTER, tap EXIT twice.

Your MIXER screen now looks like this:



The INPUTS Screen  Adjusting Control Response

Time to do some work on the INPUTS screen where we have the option to modify the signal coming from a stick, switch, or knob before it gets to the MIXER screen. We can modify response ‘weight’, add switches to select between weight options, and even reverse the direction of input response.


Dual Steering Rate Switch


As mentioned in the MIXER section, a 100 Weight assigned to the aileron input gives too much steering responsiveness for most drivers. The INPUTS screen is the place to adjust that weight.

Page down thru the Model Setup menu to the INPUTS screen. With default settings your inputs screen should look like this:

  1. Use the scroll wheel to highlight the Ail line, then long-press the ENTER button to bring up an action menu.
  2. Tap ENTER to enter the EDIT screen.
  3. Scroll down to Weight , tap ENTER, scroll down to 50 .
  4. Tap ENTER, tap EXIT twice.

Your INPUTS screen now looks like this:

Steering response is now at a comfortable driving level but it is useful to be able to restore full rotation speed for a victory dance or to spin fast enough to flip back upright when inverted. We will add a 'Dual Rate' switch to restore full response when activated:

  1. With the Ail line highlighted, long-press the ENTER button to bring up an action menu.
  2. Tap ENTER to enter the EDIT screen.
  3. Scroll down to Switch , tap ENTER, flip switch SA down then back up, tap enter, tap EXIT twice.
  4. Long-press the ENTER button again.
  5. Scroll to Insert After and tap ENTER.
  6. Tap EXIT twice.

Your INPUTS screen now looks like this:


How does this work?

If there are multiple lines entered under a single input, the transmitter evaluates the first line to see if any conditions it includes are met. If they are, that line is used. If not, it skips down a line and repeats the evaluation process.
  • Our first Aileron line has the condition SA⇑ that requires that switch SA be in the ‘up’ position – the position the transmitter expects at start-up. If switch SA is up the line will be accepted and the steering rate will be a controllable 50 .
  • If switch SA is not ‘up’, the transmitter will skip down to the second line ando evaluate its condition. This second line has no condition set, so it will be accepted and the steering rate will be a very quick 100 .
You can choose different values for the Weight to suit your driving preference -- and you can choose a different switch. Yes, you can add more lines for additional conditions, but leave the last line with no conditions.


A Simple Invert Switch


So far everything we’ve done in OpenTX has been more difficult than it would have been on a conventional menu-driven transmitter. Why would anyone write transmitter firmware that makes things more difficult? Open TX does make simple things a little more complicated, it can make complicated things a lot simpler.

When a wheeled robot is upside-down the steering remains correct but the throttle direction is reversed. Assigning a switch to reverse the response of the Elevator stick axis in a conventional transmitter is somewhere between complex and impossible, but in OpenTX it's just two lines of code:

Page down thru the Model Setup menu to the INPUTS screen. With our Dual Rate switch code the inputs screen looks like this:
  1. Use the scroll wheel to highlight the Ele line, then long-press the ENTER button to bring up an action menu.
  2. Tap ENTER to enter the EDIT screen.
  3. Scroll down to Switch , tap ENTER, flip switch SF down then back up.
  4. Tap enter, tap EXIT twice.
  5. Long-press the ENTER button again.
  6. Scroll to Insert After and tap ENTER.
  7. Scroll down to Weight , tap ENTER, scroll the value down to -100 .
  8. Tap enter, tap EXIT twice.

Your INPUTS screen now looks like this:

When Switch SF is up (SF⇑) the elevator response is normal, but when SF is not up the throttle response is reversed. You can of course choose a different switch to suit your preferences.

NOTE Aircraft users program a different type of invert switch because this simple approach does not invert the axis trim setting. Trims are important if you’re controlling servos, but robot motor controllers seldom rely on trims to adjust their center position. This approach should work just fine for your robot. If not, look up the aircraft version on the ‘net.



The OUTPUTS Screen  Limiting and Reversing Response

The OUTPUTS screen is the last stop before the signal is transmitted to the receiver. Adjustments made here will modify the magnitude and direction of the signal sent to the specified receiver output port after all mixes have been applied.


Limiting Motion on a Servo


A servo powered lifter might not require the full range of servo motion. Such a lifter may be completely retracted at -75% of servo motion and fully extended at +90% servo motion. We can limit the range that a specific output channel can command and prevent harmful stalling of the servo.
Page down thru the Model Setup menu to the OUTPUTS screen. With default settings your outputs screen should look like this:

The OUTPUTS screen allows direct limiting of the motion range commanded on each side of the motion center point. Here we will limit servo motion to 75% of normal below the center point and 90% above.

  1. Use the scroll wheel to highlight the CH3 line, then tap the ENTER button to bring up an action menu.
  2. Tap ENTER to enter the EDIT screen.
  3. Scroll down to the Min line, tap ENTER, scroll to -75 and tap ENTER.
  4. Scroll down to the Max line, tap ENTER, scroll to 90 and tap ENTER.
  5. Tap EXIT twice.

Your OUTPUTS screen now looks like this:

Full upward throw on the Throttle stick axis will now provide only 90% of full upward servo motion, and full downward throw will provide only 75% of downward servo motion. No servo stall!


Bonus: Extended Servo Response


By default OpenTX prevents assigning Output travel values outside the range of -100 to 100 but most servos are capable of responding to signals outside this range to provide an extended range of motion. If you need increased extension from a servo for a small lifter robot, the default limits can be overridden on the Model SETUP screen:
Page upward from the OUTPUTS screen multiple times to find the SETUP screen:
  1. Scroll down the screen – it's pretty far - to select the E.Limits checkbox.
  2. Tap ENTER to check the E.Limits box.
  3. Tap EXIT.
You may now return to the OUTPUTS screen and enter Min and Max values over an extended range from -150 to 150. Most servos will jam and stall before they reach 150% of normal range, so use caution in exploring motion limits.


Inverting Response


The robot may respond incorrectly to a transmitter command because motor polarity is reversed or a servo is installed in an unusual orientation. Rather than changing the robot hardware it is often simpler to invert the receiver outout to correct the problem.

In a conventional transmitter there would be a menu to deal with Servo Reversing to sort out these issues. In OpenTX this function is handled on the Outputs screen. In this example we invert the output of CH2 :

Page down thru the Model Setup menu to the OUTPUTS screen. With default settings your outputs screen should look like this:

  1. Use the scroll wheel to highlight the CH2 line, then tap the ENTER button to bring up an action menu.
  2. Tap ENTER to enter the EDIT screen.
  3. Scroll down to the ‘Direction’ line, then tap ENTER to change the mode to INV
  4. Tap EXIT twice.

Your OUTPUTS screen now looks like this:

The change to the screen is subtle: the little arrow to the right of the ‘100’ on the CH2 line now points to the left instead of the right, indicating in ‘inverted’ response.

Inverting the response of select channels will prove usefull in solving problems uncovered in the next section: correcting drive mix problems.




Troubleshooting  Correcting Drive Mix Problems

Find a safe place to test the robot drive, unplug all weaponry, and power up the radio and robot. Try a little gentle forward motion and a slow turn to the right.


Given a forward command, only one motor responds -- given a right turn command, only the other motor responds.

You have both transmitter mixing and on-board mixing on the controller turned on. Turn off the on-board controller mixing.

Given a forward command, robot backs up straight.

Invert the response for both of the motor control channels: CH1 and CH2.

Given a forward command, robot spins in place.

Invert the response for the channel that feeds the controller for the motor that is backing up.

Given a right turn command, the robot turns left.

You have the left and right motor controllers plugged into each other’s receiver ports. Unplug the controller connectors from the receiver and plug the connector that was in CH1 into CH2 and vice versa. You may have to invert response for one or both channels to get correct forward/reverse motion, but the turning control will be correct when you're done.


Summary and Additional Resources

There you have it. We’ve only scratched the surface of what OpenTX can do, but the examples given here will suffice to get all but the most exotic combat robots up and running. Now that you’ve got a taste of how the firmware works you have a good base for implementing less common functions and features, like:

  • Triple rates
  • Voice prompts
  • Logical switches
  • Exponential curves
  • What those knobs can do
  • And even a four-channel omnidirectional Mecanum drive mix!

    Here are some resources to get you started:



    Questions and Answers
    Q: You mention that it's possible to program a Mecanum wheel omni-drive mix in OpenTX firmware. What would that look like? [Buena Vista, California]
    A: It's surprisingly simple, Buena Vista. Mecanum drive requires four wheels, four motors, four speed controllers, and a transmitter mix to sort out the the right signals and provide omni-directional control (video).

    Assuming that you want a standard single-stick drive on the right stick with the added side-strafe control on the left 'rudder' axis, your channel layout and MIXER page are shown in the pictures above.

    Real omni-drive jockeys may prefer putting strafe on the right stick and rotation on the left. Just swap the 'Ail'eron and 'Rud'der assignments in the MIXER screen to give that a try.


    Q: I'm considering an upgrade from my FlySky FS-i6 transmitter to the Taranis Q X7. Will I have to replace all my FlySky AFHDS 2a protocol receivers? [Dallas, Texas]
    A: Out of the box the Q X7 supports only the FrSky ACCESS protocol, but the transmitter has a "Module Bay" on the back that accepts JR-style plug-in transmitter modules to allow use of various receiver protocols. Add a single or multiple protocol module supporting the AFHDS 2a protocol and you're good to go.
    Please send notes for improvement, correction, or clarification to joerger@toast.net.

    Copyright 2020 Mark Joerger, Team Run Amok

    More robot help: FlySky i6 Transmitter Guide -- Combat Robot Radio Tips -- Combat Robot Design Tools -- Ask Aaron - Combat Robot Q&A