Open Flight Stabilizer for the Orange RS3X

Update July 14th, 2015: I originally wrote this article 2 years ago. I’ve gone through and updated some of the links and text. Most notably there is much more in terms of availability for some of the parts such as the USBAsp and flashing tool. Also, Orange RX now has more product in the US warehouses including a stabilizer combined with a 6-ch RX.

Open Flight Stabilizer

Orange RS3X

I recently purchased a V2 version of the Orange RS3X from HobbyKing.com. It’s a pretty nice little stabilizer for the price. My only real gripe after trying it is that Hobby King takes their sweet time getting it to you from China! Update: HobbyKing is now carrying the stabilizer at their US West and US East warehouses!

If you want an all-in-one stabilizer and 6-ch RX HobbyKing now sells an OrangeRX RX3S 3-Axis Flight Stabilizer w/DSM2 Compatible 6CH 2.4Ghz Receiver (US West) (US East) (Intl). The method outline below works with this stabilizer and RX combo unit as well!

I lied. I had one other gripe. The unit couldn’t do two channel ailerons (for flaperons). After asking questions on the product page I was directed to an open source firmware project, Open Flight Stabilizer, that is being developed for the Orange units and NanoWii stabilizing devices. I highly recommend checking out the thread at RCGroups.com.

I quickly decided that for the cost of the RS3X there was no hurting trying to flash an alternative firmware.   Now that thread is somewhere at 90+ pages at the time of this post.  The page count wasn’t much shorter when I started looking for information. It took me a while and a little pestering but I was able to easily flash an RS3X V2.

Since the process is a little beyond programming your radio I thought I would help everyone out by writing a little guide on how you can do the same. I think it will really help those out there who have no software or hardware background.

Prerequisites

There are obviously several items you must do before we can talk about the procedure to flash your device.  In this section I’m going to cover what you need to buy and resources you’ll want to save.  I also want to point out the following:

NOTICE: I, the authors of the Open Flight Stabilizer, and the members at RCGroups.com take no responsibility if you brick, fry, or otherwise damage your device. Furthermore, none of the aforementioned parties provide any warranty or any guarantee for the fitness or performance of this device or the firmware provided.  Every effort has been made to insure that this 3rd party firmware is free from defects but none of the aforementioned will be responsible if your aircraft crashes, flies in an undesired manner, or causes property or physical harm. As with any RC aircraft check your controls on the ground before flight and make sure that your model reacts as intended. Users must have a certain concept of security to operate RC aircraft. Please be safe!

Reference Materials

Items To Purchase

  1. RS3X (alt link)
  2. USBAsp AVR Programming Device (Updated Link)
    1. UPDATE: HobbyKing is now carrying this item again and they have a good stock level. This item can also be found on eBay for roughly the same price as HobbyKing. This item ships from Hong Kong so it may take a bit of time to get to you if you live in the US. It doesn’t appear that they carry it in either of their US warehouses. If you’re looking for one right now my suggestion is to head over to eBay and look for one. Just check that it supports 5v and 3.3v (mine has USBasp 2.0 written on the PCB).
  3. Atmel Atmega Socket Firmware Flashing Tool (Intl link) (USA West) (USA East)
    1. The Google Doc manual says this is optional. While you can wire to the pins, don’t kid yourself, get the tool it makes the whole process easier.
    2. UPDATE: This very, very useful tool is now available at the HobbyKing international and US warehouses!

USBasp

The question of if you need Ardunio PL2303 USB (FTDI) has come up. I did not use this nor do I know why you would need it.

Miscellaneous

  • A computer with a USB port. You can’t do this on your iPad and I highly doubt that the old Packard Bell 486SX you bought back in 90’s will do the trick either.
  • A hobby knife
  • The Google Doc manual has instructions for both eXtremeBurner and AVRdude. I recommend AVRdude because it just requires a few simple command line operations to complete (it’s also a ton easier on *nix devices)

UPDATE: Windows Software/Drivers

I did a little Googling on how to get AVRDude and USBasp setup on Win 7 x64 (most newer computers). Here is a guide on setting up drivers for USBasp.  To download and setup AVRDude for Windows follow this link.

Other Notes

I did this process using my Ubuntu laptop. I will doing this walk-through little reliance on what operating system you may use. Just note that if you’re using Windows there will be some driver setup items you’ll need to complete before you start flashing. If you are using a *nix system you probably know enough Google Fu to be able to figure out the gaps.

Getting Prepared

Once you’ve ordered everything (and waited, and waited, and waited some more) you’ll find that the RS3X is a pretty simple little device. It pretty much just comes in a plastic bag. The instructions are found on HobbyKing’s product page. Throw those to the wind as if you’re reading this guide they’ll mean nothing to you.

The first thing you’ll want to do is remove the outer plastic case. There are four plastic tabs, two on each side that you’ll have to pry back to get the top of the case off. A hobby knife or small screw driver is good for this. Once you get the plastic top off you’ll see the circuit board with the three dials for adjusting gain (pots), the dip switches, and the plugs for the servo wires. Just an FYI, the LED is found just to the left of the plugs for the servo wires; it’s small, but it’s there.

Orange RS3X PCB

If you have your flashing tool near by you’ll notice that there is no chip that is the same size as the bottom of the flashing tool. That is because you need to remove the PCB (circuit board) from the bottom part of the plastic case. It is on the bottom of the board. This is probably the hardest part of the whole process. This PCB is tightly secured to this board by small ridges in the plastic. I ended up heating up my hobby knife and cutting the plastic so that I could bend back the left outer side of the plastic case.

Cutting the Case

Once you’ve fought with the PCB enough to remove it turn it over and the large chip is what we’re going to be using the flashing tool on. Hopefully the only hard part you’ll have to deal with is removing the plastic casing!

Preparing to Flash

At this point we could discuss how to setup either eXtremeBurner or AVRdude on your computer. This is not the point of the guide. The Google Doc manual has instructions for setting these up. In this guide I will cover how to use avrdude to flash the firmware.

I will point out that if you’re on Ubuntu you can easily “apt-get” the libusb and avrdude packages and install them and be ready to go.

If you’re on Windows take the time to make sure that when you plug in your USBasp that the drivers are installed. Also check to make sure that this file exists:

C:\Program Files\arduino-1.0.3\hardware\tools\avr\etc\avrdude.conf

Getting The Firmware

At this point you have a RS3X, a few flashing tools, and a computer. Where’s the firmware?

It’s located on GitHub. Follow the link at the top of the guide. On the GitHub project page there is a button labeled “Download Zip” in the right most column. Clicking this will download a master copy of the project in a “Zip” file. Currently the size is just about .5MB so it shouldn’t take you too long to download it, that is unless you’re working with Prodigy dial-up service.

After you have downloaded the zip file extract it. Follow the folders in this manner:
FlightStab-master -> Builds

In this folder will be several files with a “.hex” extension. The format of their names is similar to {DATE}{DEVICE}{VERSION}.hex. Take the file that has the most current date for the version of the RSX3 (you most likely have a V2 or V3; they use the same file) and place it in the same directory as the avrdude executable (not necessary for *nix systems). For example, 20130714_RSx3_V2.hex is the July 14th, 2013 firmware for the RSX3 V2/V3.

Test Fit the Flash Tool

Before we flash we want to make sure that the flashing tool is placed onto the chip correctly. Look very closely at your chip. There should be a little circle in on corner of the chip. When you’ve located it then look at your flashing tool. On one corner of the tool there should be a red dot. This dot will line up to the corner of the chip where the circle is located. For example, if you’re looking down at the PCB with servo plugs located at the bottom my chip had the circle in the upper left corner. My flashing tool would then go on the chip so that the red dot’s corner was facing that upper left corner (10:30). Do a test fit applying an even pressure so that the tool sits squarely but be careful to not exert too much force. You’re not making mashed potatoes.

Flashing Tool

Flashing Tool on Orange RS3X

Prepare USBasp

I’m not going to cover the driver setup etc, but there is one thing you do need to be aware of before continuing. Most USBasp devices are setup for 5v and 3.3v. You need to be set to 3.3v! On my USBasp it was as simple as moving the jumper from 5v to 3.3v. I’ve read that depending on where you get your USBasp it may be different. The other method may be removing the jumper completely.

Erasing and Flashing

Once you’re comfortable holding the tool to the chip it’s time to flash. Take a deep breath. This part should be easy!

NOTICE: From this point on you’ll be erasing and overwriting your RS3X. There is no going back. There is no way to get the stock firmware and flash back. If for some reason you don’t like the firmware or you break the device it’s about the same as taking a $20 bill out of your wallet and lighting it on fire. Not too terrible, but you did wait like a month for that thing to get here in the mail, right (you did order more than one, right)?!

The first task is to erase the old firmware. Here is the avrdude command:

Windows:

avrdude -C "C:\Program Files\arduino-1.0.3\hardware\tools\avr\etc\avrdude.conf" -c usbasp -p m168p -e

*nix:

avrdude -c usbasp -p m168p -e

How’d you like that?! A lot less to type, huh.

Make sure you have the flash tool on the chip like you practiced and then run the command. The LED light, now on the other side of the board, will flash.

Protip: I like to have my .hex file and avrdude in the same location so I don’t have to type a long nasty path into the command line.
Protip 2: I found it easy to type the whole command in, prepare the flash tool, and then get my wife to hit the enter button. That way I could make sure I was holding the PCB and flash tool correctly. Don’t worry, the whole process takes about 5 sec and flashing takes 20sec, your hand’s not going to fall off, maybe.

If you see this:

warning: cannot set sck period. please check for usbasp firmware update.

Do not be worried. It’s a warning and nothing bad has happened. You may also see it when you flash.

Now we have an empty chip. Lets flash the firmware:

Windows:

avrdude -C "C:\Program Files\arduino-1.0.3\hardware\tools\avr\etc\avrdude.conf" -c usbasp -p m168p -U flash:w:.hex

*nix

avrdude -c usbasp -p m168p -U flash:w:.hex

Same process as before. The <filename> should be replaced with the name of the file you got from the zip file.

Once you press enter avrdude will erase the chip again (for good measure), flash the firmware, and then read it back to make sure it was written correctly (verify). The whole process takes between 18-22sec.  You should again notice the LED flicker while the process completes.

Testing

If you’ve made it this far then you’re probably reading ahead. That’s cool! Before I wrap up everything I just wanted to point out that the directions for connecting the RS3X, your Rx, and the aircraft’s servos are going to be a bit different now. Also the gain and dip switches have had their configuration changed from stock (remember you did just flash a new firmware). Read up on how to setup the connections and gain on the Google Doc manual’s page.

As a good pilot you should know without me telling you that it is a good idea to test everything on the ground. Grab some servos, a receiver, a BEC or ESC, a battery, and some male-to-male extension cables.  Hook everything up and power it up. You should get a series of LED flashes and then the servos will move back and forth. If this happens you should be good to go.

If you have any problems head to the RCGroups thread first. Leave comments here about omissions or clarifications.

About Mike

I'm a software engineer. Look into the about page for more information about me.
Tagged . Bookmark the permalink.

7 Responses to Open Flight Stabilizer for the Orange RS3X

  1. Tony Yeung says:

    Great write up. I must be one of the few that didn’t use the flashing tool to update the firmware. Although the flashing tool is easier, the alternative of soldering pins costs next to nothing The economics of purchasing a $20 (+ shipping) tool to update a $17 device didn’t make sense to me.

    • Mike says:

      Hi Tony,

      I agree with you. If you’re testing this out for a single device then it is kind of absurd to by a tool that costs as much as the device itself.

      However, I saw that the tool also worked for flashing the SimonK firmware for ESCs that are used in multirotors. My line of thought went from, “that tool makes it easier,” to, “if I have to flash a lot of stuff it would be much easier to use this tool than soldering connections on everything.”

      So ya, if you’re just going to be fiddling around with the RS3X then it may not make much sense to get the flashing tool, but if you’re like me and order one any time you have to get something from HobbyKing’s international warehouse then it may make sense to have the tool for ease of use.

  2. This looks pretty cool. I’ve never used a stabilizer. I don’t know if I’ll reflash it because it looks a little complicated, and I don’t want to buy the tool, But I’ll keep it in mind when I by again from the Hobbyking Intl store.

  3. jeremi99 says:

    Hi Mike
    Great Writeup. I have a couple of newbie questions:
    1) I am curious to know where you got the V1 and V2 firmwares files, did you get them from Orange or did you rewrite the source programs and compiled them yourself ?
    2) I have a 3AXIS Flight Simulator of the first generation that cannot be switched off by an auxiliary channel (the casing is different from yours). Do you know if I can reflash the chip with V2 firmware and be able to switch the 3AXIS off?
    I tested the 3AXIS on a low cost RCpower Extra 300 depron plane. I must say I would have liked to switch it off as the 3AXIS was trying to over compensate and the plane was actually flying like a pig. As it is, my 3AXIS may be a little bit too frightening to fly.

  4. Rob Caprio says:

    Hi Mike,

    I’m trying to erase the old FW first and I keep getting an error message that says “332 unrecognized character: “w” when I put in “avrdude -C “C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf” -c usbasp -p m168p -e” – any thoughts on that?

    • Mike says:

      Sorry for late reply! Still working on this? You may have an invalid setup in the avrdude.conf file. Check the guide linked in the first post of the RCGroups post. It talks about how to setup the avrdude.conf file.

      All my gyros have died and have yet to order more. As soon as I do, which should be soon, I’ll revisit this article.

Leave a Reply