Check out the final product in action!
Step 1: Materials
This is what you'll need:
- Nintendo Wii Nunchuck Controller, available at various retailers
- Teensy 2.0 USB Development Board, available at www.pjrc.com
- USB cable, available at www.pjrc.com
- Breadboard (for prototyping), available at www.sparkfun.com
- 22 Gauge Wire, available at www.sparkfun.com
- Solder, available at www.sparkfun.com
Aside from the components listed above, you should have access to various tools such as a soldering iron and ancillary hand tools. Additionally, you should have basic soldering skill and working knowledge of the Arduino environment before embarking on this journey.
Step 2: Nunchuck Disassembly
Remove the two screws on the underside of the Nunchuck controller using a tri-wing screwdriver and un-clip the top shell of the Nunchuck to expose the electronics.
Remove the electronics and un-clip the two hooks of the white molded plastic part at the center to access the electrical connectors of the x and y-axis potentiometers.
Remove the flexible membrane to access the electrical connectors of the C and Z buttons. The middle connection (red wire) is the Z button and top connection (black wire) is the C button.
Step 3: Prototyping on Breadboard
As good practice you should always prototype your project on a breadboard. The Teensy 2.0 comes with optional header pins making prototyping a breeze. Connect the Teensy controller to the inputs of the Nunchuck controller in the following manner:
GND Ground (each potentiometer and buttons)
+5V 5 Volts (each potentiometer)
F0 X-axis potentiometer output
F4 Y-axis potentiometer output
D2 C button
D3 Z button
Once you've connected everything per the table above, you're ready to program. In addition to putting the attached code into the Arduino window, make sure the settings are correct for this project. The board should be identified as "Teensy 2.0" and the USB Type "Keyboard + Mouse".
Upload the code and press the reset button on the Teensy. Play around with the joystick and both buttons to confirm everything is working the way it should. A simple mistake would be to mix up the X and Y directions or the C and Z buttons, but that can be easily fixed by swapping the connections on the breadboard (another good reason you should always prototype everything).
Step 4: Final Assembly
Once you have the code right on the Teensy it's time to prepare all the components for final assembly.
Nunchuck shell modifications
- Trim both halves of the shell as detailed in the pictures to make room for the additional hardware
- Using a soldering iron, remove all header pins from Teensy board
- Trim and strip all wires coming from the Nunchuck electronics and solder them directly into the Teensy board. You're working with in snug quarters so make sure you make your assembly nice and tight.
After those simple modifications have completed the electronics should fit right into the lower half of the shell. Once the electronics are in, all you need to do is snap the halves back together and install the screw into the remaining screw hole. Plug it in and enjoy!
Finalist in the