“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. So what I’ve come out with now is that the code I grabbed seems to match the wiring shown in class #4, and not plugging it straight into analog pins 2-5 (or else pins 2 and 3 on my arduino are fried…). Is this expected, or are those pins likely dead?

    Either way, it’s really cool that it works at all! Thanks again for the chip :]

  2. Just as an update, the nunchuk isn’t fried, so either I’m doing something wrong in the code, or my Arduino’s analog pins are bad…

  3. Hi Tod, I received my adapter and soldered it up last night, but couldn’t get any data coming to or from it. It looks like the code’s hanging at the Wire.endTransmission(); portion of the init code, once it hits that line, nothing happens. If I unplug the nunchuk, then the code will continue running. I’ve checked each of the pins on the adapter to make sure that I didn’t bork up the soldering, and they all have the proper continuity and such. Is there a good way to determine if I have a bad Arduino? I’ll be booting up wii sports for the first time in ages just to see if I fried the nunchuk somehow as well (I’m rather new at all of this Arduino stuff, so I’m not putting it past myself)

    Thanks!

  4. Hi Evan,

    It will work with the Classic controller. The Classic will return a different data packet, so the “nunchuck” library won’t be that useful. I think it will still cause the Classic controller to return data, but I’ve not tried it out yet.

  5. Great idea, there are lots of people that want to play but don’t want to chop the ends of the cables. I am sure this will get some new ideas from concept to reality!

  6. I just put together the adapter you sent and tried it out. Thanks Tod! It works great and is very nicely made.

  7. Mr hi
    I am a student in electronics, I prepare my graduation project study design and implementation of an electrocardiogram through the soundcard why I think a transmetre ECG signal by a bluetooth end of the bluetooth also receive and ‘injected by the end of a sound card to be treated at micro computer
    For this I need help in the emission and reception of bluetooth.
    While awaiting a response from you accept Mr saltutations my respectful.

  8. Hi Jay, Apologies. As I mention in the update above, I wasn’t able to deal with any orders the first week of March. I’ll mail out orders on Monday so you should get it Wednesday.

  9. Hi there, I ordered two last week and haven’t heard back. Are they on their way?

    thanks,
    J

  10. Oh you’re right, C60. Apologies to anyone who’s used the nunchuck_funcs.h library and it didn’t work for you. I’ll update the library shortly.

  11. I was having trouble with todbot’s example not properly doing pins 2&3 doing power and ground, but I found the missing parts in Laen’s Freqin Wii, thanks for that.

    // This sets up analog pins 2 and 3 to provide power and ground.
    byte pwrpin = PC3;
    byte gndpin = PC2;
    DDRC |= _BV(pwrpin) | _BV(gndpin);
    PORTC &=~ _BV(gndpin);
    PORTC |= _BV(pwrpin);
    delay(100); // wait for things to stabilize

    I think I might end up getting the wiimote for interfacing with puredata or any OSC or midi app. But the wiichuck is great for standalone projects.

Leave a Reply

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