“WiiChuck” Wii Nunchuck Adapter Available

Want to hook up a Wii Nunchuck to an Arduino but don’t want to cut up the cord on your Nunchuck? Yeah me too. So I made some of these:

wiichuck_adapter1.jpg

wiichuck_adapter2.jpg

It’s a small PCB that adapts the Wii Nunchuck connector to standard 4-pin header. I call it the “wiichuck adapter”. It plugs directly into the Arduino, no wiring necessary. You can get one too for $4.

Available from the following wonderful shops:
FunGizmos.com. FREE DOMESTIC SHIPPING. International shipping for $1 more.
Little Bird Electronics (Australia)
SparkFun. Ships domestic & internationally. Be sure to order header pins too!
– and just about any SparkFun distributor

One of the coolest things about the Wii (to me) is that the expansion port on the bottom of the Wii remote is an I2C serial connection. This means that anything that plugs into that port can work with microcontrollers like the Arduino or Basic Stamp or others. Of the available peripherals, the Wii Nunchuck is one of the best. It contains a 3-axis accelerometer, a 2-axis joystick, and two buttons. Hooking up a Wii Nunchuck to Arduino is easy and I have class notes describing how to do it. But cutting off the connector of the Nunchuck to get at the wires is a little drastic.

This “wiichuck adapter” let’s you play with the Wii Nunchuck and other Wii remote peripherals without needing you to cut cables. Just plug it into the Wii Nunchuck, then into the Arduino, in to Analog In pins 2,3,4,5. Pins 4&5 are the I2C communication pins and Pins 2&3 can act as the power supply for the Nunchuck.

wiichuck-diag.png

This is what it looks like plugged into the Nunchuck by itself.

wiichuck_adapter3.jpg

Nunchuck and Other I2C Devices (like BlinkM)

You can use other I2C devices at the same time as the Nunchuck. The I2C bus allows for multiple devices. For instance, if you have a BlinkM and also want to use a Nunchuck, no problem. The pinout of the BlinkM and the wiichuck adpater are the same. Just solder a little 4-pin socket header to the top of the wiichuck adapter.

wiichuck-header.jpg

And then you can plug in a BlinkM right on top.

wiichuck-blinkm.jpg

Software

To make it a little easier to play with the Nunchuck, I made a little Nunchuck library for Arduino and demo:
nunchuck_funcs.h
WiichuckDemo.ino
(Or better yet, check out the github repository for it all zipped up. Just unzip and open the .ino in Arduino)

It is based off the original research done by Chad Philips of Windmeadow Labs. The library uses the Wiring I2C library called “Wire”. This library is built-in to Arduino, as long as you have the latest Arduino development environment (0010 currently). To see another Arduino sketch using this library, you can check out the BlinkMChuck example that’s part of the BlinkM examples.

The library functions are:
nunchuck_setpowerpins() — power up a nunchuck plugged directly into an Arduino on analog pins 2,3,4,5.
nunchuck_init() — init a nunchuck connected to an Arduino
nunchuck_get_data() — get a data packet from the Nunchuck

Then you can get at the data packet using various helper functions like:
nunchuck_accelx() — get X-axis acceleration
nunchuck_zbutton() — get Z-button state
– …and so on, see the header file for a complete list

Nunchuck Information

Wiimote/Extension Controllers/Nunchuk — info page about the Nunchuck on WiiLi (Linux for Wii) site
“Wiimote Accessory Bus” — docs about the Nunchuck’s connector.

Getting One / How to Order

Available from the following wonderful shops:
FunGizmos.com. International shipping for $1 more.
Tinker.it (UK)
Little Bird Electronics (Australia)

Update 20 Feb 2008: Over 200 wiichuck adapters sold to more than 50 people in 5 countries. I still have some available if anyone wants one. To those who ordered up to now, you’ll be getting them in the post in a few days.
Update 29 Feb 2008: Over 300 wiichuck adapters sold and I still have many more left. Get yours if you want one. :-) Anyone that’s ordered before today should receive their adapters via first class post soon. I’ll be unable to mail out any orders for the first week of March.
Update 24 Mar 2008: I still have several left. If you’re in AU, you can also get the adapter kit from Little Bird Electronics.
Update 11 Apr 2008: Updated the nunchuck_funcs.h library to easily work with a nunchuck plugged directly into an Arduino by adding a nunchuck_init_with_power() function (see comments below). Also, I still have several adapter kits for sale.
Update 6 May 2008: All Out! But I’ll be doing another board run in a few days and will update here when I have more available.
Update 8 Jun 2008: FunGizmos.com is now carrying Wiichuck adapters! They also have lots of other cool things, like BlinkMs. :-)
Update 7 Jan 2009: Both FunGizmos.com (US) and Tinker.It(UK) carry the Wiichuck adapter.
Update 31 Mar 2009: Fixed small bug that made it not compile under more recent Arduino, and fixed links. Also: if you’re having problems getting this to work, in the Arduino software, go to the “Boards” menu, switch to a different Arduino board type, compile, then switch back to your type. This forces a recompile of the Arduino I2C/TWI library that sometimes doesn’t get compiled correctly.
Update 18 Feb 2010: Updated API description to note that “nunchuck_init_with_power()” was removed in favor of “nunchuck_setpowerpins(); nunchuck_init();”.
Update 6 Dec 2011: Updated to work with Arduino 1.0 (still works with Arudino 0023 too). Changed download links to github repository.

299 Replies to ““WiiChuck” Wii Nunchuck Adapter Available”

  1. Hi,
    If someone in the EU wants to make a bulk order, I can ship them to that person (with quantity discount and inexpensive shipping), and they could be the “distributor” for them. :)

  2. Hi, does anyone knows how to get the adapter in europe??
    tinker.it ships only to UK, and fungizmos shipping to europe is 70$….

  3. Hi Tod,
    Any update on your new wiichuck board run? I am itching to experiment with my arduino and nunchuck but dont want to cut the nunchuck cable :-) I want to order 2 pieces, thanks

  4. Hello Tod,
    I ordered one a few months back, and it is perfect! I came back here to order another one, but it seems I’ve missed the last batch. Are you planning on making more?

    Daniel

  5. Hi Evil Paul, Funny you should mention that, as I recently picked up a Wii Cord-free to play with for that very purpose.

    If it can be a general wireless I2C data channel, that will be very cool.

  6. I ordered one while away at school.
    It was here when i got home. Thanks!

    joe

  7. Hi todbot,

    Great blog, and great booth at Maker Faire. I just sent you $4 last night; got any left? Thanks!

  8. For those experiencing the hang after Wire.endTransmission(): Make sure your Nunchuk isn’t hooked up to the adapter upside-side down.

  9. …and addressed the solution there as well, but…

    I had the new nunchuck library, but still had nunchuck_init(); in my code; changed to nunchuck_init_with_power(); and it works fine.

    Thanks!

  10. Hi justfred,
    I responded in the arduino forum, but wanted to add a bit here. You shouldn’t need pull-up resistors when playing with the Nunchuck. The Arduino has built-in pull-up resistors that work for small I2C networks.

    Have you gotten the ShiftOut tutorial to work, with nothing else plugged into the Arduino?

  11. (I haven’t ordered an adapter yet; my cable end was already cut off when I found your site) I’ve got the wiichuck working with the libraries as described, but I’m having a problem when I try to plug other stuff into the digital pins. Specifically, I’m using http://www.arduino.cc/en/Tutorial/ShiftOut to connect pins 8, 12, and 11 to an 74HC595; when they’re connected (not sending any messages/pin sets to the 595) the 595 goes haywire (I’ve got LEDs attached to its outputs), I don’t see data from the Nunchuck, and the blinkm doesn’t do it’s thing.

    I’m wondering if this might be a ground/power problem, since I’m using the analog 2+3 – and I don’t have pull-up resistors yet. (595 is getting power and ground from the Ard power and ground pins; Ard is getting power from USB)

    Any suggestions?
    (duplicate of arduino forum http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1208140946 )

  12. Oh and that failure mode you’ve seen is typical when the I2C device you’re trying to talk to doesn’t exist. More complicated I2C libraries let you query the I2C bus for a device before trying transact with it. The “Wire” library used in Arduino is meant for ease-of-use and assumes you’re running power to all your components. ;)

  13. Oh crap, that’s right I forgot to update the “nunchuck_funcs.h” library to set pins 2 & 3 to be power & ground. This problems is mentioned above in the comments but I was supposed to update the nunchuck library. I’ve now updated that file so you should download it again.

    If you have a nunchuck plugged directly into the Arduino, use this function to initialize the Nunchuck:

      nunchuck_init_with_power(); 

    instead of the normal nunchuck_init().

    Update 18 Feb 2010:
    Instead of doing the above, do:

    nunchuck_setpowerpins(); 
    nunchuck_init();”.
    
  14. Hi! Yeah, I did get it working, but it’s not entirely as I expected I’d be able to.

    I don’t have access to my multimeter right now… I’ll check and let you know what I find. In terms of stuff that I did try before I saw the message, I made sure that all of the pins that interface with the nunchuk have connectivity to the male jumper pins, and that none of those were bridged. I’ll have to check back later, I guess.

    What I did do to get it working for me was to put it into a breadboard, having the data and clock pins go to analog 4 and 5, respectively, and then the + and – pins I put to the 5V and ground pins, respectively. When I had the adapter plugged straight into pins 2-5, there wasn’t any voltage going across 2 and 3 (checked that with my multimeter, which is what got me to try the other layout).

    I’ve just tried rebuilding the I2C libraries again using that process, and ended up getting a few warnings regarding twi.c referencing an obsolete header file (I’m using 0011, if that makes a difference). I changed the reference from avr/signal.h to avr/interrupt.h, but it still will freeze at that endTransmission line, and without a multimeter, I really can’t check whether there’s any voltage across 2 and 3.

    In any case, this works for my purposes probably just as well, and I suppose as a bonus, I don’t take up two analog pins just for power.

    Thanks!

  15. HI Jang-Soo,
    So did you get the Arduino to talk to the Nunchuck? It’s unclear to me from your last comment. The adapter used in the “Bionic Arduino” class notes #4 is a previous attempt at a wiichuck adapter and has a really screwed up layout. (I need to update those notes to show the new adapter in use)

    As to what the problem might be with just plugging the Nunchuck directly into Arduino, I’ve seen Arduinos with solder bridges across a few of the Analog pins. Look on the bottom of your Arduino to see if you have any solder bridges. You can fix them up with a tap of the soldering iron. I’ve also had one Arduino have a bad header jack so that wires and stuff plugged into it wouldn’t make contact. Both caused lots of frustration. :)

    To test out either of those cases, get a multimeter, plug something into the pins in question, and check for continuity from the thing plugged in to the trace on the bottom of the Arduino. If there is continuity, good. Then check neighboring traces to see if there’s a short you can’t see.

    On the software side, one problem I’ve seen is that sometimes the Arduino application doesn’t rebuild the I2C libraries correctly. To fix this, load up your sketch, Go to the “Board” menu and choose a different Arduino type, wait a bit, then go back to the “Board” menu and choose your correct board type. Then re-upload the sketch.

    And finally, be sure you’re using the latest version of the Arduino application. It seemed that only around version 0010 did the “Wiring” and I2C functions start correctly.

Leave a Reply

Your email address will not be published. Required fields are marked *