“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. The Wii Nunchuck needs 3.3V.

    Please remake this item with a simple 3.3V LDO and a few caps (a PCB with hooks for the Nunchuck to grab onto would be ideal).

    5V will smoke your Nunchuck after a few weeks.

    And, please tell people that many aftermarket (non-OEM) Nunchucks do not function right with the Arduino.

    Less pain = less discouraged customers :)

  2. Hi engr_student,
    It sounds like your serial monitor is set to the wrong baud rate. The sketch above is at 19200 bps.

  3. When I try and use this device, the serial monitor outputs a whole bunch of gibberish, but the code compiles. Any advice?

  4. The baud rate is arbitrary. I like 19200 better than 9600 is all. The “delay(1)” at the bottom of the sketch adds about as much delay as all the Serial.prints. If you take either of those out, you can increase the polling rate. There seems to be some issue with polling too fast however. I’ve not looked into whether it’s a problem with the current way we’re getting data from the Wiichuck, issues with the Wire library, or an underlying limitation of the Wiichuck’s I2C implementation.

  5. Dear Tod,

    Thanks for the great product. Just one question: does the baud rate affect the performance of the Nunchuk? Most example code uses 19200. Is this the ideal value or is it arbitrary? Thanks.

    Tom

  6. Is there a way to increase the resolution over a given range? Say, 43 to 47 deg? The current 100 digits for 180 deg is very loose. I would like to see resolution down to the minute over a specific range. Is the older 2g chip too noisy for this?

  7. Hello. I tried EVERY sketch and AVR GCC code I could find to get my nunchuk to work, but no luck. It is $5 unit from Dealextreme, so I guess I received dead one or something. All I could get was all zeros, repeating random data (non – related to nunchuk position/movement), or most of the time I got stuck at init(). Delays, decoding, init procedures magic, supply voltages, pullups, nothing worked. I could give it another shot and get some different cheap ripoff, cos this drives me crazy :). Last thing to try is to connect directly to i2c of accelerometer chip inside… Good luck everyone

  8. Hello,
    I have the same problem as some other persons told about on this page.
    I always only receive 255 values. Even watching directly the buffer after decoding: nunchuck_buf[cnt] = nunchuk_decode_byte(Wire.receive());
    I have only 255.

    Is there an issue for this problem? Is it a problem of type of the buffer?
    Thank you

Leave a Reply

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