Sunday, October 26, 2014

Edit: I'll shortly have code and instructions for using the wider
ATTINY26-16SU/ATTINY261A-SU for easier soldering (order this rather than the ATtiny24
if you are looking to perform this mod in the next couple of days).

Building on the awesome work of forum member "micro" from NFGgames in this thread, I decided to take things a step further and modify the board directly; instead of replacing the entire PCB from the replacement GC style joysticks (with the "Simple Jet" PCB). This was to bring down the cost of replacement from $20 to $2 (considering you have already paid for the board in the original stick) and to satisfy those waiting for limited release of these PCB's (myself included).
The only real downside to this modification is you don't get the updated joystick potentiometer or easy to configure jumpers.

While some suppliers have released a newer version of this stick, you aren't guaranteed that you will receive it from all suppliers, they have also increased the price of this version and there are still minor issues with these sticks that micro's redesign has fixed. This swap will also work for that board too, by just removing the components in the same positions.

Micro's mod relies on the ATtiny24/24A. The great thing about the chip is it has a highly configurable pin layout. Through some simple reverse engineering of the original board, reconfiguring the code's pin dependencies and some chip reorientation, I have been able to get this to work by removing a couple of passives on the original board and replacing the existing IC with the ATtiny24. You can either use the SOIC based ATtiny24or ATtiny24A (whichever is easier to source), as they are identical for this purpose except for minor current requirements.

With this pin arrangement comes some small code changes from the original source. Get these from http://pastebin.com/CWSd2NwB if you want to build from source yourself. I have also crudely translated the code comments. The original code is still there too, it's just been commented out if you want to see what has changed.

Once programmed, don't power the chip on yet. It's now time to modify the PCB:

You will want to remove the two capacitors marked in red, the resistors marked in blue on the left, and desolder the main IC. To make it easier, you can cut each leg of the IC carefully and clean up the pads once the chip is removed with some solder wick. Be careful not to lift any traces.

Now bridge the contacts marked in blue and solder the newly programmed IC in the orientation shown. The IC is a bit thinner, so it might be a little tricky to solder the pins to the original pads. Note that the ATtiny sits one pin in from each end of the existing chip and the orientation is inverted (as shown in the picture and table above). You will need to connect a 10KOhm resistor between VCC (pin 2) and pin 4 of the ATtiny as well (as shown in yellow). Additionally bridge pins 1 and 2 with solder as shown in blue on the right of the IC. Also solder pin 14 to the additional pin adjacent to it, (shown in blue; this is ground).

Note that there are some functional differences as outlined in the above table and the source as to how to re-calibrate and invert the X-Y axis. The re-calibration pins have changed and the invert axis pins are now handled on active high, rather than active low (active low is the default when you follow the instructions above). If you want to invert, you just need to desolder and lift the appropriate axis pin.