Wireless Wii Nunchuck Controlled Arduino

101,992

145

10

Introduction: Wireless Wii Nunchuck Controlled Arduino

Use a completely unmodified wireless Wii Nunchuck as a control system for any Arduino based project. No added radio transmitter/receiver pairs etc.

This instructable does assume some experience with the Arduino microcontroller.

The radio receiver that comes with the wireless 'chuck is connected to an Arduino which then reads data from the 'chuck.

There are descriptions on the net of how to use an Arduino to "read" data from a standard wired Nunchuck. This is a handheld device which is meant to connect via a short cable to a socket in the base of a Wii controller (the rectangular thing), which then sends data via Bluetooth to the Wii (or indeed a PC).

A special adapter has been made by with six contacts on it to enable the experimenter to connect the plug on the end of a Nunchuck to the pins of an Arduino board.

Here is an example of one of these:


I am going to decribe a more robust connection however.

The software required to "read" a standard chuck (i.e. with a cable) will not work on a wireless chuck. The software for wired 'chucks can be found in several places on the net. The wireless 'chucks are not made by Nintendo and there are several makes out there - all from China.

The wireless chuck has a 3 axis accelerometer, 2 buttons and a proper proportional thumb operated joystick. The price is very low so this could be a great way to create a short range wireless control system for all sorts of Arduino based devices. This is why I am posting this instructable.

Here are two types of wireless chuck that I know will work with this hack. I haven't tried any others yet.

Step 1: What the Wires Mean

It is easy to use a Nunchuck adapter to connect a wired or wireless chuck to an Arduino. However for a more stable connection I suggest:

Buy a Wii Nunchuck extender cable. This has a Nunchuck socket on one end and a plug on the other. Cut the cable so you now have the socket on one end and some free wires on the other which you can solder to your Arduino.

Step 2: How to Connect These Wires to Board

Once this socket is soldered to Arduino, you just plug radio receiver of wireless Nunchuck into it and off you go.

Only 4 of the 6 contacts in the plug/socket are required, these are:

+V   Power (Chuck designed for 3.3V but seems to work well with a 5V supply from Arduino board)
GND (Ground)
SDA   (connect to Analog pin 4 on Arduino)
SCK   (connect to Analog Pin 5 on Arduino)

Check and recheck your wires and label them. Here is a view looking into the female socket (on the end of your extension cable that you have just cut in half) you will insert the male plug sticking out of the wireless nunchuck radio receiver unit into:

NOTE: I have updated this figure 25/6/10 as previous diagram was wrong! very very easy to make a mistake here.

Step 3: Wii Chuck Extension Cable

Here is a photo of the Wii Nunchuck extension cable I cut to make the socket-on-end of a lead:

Step 4: Wire Colours

If you buy the exact same make of extension lead I have shown in previous photo, and you cut it and bare the wire ends, these are the colours of the wires and the tabs on the arduino that you connect them to.

If you cut the socket from a different make of extension lead the colours may be different. In that case check and double check the wires against the diagram 2 pages previously using a meter set to measure resistance (one lead touches copper tag inside the socket and with the other lead check all the bared wire ends until resistance is zero Ohms....then you know which tag in the socket is which wire end).

Step 5: Connect Wires to Board

Some versions of the software will convert analog pins 2 and 3 into +5V and GND so you can line up the 4 pins, SCK, SDA, 5V and GND in a row.

I chose to solder +V and GND to the +5V and GND pins on the Arduino permanently.

SCK then goes to Analog pin 5 and SDA goes to Analog pin 4.


Also, and this has only been discovered recently by trial and error, to get this to work using this "cut Nunchuck extender cable" as the means of connection to the wireless chuck receiver - you have to solder in two external pull-up resistors - about 1800 Ohms each seems about right.

One goes between SCK(analog pin 5) and +5V and the other goes between SDA(analog pin 4) and +5V.

Apparently these aren't required if you keep the receiver right next to the Arduino (i.e. by using an Arduino adapter of the TodBot type).

Step 6: Wiring to Arduino 2

Here is an image of the wiring of my own Arduino. Here I am using the wireless chuck to steer my self-balancing skateboard (i.e. a form of self-balancing robot).

Step 7: The Software

My software has been modified from the general purpose wireless chuck reader software developed by others. It is based on code by Chad Phillips, Mike Dreher, Björn Giesler and more tidying work recently by Mike Dreher (see forum link below).

APRIL 2011: I have now added my version as a text file to this instructable page.

This topic has been on an Arduino forum and the problem has recently been solved.

There are two versions of the software, both of which I have managed to get working:

This Arduino forum page contains both versions of the code:
http://www.arduino.cc/cgi-bin/yabb2/Y...

I can confirm this works on the latest Arduino boards with the ATmega328 processor, using Arduino17 to compile and load it.

Also see this wireless chuck controlled R2D2 robot(!):
http://www.youtube.com/watch?v=PvAdX5...

More on my self balancing skateboards here:
http://sites.google.com/site/onewheel...

https://www.instructables.com/id/Self_balancing_one_wheeled_electric_skateboard/


Here is a video showing the wireless chuck controlling the steering of my 2 wheeled self balancing skateboard.

Clearly this hack could be used to control all sorts of robots, cars, servo operated devices, robot arms, airborne mouse  etc. and is a very cheap to do. You can use the joystick or just tilt the chuck in the direction you want your device to move.

Have fun................

http://www.youtube.com/watch?v=9WO714j46LI

Be the First to Share

    Recommendations

    • Game Design: Student Design Challenge

      Game Design: Student Design Challenge
    • Make It Bridge

      Make It Bridge
    • Big and Small Contest

      Big and Small Contest

    10 Comments

    0
    KushagraK7
    KushagraK7

    Tip 2 years ago

    I have taken apart a clone of a Wii Nunchuck and it has pull-up resistors on the I2C lines so there is no need to connect the two resistors on the Arduino board.

    0
    ecsaul23
    ecsaul23

    11 years ago on Step 7

    I am trying to load the code on my arduino uno but there are many errors. I am super new at this and I dont know how to fix them. Some of the errors are due to changes in the wording of the code. Is there a newer version on the code that works better on the Uno?

    0
    XenonJohn
    XenonJohn

    Reply 12 years ago on Introduction

    The one that works best is the Blue Ocean one (on right of the picture of the two wireless nunchucks).


    John

    0
    teche
    teche

    12 years ago on Introduction

    you know you can just buy a wii nunchuk on http://www.dealextreme.com/details.dx/sku.24529 for $6-7 : )

    0
    Mdob
    Mdob

    13 years ago on Introduction

    Shouldn't the wireless chuck work identically to the wired one under the assumption that the wiimote would have to get the same information in the same format as the wired chuck.  If what you say is true then the wireless chuck shouldn't work with the wiimote either?

    0
    XenonJohn
    XenonJohn

    Reply 12 years ago on Introduction

    Logic would suggest what you say is true.

    However, and I don't know why, the Arduino code to read the wired chuck and the wireless ones is completely different. Furthermore this only seems to work with a few specific wireless Nunchucks. The wired chuck-arduino hack is much easier to get working than the wireless one - hence all the discussion on the forums before the wireless hack  was worked out.

    0
    Gonras
    Gonras

    Reply 13 years ago on Introduction

    That's an exelent question!!
    I would like to know that too.
    Would be great to get a reply for that :-)

    0
    monkeytoes
    monkeytoes

    13 years ago on Introduction

    The  Wiichuck  is a good solution for attaching the Wii nunchuck to the the arduino.  Check it out.