Turnigy 9X, openTX and FrSky Telemetry

Updates: Open9X is now better known as OpenTX 

This mod should also apply to the new 9XR, please let me know if you do it.

I have since made a video for this mod using openlrsng here, many of the steps are identical so worth a look.

Now this is the meat and potatoes. Once finished this will give you 9x all the features of an expensive high end unit and then some.

Before you start, I have assumed that you have already installed your FrSky DHT module.

Difficulty:

Hard, due to the fine soldering required. If you are not confident practice on something else first.

Steps in this tutorial include:

Things you will need.

Step 1. Install programming wiring and free up the USARTs.

Take your 9x apart and completely remove the main board. It will of course still be attached to your FrSky module.

As you can see I have made a pretty picture with relevant labels. We will be connecting GND, VCC, MOSI, MISO, SCK and RST to the usbASP programmer. A little bit of trivia if you look at the datasheet of the AtMega64A when programming it uses the RX0 and TX0 pins rather than its own MOSI and MISO pins.

We will also be cutting some tracks and re-routing the circuits to two spare pins on the AtMega64. This frees up one of the USARTs (Universal Serial/Asynchronous Receiver and Transmitter) so we can communicate with the FrSky module. The circuits we are moving are connected to one of the trim switches and a toggle switch so once cut they will no longer work with the stock 9x firmware. Don't worry the version of Open9x firmware will re-configure these lines in software.

Another side note, the Atmega64A has two USARTs. If we freed up the second USART we could potentially use it communicate with another device such as a playstation controller or usb interface. This would of course require some code changes.

Moving on. First thing to do is tin the pads and spare pins on the AtMega64. Tinning the pins will help to add a bit of lead to the solder that is already there allowing it to melt at a lower temperature when we add the wires later on.

Six Pads and three pins done, Try to put the solder towards the top half of the pad near the resistor as we are going to cut the track between the two.

 

We are only using the two pins on the right, I did the third as it may be useful it later on.

Time to cut some tracks. A very sharp hobby knife with a fresh blade helps here.

The trick is to do lots of soft cuts.

Done, you can check that with a multimeter. Also cut the track where I have placed the black line.

This is our thin single core kynar wire, rolling the end under your hobby knife works to strip the plastic. You could also use wire from a small motor, its just a bit more difficult to scrape off the plastic covering. Remember to tin it first.

First solder of first link.

Second solder of first link.

We do not want to join to the pad here. Its hard to see you just have to test it with the multimeter. Be aware you may get some current going the long way round when you test it. I've added blue dashes to the wire so you can tell the difference.

And a final closeup

That's one of the hardest bits done.

Now take two servo extension leads cut them in half and take the outer part of plastic off two of the female ends.

We will use these to plug into our programmer.

This is just to make the soldering easier, separate the wires and pop the pins out. Lift and pull.

Put the plugs aside.

Strip them nice and short then tin them.

The RX0/MOSI and TX0/MOSI will need a second wire coming off each. I made a small y join.

I didn't have small heat shrink but the silicone sheath from some scrap wire worked a treat.

Working from one side to the other connect your six wires to the tinned pads. The RX0 and TX0 pads need the Y leads.

The colors do not really matter, but I made an effort with GND and VCC. We can put the pins back into any part of the plug we like.

Step 2: Hacking the FrSky module.

Carefully cut the covering down one side take it off and put it aside.

Here we have the business side of the FrSky module. The main processor sports a 32bit ARM processor which can run at up to 72MHz and have between 64 to 128Kbytes of FLASH RAM and 20Kbytes of SRAM. That's a pretty powerful chip for the price of the unit. The SIPEX 3232EE is simply a TLL to RS232 level converter. I'm guessing that FrSky decided to with RS232 because it provides a bit more protection against incorrect wiring. Most of the other tutorials out there use a separate RS232 to TTL level converter between the FrSky module and the 9x. In that case the telemetry signal is being converted from TLL level to RS232 level and back again. If you really don't want to open up your FrSky module you can get a converter from Sparkfun for $10. But remember we are hackers and not afraid to get dirty in order to save a few bucks. 

There are a number of ways to do this hack. For those with really good eyesight there is this method.

Pretty simple but you need very steady hands and there is little room for error. I would also add a couple of 1k to 2.2k resistors inline with the connection to the Atmega64. Its not strictly necessary but it protects both MCUs if for some reason you connect anything up the wrong way. It's also worth noting that the USART pins on the STM32 are 5V tolerant, so no need to convert anything when attaching to the ATMega64.

I went with the following longer but easier method.

First, scratch away the green covering with your hobby knife to reveal the copper. Note I have also labeled the pads.

I dont have a photo but you also need to tin these pads.

Cut the two tracks connecting the external rx and tx pins as shown above.

Also on the reverse side near the piezo speaker cut these two tracks.

Now to complete the bypass. I used two 2.2K resistors to make the link. They are covered here with silicone tube. Heat shrink would better if you have it. Double check what is what with the module covering and link RX to RX and TX to TX.

They should cross over but not touch each other.

You can now tape your DHT module cover back on.

Take your USBasp programmer (don't plug it into your computer yet) and the servo plugs you put aside at hook it all together so that the labeled connections on the programmer match the pads on your main board. Check and double check that the connections are good and correct with your multimeter.

You should end up with something like this.

I used the leftover foam from the LCD back light to make a cover.

Lastly wire up your telemetry lines. RX on the DHT connects to TX0/MISO on the AtMega64. Likewise TX on the DHT to RX0/MOSI on the AtMega64.

Another option is to install your USBasp programmer permanently in your 9x. 

Now you are ready to install your firmware.

Step 3: Flashing the firmware.

Get the binary.

First go and get a binary from the Open9x project. http://code.google.com/p/open9x/

Save it somewhere safe.

Install your USBasp drivers.

No drivers are needed for Linux or OSX.

Windows get your drivers from here, you have to manually install the drivers. Josh on Flite Test shows how to install the drivers on Windows 7, and also how to use KKMultiTool on a HK controller board. Worth a look.

Last step get Companion9x and flash the unit.

Download Companion 9x from here. http://code.google.com/p/companion9x/

Companion 9x has a lot more features than just flashing your unit. It can simulate your radio, and allow you to backup and edit the 9x eeprom (memory).

Right now I have only a couple of models but with more I can see that this will be a useful piece of software.

For now we are just going to use it to flash our firmware. Saves us having to muck about with the command line.

Windows there is just one installer. For mac users for some reason you have to install version 0.76 first and then the update to v0.88. Linux, use the force and compile from source.

Once installed and running click through any warnings if any then click on the burning transmitter icon.

Click on load firmware and select your firmware file that you downloaded above.

Now connect your programmer to the radio making sure the connections are all correct. Power for the programming is supplied by the programmer. Do not do this with your tx turned on and the battery in place.

Now click Burn to TX.

If you are quick you can click show details to see AVRDude do its stuff.

You are done!.

Unplug the programmer, and put your 9x back together. Do not forget the plug connecting the front to the back.

Does it all work?

Turn on your 9x. If all went well you should see the Open9x splash screen and perhaps a message about corrupt EEPROM. Don't worry that is normal on your first boot up.

First calibrate the sticks and pots. Press exit then hold down the left (+) button for a second. This will put you on the radio setup pages. Press the right button again to get to the calibration page. Follow the steps when you are back at the [MENU] TO START page you are done with calibrating.

Now lets test that our re-routing worked. I can't remember which switches they are so lets test them all.

Press exit then the up arrow arrow until you see this screen.

You can now flick through all the switches and move the sticks to see if they work.

Lets test that all the trim switches are all working.

Hold down the left button again to go the the radio setup pages and navigate to the DIAG page.

You are looking for a 1 to show up when you test each trim.

Finally to test if the telemetry is working. Hold down the down arrow (DN) for a second. This will bring up the telemetry pages.

If you see something like this then all is good!. The data for the Tx bar is being sent from your DHT module to the 9x processor and the Rx bar from the reciever to the DHT module then to the 9x processor. If you see NO DATA and your receiver is bound and working then something went wrong.

All done, from now you are on your own. Open9x has an online user guide here. The very similar er9x has a very nice wiki manual here and a pdf manual here.

If you want more telemetry data you can lash out and buy some of the FrSky Telemetry modules. Here is what is available:

Or you can roll your own. FrSky have released the details of their telemetry protocol and even the schematics of their sensor hub. Have a look at the FrSky download page.

Enjoy.