Shinewave - Reactive Gamecube controller LED mod

If you've talked to me in the last few months, I probably mentioned my latest project at some point. As an avid Super Smash Brothers player, I wanted to be at the lead of the cool controller arms race. I needed a controller that didn't just blink. I needed a controller that blinked when I pressed buttons.

GitHub - Shinewave

Background

When I hold down and press B on my controller, my character is surrounded by an invulnerable blue blinking hexagon. Whenever I preformed this action, I wanted my controller to follow suit and also blink blue. Other existing LED mods are either solid color, indiscriminate RGB fades, or flashes coordinated to the rumble.

Reading the controller

My first idea was to just wire a microcontroller into the analog potentiometer for the direction stick's y-axis and the B button, then recognize the varying logic levels as inputs. However, my vision for the project quickly got away from me. What if I wanted it to also change colors when I jump, or shield, or down-air? Each of these would require another wire, cramping the already limited space inside the controller and increasing the projects complexity.

Rather, I decided to have a single wire listen in on the controller's data line: the same wire that is shared between the console and controller that enables communication. Sixty times a second, the console sends a message to the controller asking it for it current state, then the controller responds on the same wire with all of the button and stick values. Now, with one wire and a bit more code, I could know everything about the controller!

Controller data line

Hardware

While deciding on what microcontroller to use for this project, I had a few criteria. I wanted a small chip that would fit inside the controller's empty rumble housing. It also had to be available in a through-hole package so that I wouldn't need to print a PCB just to break out the chip, and so that I could easily separate it from the controller for programming. I ended up settling on the ATtiny85 microcontroller from Atmel. This chip also has the advantage of great documentation and is similar to the ATmega series, which backs basic Arduino boards, so I was already familiar with its features.

As for the LEDs, I opted again for something small and familiar. The WS2812(aka Neopixel) series of RGB LEDs can be daisychained, require only three wires, and are individually addressable. In addition, they hold onto the color that was last assigned to them, so I wouldn't have to worry about continuing to drive them while the CPU was busy reading the data line. In particular, I used these little PCBs that also include a small smoothing capacitor.

LEDs

Software

All of the code for this project is hosted on GitHub and is free for reuse and modification. Writing the software was definitely the biggest hurdle and although its currently in a working state, progress is still ongoing. As such, instructions on setting up the microcontroller is getting its own post.

The build

Overall, the build was actually pretty simple and only takes about two hours. The wiring is simple enough that it didn't need a protoboard or other through-hole board, although using one would slightly increase the simplicity.

Parts

Tools

  • AVR programmer, this or similar
  • Hot glue gun
  • Soldering iron
  • Tri-wing screwdriver

Controller

The back shell is mostly hollow, with the most free space inside the handles. In order to make room for the microcontroller and lighten the controller, I removed the rumble motor from its housing and desoldered its two connections.

Disassembled controller

Now, there is plenty of room for the microcontroller and five LEDs.

Back half

One LED goes in each of the handles, one under the C-Stick, another under the D-pad, and one behind the rumble housing. I measured the distance between each of these points, cut the 12 wires necessary, then daisychained the LED boards together.

LED strip

At this point, I tested the strand with an Arduino and confirmed that it worked. Also this image, I have the headers soldered on parallel to the LED board, but I ended up resoldering it at ninety degrees. Because these LEDs will be hot glued to the back case, its useful to be able to separate the two halves of the circuit during assembly or maintenance.

Back case with LEDs

Top half

The next half of the controller took a bit of work and soldering, but was just as easy. Three lines come from the controller's motherboard(5V, GND and controller signal) and need to be soldered. The power and ground lines go to both the LEDs and the microcontroller, and the controller's signal goes only to the microcontroller. Finally, the LED signal comes off the microcontroller and to the LEDs.

Circuit diagram

The microcontroller is housed in the now empty rumble housing. In order to make room for the wires, I drilled a hole in both the top and bottom of the housing for the input and output. I tried to go without modifying the housing, but the wires kept getting in the way of the nearby shoulder buttons and I couldn't easily reassemble it.

Rumble housing

Rather than solder the microcontroller directly in, I installed an 8-pin socket. This way, I don't have to worry about heat stress on the chip from soldering, and that I can remove and reprogram it more easily. In the future, I might implement some sort of USB interface for easier programming.

After probing with my scope during development, I mapped out the through-hole joints on the output cord connections. Although I've checked the order of these connections on a few controllers, I know that the controller's motherboard has gone through several revisions, so I'd recommend double checking yourself. The 5V and GND lines will read their values respectively, while the signal line(which is high most of the time) will read 3.3V on a multimeter. You'll need to check it with a scope or equivalent tool to tell it apart from the 3.3V source line.

cord solder

Finally, feed the three output lines through the bottom hole in the housing and solder them to a three-pin female header. This header will connect to the male headers on the LEDs. I'm currently looking for a very small asymmetric connector pair to use instead, but for now I'm just careful to connect them in the correct orientation during assembly.

Full album

UPDATE: This post only has some of the pictures that I took during the assembly. You can see all of them here.

Conclusion

Overall, this was a fun project that I am glad to have seen through. As far my my research can tell, this is the first responsive LED mod and I can take it!

Feel free to comment below or to contact me if I missed anything.

comments powered by Disqus