Taranis Q X7 transmitter programming for combat robots
Run Amok Combat Robotics Programming the Taranis Q X7 Transmitter for Combat RoboticsPrivacy Policy
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.
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. The signals generated by the transmitter sticks, switches, and knobs pass thru each of these three screens before they are sent to the receiver:
A position signal is generated by a stick axis, switch, or knob.
That signal is routed to the INPUTS screen for possible modification before being passed to the mixer stage.
Signals coming into the MIXER screen may be combined with others before being routed to the output stage.
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.
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. This order differs from the path the signal takes thru the transmitter stages.
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 right 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:
Use the scroll wheel to highlight the CH1 line, then long-press the ENTER button to bring up an action menu.
Scroll down to Insert After and tap ENTER to bring up a new menu.
Scroll down to Source , tap ENTER, scroll to Ele , tap ENTER, tap EXIT twice.
Your MIXER screen now looks like this:
Use the scroll wheel to highlight the CH2 line, and long-press the ENTER button to bring up an action menu.
Tap ENTER to enter the EDIT menu.
Scroll down to Weight , tap ENTER, scroll the value down to -100 .
Tap enter, tap EXIT twice.
Long-press the ENTER button to bring up an action menu.
Scroll down to Insert Before and tap ENTER to bring up a new menu.
Scroll down to Source, tap ENTER, scroll to Ail .
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:
Scroll to highlight the CH5 line, then tap ENTER.
Scroll down to 'Source', tap ENTER, scroll to SH.
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:
Use the scroll wheel to highlight the Ail line, then long-press the ENTER button to bring up an action menu.
Tap ENTER to enter the EDIT screen.
Scroll down to Weight , tap ENTER, scroll down to 50 .
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:
With the Ail line highlighted, long-press the ENTER button to bring up an action menu.
Tap ENTER to enter the EDIT screen.
Scroll down to Switch , tap ENTER, flip switch SA down then back up, tap enter, tap EXIT twice.
Long-press the ENTER button again.
Scroll to Insert After and tap ENTER.
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:
Use the scroll wheel to highlight the Ele line, then long-press the ENTER button to bring up an action menu.
Tap ENTER to enter the EDIT screen.
Scroll down to Switch , tap ENTER, flip switch SF down then back up.
Tap enter, tap EXIT twice.
Long-press the ENTER button again.
Scroll to Insert After and tap ENTER.
Scroll down to Weight , tap ENTER, scroll the value down to -100 .
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.
Use the scroll wheel to highlight the CH3 line, then tap the ENTER button to bring up an action menu.
Tap ENTER to enter the EDIT screen.
Scroll down to the Min line, tap ENTER, scroll to -75 and tap ENTER.
Scroll down to the Max line, tap ENTER, scroll to 90 and tap ENTER.
Tap EXIT twice.
Your 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:
Scroll down the screen – it's pretty far - to select the E.Limits checkbox.
Tap ENTER to check the E.Limits box.
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:
Use the scroll wheel to highlight the CH2 line, then tap the ENTER button to bring up an action menu.
Tap ENTER to enter the EDIT screen.
Scroll down to the ‘Direction’ line, then tap ENTER to change the mode to INV
Tap EXIT twice.
Your 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!
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 building a three-wheel kiwi drive beetle and I'm looking for a mix for my Taranis QX7 transmitter. Your Taranis combat guide has a mix for a four-wheel Mecanum omnidrive but not for a kiwi drive. Is the mix for my three-wheel kiwi drive omnibot similar to the Mecanum mix?
A: The FIRST robotics competitors are fond of the kiwi drive and have written a good bit about them. Lots of vector analysis and trigonometry. You can find one such discussion of kiwi drive control at stackoverflow.com: How to Control a Kiwi Drive Robot. Translating the equations from that discussion to an OpenTX mix gives us this:
The drive ESCs plug into the receiver ports as labeled; receiver port CH4 is available for weapon control. With a standard mode 2 stick layout:
Right stick: ↔ strafe and ↕ forward/back.
Left stick: ↔ rotation and ↕ weapon.
Note: The mix values assume that the wheels are equidistant and angled 120 degrees from each other - like the sketch above. If that's not true for your design you'll need to break out the trig tables and follow the equations at the stackoverflow.com post linked above.
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.