My Attempt At Flashing The Turnigy 9x Transmitter With The ER9x Firmware

in #howto7 years ago (edited)

Two days ago I posted a quick guide on how to use virtually any combination of an RC transmitter and simulator to learn to fly and I mentioned I'm going to document my whole learning and building process as I go through it to make it a bit easier for anyone else trying to get into the hobby. If you missed that post you can find it here: https://steemit.com/howto/@tadejgasparovic/how-to-connect-any-rc-transmitter-to-a-simulator

With that out of the way, here's the next step I took. Yesterday I decided to flash my Turnigy 9x to get the most out of it. I've decided on the ER9x firmware since it seemed like most people preferred it over the stock one and also because my friend has been using it himself for quite a while and was really happy with it.

NOTE: Please don't do the following procedure if you're not comfortable with opening up your transmitter, soldering to it or anything else in this guide. I'm not responsible for anything that happens to your transmitter if you follow this guide.

The first thing I had to do was open up the transmitter and solder some wires to the SPI programming pads found inside near the microcontroller. This is where I stumbled upon my first problem; I didn't have the correct screwdriver because the screwdriver kit I used to have somehow got lost. So I had to go to the store and buy myself a new kit. I opened up the transmitter and found the correct pads to solder to. The soldering process was nothing complicated since I only had to solder 6 wires to it following the diagram below.

After I was done soldering I had to decide on what programmer to use. I had the choice between an FTDI breakout and an Arduino Uno. For some reason I decided to go straight with the Arduino which later proved to be a better choice than the FTDI (the FTDI didn't even work for some reason), but to make the Arduino work there had to be some changes made to its configuration otherwise it wouldn't be able to keep up with the data coming in and out of the computer (i.e. the firmware). I opened up the HardwareSerial.h header file found in <arduino install dir>/hardware/arduino/avr/cores/arduino. I changed the following two lines from:

#define SERIAL_TX_BUFFER_SIZE 64
#define SERIAL_RX_BUFFER_SIZE 64

To:

#define SERIAL_TX_BUFFER_SIZE 128
#define SERIAL_RX_BUFFER_SIZE 128

This will allow the Arduino to keep up with the serial data. After the flashing is done you can change these values back.

Next, I had to upload a modified Arduino ISP sketch since the default one cannot handle the large amount of EEPROM the transmitter firmware uses. I don't take any credit for this Arduino sketch, I only modified a couple of things to make it compile correctly with the newer version of the Arduino IDE. You can find the modified sketch here: https://gist.github.com/tadejgasparovic/61e14bebebf2df867d48f7aa78b893d0

The next problem was finding the software to flash the firmware. I had to click through a lot of links before I finally found one that worked, but as it turns out I should've just Googled "Companion9x download" and clicked the first link but I only figured that out now as I'm writing this post so I was actually working with an older version of the software.

 

When the software first started it popped up an error message "Unable to check for updates." Apparently the software was supposed to download the latest ER9x firmware on its own, but since it didn't do so I again had to scavenge hunt the Internet for a copy. I'm not sure if I found the latest version, but the latest version of the companion9x seems to download the firmware automatically so you shouldn't have to look for it yourself. The interface is also a bit different, but you shouldn't have any problems finding the right buttons.

The first step in flashing the firmware was to read the current firmware and the EEPROM which, spoiler alert, didn't go nearly as planned. The firmware and EEPROM read with no errors, but when I tried opening it up (EEPROM) in the software to view the settings and later on when I tried re-flashing the transmitter with it, things didn't go as planned to say the least. The software reported an "Invalid EEPROM file" error and the transmitter displayed "EEPROM Error!" while obnoxiously beeping. I'm not sure what the cause of this was, but I'm assuming it was a bad idea to use an Arduino. So if you can, use an actual SPI programmer.

After a couple of failed attempts at backing up the current firmware and EEPROM I decided to just commit and flash the new firmware and if it failed I would just flash a copy of the stock firmware I found online. The flash was successful and the ER9x firmware formatted the EEPROM upon startup. Things looked pretty good until I realized the sticks weren't calibrated. Without doing any research I stupidly assumed it was a firmware error and proceeded to re-flash the stock firmware which ended with a continuous beep and "EEPROM Error!". Unfortunately not even holding down the "EXIT" button upon startup restored the EEPROM. At this point I though the transmitter was useless, but I still proceeded to re-flash it with the stock firmware a couple of times with no success.

At this point it was about midnight and I've been trying different setups and firmwares for 6 or 7 hours. Since I was exhausted and pissed off at myself for messing it up I decided to re-flash the ER9x firmware since at this point I had nothing to loose. The firmware flashed successfully and upon startup it again formatted the EEPROM which came as a big surprise to me since I thought I somehow fried it. I played around with the settings and found the "Calibration" menu *facepalm*. I had some problems figuring out how the calibration worked, but when I finally set it up it worked perfectly.

So, for all of you who are going to try this out here's how to calibrate the sticks:

  1. Hold MENU and go to Radio Setup > Calibration
  2. Center your sticks and press MENU
  3. You'll be asked to move the sticks. This is where I messed up. You're supposed to move both sticks to their minimums and maximums which will allow the transmitter to calibrate correctly. I only nudged them a little bit which resulted in the transmitter detecting only a slight move of the stick as a full movement.

I hope this helps you flash your transmitter and avoid making the same mistakes I made.

 If you liked this post upvote it and follow me for more similar content! I'll be documenting the whole quadcopter build when the parts arrive in about a week!

Sort:  

Congratulations @tadejgasparovic! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the total payout received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Coin Marketplace

STEEM 0.20
TRX 0.12
JST 0.028
BTC 64097.37
ETH 3476.43
USDT 1.00
SBD 2.53