With more complex stuff on my quad comes an increased need for a more complex radio, so I opted to upgrade from an aging Turnigy 9X to a FrSky Taranis X9D+ with an X8R receiver – this nets me not only 16 channels via S.BUS on the receiver and a telemetry link, but a fancy programmable transmitter!
It’s a bit daunting to get it all set up but pretty easy once you get the hang of it. This is going to be a quick writeup of how I went about setting it up, configuring the transmitter for the Pixhawk flight controller and flight modes, and some nice things to know that aren’t that clear from the docs.
So the first thing you want is the OpenTX Companion. The companion will handle downloading and flashing firmware for you. On Windows 7 you’ll also need the zadig utility; plug your radio in (switched off) and then open zadig, find STM32 BOOTLOADER and hit the big button. That’ll get your drivers set up right.
When you start the Companion will ask if you want to go ahead and flash the radio – don’t yet. You want to dive into Settings -> Settings, tell it which radio you’re using, and check “noheli” and “lua” options. Other stuff it’s worth setting in there include the automatic backup path in application settings, and the SD structure path. The SD structure path points at a local copy of the SD card so you can get sounds etc.
Which brings us to the SD card. Pop it out, back up the contents somewhere, wipe it clean and replace the contents with this copy off the FrSky website. This includes an extensive sound set and is generally up-to-date. You’ll also want to keep a copy of this (with any changes you make) on your PC for the simulator and settings dialogs.
Flash, aaa-ah! Saviour of the universe!
Now we should have a radio with a newly-filled miniSD card, but some old firmware. Plug the radio in on USB with the radio powered down, and then hit the “Download” button in OpenTX Companion. Download the latest firmware somewhere and then hit Read/Write -> Write Firmware. Once it’s done you can reboot and check it all works.
Once you’ve done that, power down the radio again, unplug it, and start it up while pressing the two bottom trim switches towards the power switch. This gets you into the bootloader. Plug in your USB cable and your SD card will show up in Windows – but most importantly you can go ahead and hit “Read models from radio”. This gets you a copy of everything in your radio to start with. You can then proceed to start tweaking! You need to go back to this mode to be able to write stuff, too.
Mixing it up
Let’s open a model up and take a look. For starters we’ve got the setup page. This has simple stuff like what radio system to use, switch and pot warnings, and timers. Timers are helpful for keeping track of battery usage (though if you get telemetry set up, that’s good too) – I have one set up to count down my expected battery life using the THs counter.
Next we have the flight modes. Skip this tab for now. Briefly, though, a little aside on terminology.
The Taranis has a bunch of inputs. Throttle, elevator, rudder etc are named what you’d expect but other physical controls are things like SA, SB, etc. There’s also S1/S2, and L1/L2. The latter four are pots – S1/2 on the front, L1/2 on the sides. The former are switches – you have $MANY on the X9D+. Where you see things like an arrow pointing up/down next to a switch, that’s going to evaluate to “on” if that’s the state the switch is in.
In inputs we can assign each physical control to an input channel. I’ve done this for four switches. The benefit of adding these here rather than directly in the mixer is that we can apply things like curves to them. This is actually very useful for the Pixhawk. The Pixhawk/PX4 expects 3 two-position switches and a single 3-position switch for selecting your flight mode. The Taranis is overequipped with three-position switches, so I’ve set up a curve that treats positions 2 and 3 identically. To do this, go into Curves, pick a Curve (eg Curve 2), select 4 points, and set them at -100,-100;-50,-100;-1,100;100,100. Then you can pick Curve 2 for that input.
But back to the mixer. What’s it all about? The mixer is what actually produces the output values. In most cases for multirotors you just want to pass through your input channels, but you might want to do something fancier. For that Pixhawk setup, simply set channels 5-8 to correspond to inputs 5-8 where you’ve put your switches.
It seems logical, captain
Logical switches are kinda neat. Let’s say you have, as in our example, a 3 position switch with some 2 position switches cascaded from the output. In each combination we derive a logical state and it’d be nice to announce that, since the Taranis has audio playback.
I used the festival tts “text2wave” utility to generate some WAV files, and then used ffmpeg to resample them to mono 32kHz files. This is required for playback to work. Sounds simply drop into the SOUNDS/en/ folder. Note there’s an 8 character file name limit, though, not counting the .wav! Very long filenames won’t show up in the radio and will get truncated in settings.
In logical switches, we can take, for instance, L1, and set the function a<x. The OpenTX documentation lists the functions and what they do; this is a simple less than comparison. We can point V1 at a channel in the mixer, for instance CH5, and set V2 to a constant like 0. L1 being on now corresponds to the default (up) state of my 3-position switch being on.
This particular thing you can do by looking at the SA booleans, but logical switches have an AND switch function, too. This means we can, for all our two-position switches, only turn on our logical switches if the top-level switch is in the right position.
Special Functions are on the next tab. In here we can set actions for each switch or logical switch, like “Play track” to play some audio. I’ve got my radio set up to play the right bit of speech to tell me which flight mode I’m now in, eg “Full auto”, “RTLS”, “Manual”, “Position hold” etc.
This really is the tip of the iceberg – you could much more easily (in theory) do my Pixhawk flight mode announcement in Lua, as the radio supports scripting, but I’ve not had the time to figure out how to just yet! Combined with telemetry you can do automated warnings and announcements for altitude, speed, battery and more. It’s a very cool bit of kit and worth persevering with to get it set up just right for your use-case.