Turnigy 9X Advance Mod

As I was planning to build my first quadcopter and enter the world of RC, one of the components I was looking for was the transmitter. I wanted something fairly cheap, full featured so that it can control any RC planes or vehicles, and easy to use. The Turnigy 9x meets all of these requirements! Another great advantage of this transmitter is, there is large potential for you to do modifications, to make it even more powerful.

I have done some very basic modifications in the previous post. In this post I will talk about some of the research I have done on more advanced mods we can do on the 9X transmitter.

Basic and Cheap Modifications (last post)

  • Lipo Replacement battery
  • Install LCD backlight
  • Speaker Mod
  • FrSky 2.4GHz module

Advanced Modifications (this post)

  • Programming Header Socket
  • Flash ER9X Firmware
  • Use ER9X Firmware Telemetry
  • MCU control of LCD light.

Programming Header Socket for Firmware Flashing

By flashing the er9X firmware it solves most of the firmware problems people have! You can either use the Arduino or USBASP programmer depends on what you have.

To get ready for the er9X firmware flashing, we need to solder the header socket first. Firmware flashing can change the firmware of the TX (by using a USBASP programmer or an Arduino etc), so you can use extra functionality. I will discuss the advantage of having the er9X firmware compared to the original firmware that comes with the stock 9X in the next post.

9x-programming-pins-551x362

The picture above shows all the connections I needed. The soldered pad to the immediate right of the label is the one being described. I took a 10pin header cable, split it for each of the connections, stripped off a bit of casing and then soldered them onto the pads.I then labeled each wire on the other end of the cable.

9x-header-socket-soldering

 

9x-programming-cable-isnide-551x413

Finally, I cut a rectangle in the battery box so that I could put a 10-pin ISP header inside. First I hot glued the header in place. Then, I soldered each each wire to it according the picture below for easy programming.

tenpin

Flashing The ER9x Firmware

Arduino ISP Method

You will need

  1. Arduino board. either one of these should work
    Arduino Nano, Arduino Uno, Arduino Mega 2560
  2. Some female and male header cables to connect the transmitter and Arduino.

How to Flash it

  1. Connection between Arduino and Transmitter
     Arduino - TX
     10      - RST
     11      - MOSI
     12      - MISO
     13      - SCK
     5v      - 5v
     Gnd     - Gnd
  2. change the serial buffer of the Arduino because the Arduino can’t keep up with the data (er9x firmware) being sent to it over serial on default settings. To do this, find the arduino install directory, and go to: arduino-x.x/hardware/arduino/cores/arduino and opened HardwareSerial.cpp  in a text editor. search for #define SERIAL_BUFFER_SIZE and change its value from 64 to 128.
  3. The current Arduino ISP sketch can’t handle the large amount of EEPROM that the ER9x firmware uses (the stock firmware does too), so try to upload this sketch instead: Arduino ISP Code
  4. download the ER9x programming software from here. Open it, you will be prompted to download the latest ER9X firmware.
  5. go to burn->configure in the eepe software and selected the avrisp programmer, m64 mcu, the port the arduino is connected to, and -b 19200 in the extra arguments box.
  6. back up the firmware, memory and EEPROM using the options in the burn menu of the stock firmware in case something went wrong with the ER9x firmware.
  7. finally go to burn->Flash Firmware to TX and select the firmware, should be ready in 1 to 2 mins.

USBASP Method

  1. connect the USBASP to the transmitter and Install the driver on the computer.
  2. Then open the eepee software and you will be asked to download and save the ER9x firmware.
  3. go to burn->Flash Firmware to TX and wait.

FrSky Telemetry

This mod adds the ability to display FrSky telemetry values on the 9x transmitter when using the er9X firmware.

THIS IS NOT A SIMPLE MOD! It involves cutting circuit board traces and soldering very tiny wires directly onto very tiny processor pins. If you’re not experienced with circuit boards or don’t have a SMALL tipped soldering iron, look at the 9x TelemetrEZ board instead and save yourself a lot of trouble.

This tutorial is from Without RS232 Level Converter, you might also find this one useful With RS232 Level Converter

The mod itself has 2 steps:

  • Reroute 2 switches to different pins on the processor
  • Connect the telemetry data circuits from the module into the 9x. There are several methods to achieve this. This method utilizes 2 unused pins on the module connector to transmit telemetry data to the 9x transmitter, which still allows the use of other modules. Note that the 2 pins used will have to be isolated in any other modules used to be safe.

NOTE: When doing the Telemetry Mod, keep in mind that if you do the mod on a stock 9x transmitter BEFORE flashing it, when you connect to the TX (or even power it up) it will give a constant “Switch Error!” alarm. DON’T PANIC! The OEM firmware expects a “closed” circuit on each switch during POST, and will trigger that alarm BECAUSE we’ve cut the traces to pin 41 & 42. The er9x/open9x Telemetry version firmware resolves this issue.

Required for this mod:

  • 2 x 200 (or 220) ohm resistors
  • 470 Ohm resistor
  • 150mm / 6″ thin (30-32 AWG) wire, preferably in different colors
  • A small plug can be helpful to disconnect the telemetry connections, like a 2 position micro JST.
  • Thin heat shrink tubing to cover solder joints
  • A SMALL tip for your soldering iron, e.g. 1/32″ (0.8mm) or even smaller

Rerouting switches

The first part of this mod frees up the RXD and TXD special-purpose pins (2 & 3) on the ATmega64 processor that are used for simple switch inputs from the Throttle Cut & Aileron Dual-Rate switches. The switches are moved to pins 41 (PC6) & 42 (PC7).

There are 2 methods of doing this:

METHOD 1

This method involves removing 2 SMD resistors then connecting this area to pins 41 & 42 on the ATmega64 processor via 2 x 220 Ohm resistors.

We start by removing 2 SMD resistors as shown:

9x_Tel_SMD

Next connect pins 41 & 42 to where the SMD resistors were removed via 220 Ohm resistors. Use really fine single strand wire, for example the 36AWG teflon coated wire HobbyKing sells, or fine PVC insulated wire. The pins on the ATmega64 are delicate! Tin the wire & the pin, hold the wire on the pin, then touch a fine point soldering iron onto the joint. Don’t pull up on the wire, rather pull gently in the direction of the pin to test the joint. This is also a good time to connect the wire for the haptic mod to pin 43:

9x_Tel_Pins

Locate the soldering points for the wires where the SMD resistors were removed:

9x_Tel_SMD_Rem

  • Hot glue 2 x 220 Ohm resistors to the main PCB and connect one side to the wires soldered to pins 41 & 42.
  • Connect the other side of the resistor to where the SMD resistors were removed as identified above. Note which SMD resistor location connects to which pin.

9x_Tel_220

METHOD 2

The second method retains the 2 SMD resistors that are removed in method 1, but instead 2 traces have to be cut.

9x_Tel_Method_2

These traces are pretty small, so a steady hand and good eye will be required! Use a #11 Blade hobby knife and a good magnifier. One hard cut with the blade tip then one more with the back side of the tip makes a good cut and separation of pad and trace. With a sharp tipped iron pre tin the SMD resistor solder point, using leaded solder, since it melts at a lower temp.

Use really fine single strand wire, for example the 36AWG teflon coated wire HobbyKing sells to connect the ends of the SMD resistors directly (without the 220 Ohm resistors) to the processor pins 41 & 42 as shown in method 1. Pre tin the wire and do a fast on and off solder joint. Too much heat and the resistor may be damaged or fall off, which will also happen with too large a tip or too high heat. The pre tinning should make it fast and easy.

Use a multimeter to ensure the SMD resistor is still disconnected from the pads when done.

9x_Tel_Method_2_Done

Connecting the FrSky module

Now we get to the first step of the second part of this mod.

As we are using the unused pins 2 & 5 on the module connector to send telemetry information to & from the FrSky module, these pins must be isolated. Remove the rear PCB from the rear half of the transmitter by taking out the 4 screws shown by the red arrows:

9x_Tel_Screws

Locate pin 2 on the painted side of the rear PCB. You may have to scratch some of the paint away to see the traces, then cut the traces on both sides of the pin:

9x_Tel_Processor_Connections (2)

Before replacing the rear PCB, note that on the latest 9x transmitters, there is a lip around the pins in the module bay, now would be a good time to remove this with a Dremel or similar, otherwise the FrSky DJT module wont fit. Replace the rear PCB when done.

9x_Tel_Bay

On the other side of the rear PCB, also cut the traces on both sides of pin 2 and on one side of pin 5 as shown. It’s always a good idea to check the pins with a multimeter to ensure the traces have been fully cut.

9x_Tel_Fr_Cut

To complete the mod, solder a 470 Ohm resistor to pin 2, then connect the 2 wires that go to pins 2 & 3 on the ATmega64 processor:

9x_Tel_Connector

Processor connections shown below will be completed during the programmer installation process:

9x_Tel_Processor_Connections (1)

19 thoughts on “Turnigy 9X Advance Mod

  1. Francesco

    Hi there, I have an XJT module and did everything step by step but didn’t manage to get telemetry working. I cut the pins on the Pin 2 and Pin 5 of the transmitter board.

    Receiver: RX-F8P (couldn’t find any specs other then here: banggood.com/RX-F8P-8CH-Bi-directional-1km-Receiver-Compatible-With-Frsky-X9D-X12S-X7-DJT-p-1166272.html.
    Flight controller: HGLRC F4 Flame (specs here: banggood.com/F4-FLAME-Race-Spec-STM32F405-Flight-Control-Built-in-BETAFLIGHT-OSD-5V-BEC-PDB-Current-Sensor-p-1136917.html)
    Remote: TH9x with 64 frsky er9x (er9x.com/er9x-frsky.hex)

    Is there a tutorial on how to set up the receiver too maybe I’m missing something? Thanks!

    Reply
  2. Yohan

    Can you confirm that the pin 2 and 5 cutted on je module are not used by others rf modules

    Like the orange tx module or original turnigy 9x because I use them time to time on my radio so I don’t want the frsky telemetry mods crash my others modules
    Thanks

    Reply
  3. Ben Barr

    Is this process the same with an XJT module ?… It seems that when using an Xjt with the smartiepats 9xtreme board only a wire from pin 5 on the module is required. Is it the same with this mod… ie just one wire from pin5 … if so where do i conect it on the turnigy atmega chip.. ?pin 2 or pin 3

    Reply
  4. Richard Witherspoon

    Hello using the Internet for advice is relatively new to me.Also the correct name for the parts I talk about may be a little out.Please bare this in mind.I have a Turnigy 9x for my RC Tanks.The thing is the right stick has been modified so it centres itself up/down.I would like to buy a second Turnigy controller 9x.But was told when I bought my first one it had been modified to do this.It came with a little bag with a screw & & a steel strip that I was told had been removed to make this right stick centre itself.Can someone please give me guidance on what’s involved in doing this process if I buy another controller?Your help would be appreciated.Regards Richard

    Reply
  5. J

    A note for others using an Arduino. Without a modification to the linked sketch, you will be unable to read the EEPROM. Reading and writing to Flash will work fine.

    Here’s the relevant excerpt from another blog (theboredengineers.com/2013/01/flashing-a-turnigy-9x-with-an-arduino/):

    “Because of the ATMEGA64 EEPROM address managment, you have to make 2 modifications : when reading the EEPROM and writing the EEPROM : the code looks like it :

    uint8_t write_eeprom(int length) {
    // here is a word address, get the byte address
    int start = here * 2;

    and

    char eeprom_read_page(int length) {
    // here again we have a word address
    int start = here * 2;

    You have to delete the “*2″ since the address is already a byte in the ATMEGA64.”

    Good luck everyone.

    Reply
  6. Ben R

    Hi I am a little confused. Probably from reading too many tutorials. If I follow only what you have described here, will my telemetry work? Or do I need to go to one of those links for further modifications?

    Thanks, Ben

    Reply
    1. Mark

      Same question. Flashing er9x was easy (if you find the correct driver von win10). But the Telemetry Mod doesn´t work for me. I´m not sure, if you have to mod your DJT FrSky Module?!( There so many different Tutorials in the web)

      Reply
  7. Gearymeister

    Do you have a link to how to do this on the 9xr? Fantastic post but as far as I know the 9xr uses a different chip.

    Would really appreciate your help as I can’t find what I’m looking for.

    Thanks

    Reply
    1. Oscar Post author

      Not really sorry!
      I have not used the 9XR because I have been hearing bad reviews about it.
      It’s just one of those things that once it works, you don’t want to lok at another one. :D

      Reply
  8. Jason

    Very well presented tutorial, much appreciated. I just finished flashing my 9x with ER9x using the Arduino method you described, with no issues at all. One minor detail I wasn’t clear on was whether I needed to have my 9x powered on or off for firmware flashing, but I found the answer elsewhere and thought I’d mention it case your readers also wondering the same. Be sure to power OFF your transmitter and unplug the battery before you flash the firmware (power is supplied from the Arduino/USBasp).

    Thanks,
    -Jason

    Reply
  9. John

    Hi, Thanks for a really clear, well labelled description. I am a little confused after looking at this and several others. The telemetry mods and the firmware flashing mods all seem to use the same MOSI and MISO pins near the cpu. Your mod does not seem to make any reference to a firmware flashing mod yet, obviously, one is required.

    How do the two hw mods interact? Do you need to make one, flash, undo it, make this one? Do they coexist somehow?

    Reply
    1. Oscar Post author

      Hi, The Frsky Telemetry mod, requires er9x firmware, which means you need to do the firmware flashing mod first.

      Reply
  10. Maurício

    Hi, congratulations for the excellent post.
    i have a doubt.
    I´v been reserching for this mod for a wile and all the other tutorials make a mod on the frsky module. is it necessary with the mod that you have posted?
    if it´s necessary, what should i do with a DJT module?

    Thanks

    Maurício

    Reply
  11. Tom De Bie

    Nice how-to you made here! :)
    On the Mega the ISP pins are different though.
    MISO –> 50
    MOSI –> 51
    SCK –> 52
    RST –> 53

    Or is it countered by your Arduino ISP sketch?

    With kind regards,

    Tom

    Reply
    1. Oscar

      Hi, the pins are defined in the ISP sketch. I am not sure if these pins are required by hardware constrains, or you can choose whatever pin you want.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Are you Robot? *

I only check blog comments once or twice a week, if you want a quick reply you can post your question on this forum IntoFPV.com... You might get a faster response from me there (multirotor related only).