Instructables

Wii Nunchuck as general purpose controller via Arduino board

Featured
Picture of Wii Nunchuck as general purpose controller via Arduino board

Background:

I made a self-balancing electric skateboard which is steered using a Wii Nunchuck by either using the thumb joystick on the top or by tilting it left or right, depending on which of the two buttons on the end are being pressed.

A simplified self balancing board is described in the instructable here:
www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/

However people are asking me how the Nunchuck steering control used on one of my earlier boards can be used.
The wired Nunchuck can be seen in use as a steering control in the second half of this video:
www.youtube.com/watch

It can also be seen in use controlling a set of LED's attached to the Arduino ouputs here:
www.youtube.com/watch

I have another instructable on interfacing a wireless Nunchuck to an Arduino but that is quite tricky and only works with a few specific wireless nunchucks. If starting out I strongly suggest going for the wired standard Nunchuck to begin with as described here.


Purpose:

The purpose of this instructable is to describe how to interface a completely standard Wii Nunchuck (i.e. with a cable) with an Arduino board. The Nunchuck is low cost but powerful with a fully proportional thumb joystick, 2 buttons on the end and a 3 axis accelerometer (position sensor). It is ideal for controlling things with.

The Arduino has been set up to output variable voltages between 0 and 5V which can be used as, for example, steering control inputs for another project such as a robot. You can use the (proper propotional) thumb joystick or the embedded accelerometers (tilt the chuck left right forward or back).

By modifying the code you can easily make it do other things.

I am using an Arduino with a 328 processor (i.e. a recent one) and version 17 of the Arduino software.
The Arduino sketch is attached below.


This is all derived from code developed by Chad Phillips and others, see:  http://windmeadow.com/node/42
For more info on wiring up the chuck to the Arduino, download Bionic Arduino Class 4 tutorial which is excellent from TodBot blog:
   http://todbot.com/blog/2007/11/24/bionic-arduino-class-notes-3-4/

There is plenty more on this on the net, there is even someone with a Nunchuck controlled electric canoe here:
www.youtube.com/watch

I am just presenting this all together in one place as a way to get started with something that should work OK.

 
Remove these adsRemove these ads by Signing Up
This is nearly a year old, but only now relevant to me.

Do you have code that you could share that would support the use of the nunchuk when connected in the manner you describe?

Brand new to arduino, but not to electronics.

This is a great instructable. Exactly the kind of hardware hacking that I crave.
My mistake...just saw the link.
geekflytk4 years ago
Funny english... I am gonna use this method to build my Segway Clone utilizing his other tutorial.
scouris4 years ago
I love the 'engrish' on the packaging. While not in the same flair as hacking your own connection from the extension cable, you can actually buy wii adaptors that connect to the nunchuck, for very little. Here is a link to an Australian supplier - http://www.littlebirdelectronics.com/products/WiiChuck-Adapter.html but I'm sure that they are available elsewhere.
Simpson_jr4 years ago
Hi,
A very interesting project, especially since I need a low cost solution ;-)

Unfortunately I still play all my games on a ZX81 (well, sort of), hit my head with a real nunchuck once and I have no experience with a WII nunchuck.

In my project I'll need to measure parallelism and temperature changes in a solder-wave oven. When a PCB is tilted too much components on one side of the board won't get soldered properly.

Professional equipment is too costly for my cheapskate boss, but since I rather develop equipment as place leds all day I offered to look into a self built device.

So, I'll use the electronics of the nunchuck as a digital spirit level. One thing I'd like to now, what resolution in angle measurement (x and/or Y) does an intact nunchuck have ?
As far as I understand now I might be able to use the analog output of the accelerometer chip. By using an opamp-circuit i could get a high resolution at a small angle (PCBs never enter the oven at a big angle). But like my boss I'm a cheapskate as well and when reading the I2C-port would already give me enough resolution I'd be very happy.

I might even get promoted to placing transistors all day, I'm really looking forward to that, so any help will be greatly appreciated  ;-)

Best wishes,
Bart