Wii Nunchuck Adapter

103,756

251

55

This tutorial is for all those people who have an arduino and want to use there Wii nunchuck as an input device, but dont realy feel like cutting open the cord and ruining the nunchuck FOREVER!!!!!!!!

well youve come to the right place!

Step 1: Supplies

These are the supplies you will need
most can be found at radioshack and at hardware stores.
if you cant find any etchant solution i made my own on STEP 6.
+ iron
+scisors
+tape
+soft gloss photo paper
+arduino
+wii nunchuck
+LED's
+brake cleaner
+etchant solution (is makeable, see step 6)
+double sided PCB .062" thick (you do have a bit of lee way)
+solder
+hack saw


Step 2: Printing Our Transfers

Thanks to icecreamterror who made a pdf version of the pcb heres a link
http://www.mediafire.com/view/?h81q6efr03sw326

For those of you who want to do it old school style...
start by downloading DipTrace
http://www.diptrace.com/download.php
and the Wii Nunchuck layout
http://www.megaupload.com/?d=0212FN11
1. install diptrace by following all the on screen instructions
2. Start Diptrace
3. go to file>open and locate "wii_nun_chuck_adapter.dip" (image 2)
4. click open
5. go to view> click mirror (so it is checked)
6. now it should look like image 3
7. Load a piece of photo soft gloss paper into your printer (image 4)
8. now go to file>print> and select your laser printer (image 5)
9. press PRINT.
10. now you should have a nice looking transfer.
WOOO HOOOO we are almost there. sorta

Step 3: Preping the Transfer

1) no that you have your printed sheet of PCB transfer. pick one and cut it out like i have in image 1.
2) Now what we want to do is fold the paper so the two sides line up. you can use a light to help you look through the paper.
3) once its lined up make a nice clean crease. (image 2)
4) now we use some tape to make sort of a tube that the PCB will slide into. (image 3)
5) the transfer is ready
next step is to cut and prep the board.

Step 4: Cutting and Preping the PCB

for this step i dont have very many pictures but its pretty much straight forrow
1) Remove your new board you just bought at radioshack from its bag
2) I recomend cutting out one of the transfers and using it as a template to get the dimensions right
3) place the transfer on the corner of the board and with a knife score around it
4) Then i placed the board in my vice and used a hack saw to cut it
or if you can get your hands on a band saw that would be much easier
5) once the board is cut out. (image 1) take a peice of 800 grit sand paper and sand down the edges
6) finaly clean of the board with some rubbing alcohal or water making sure to dry it good if used water
next we will transfer the design onto the board

Step 5: Transfering the Design

So we have our tube like transfer and out cut to size board.
1) take your board and slowly slide it into the transfer
2) next use some object (i used a paper clip) to try to adjust the board so it lines up with the design
3) now place the transfer and board on some surface. i put a paper bag down so it wouldnt mess up my desk.
4) now what ever iron you are using turn it up to the HIGH POSSIBLE SETTING (image 4)
5) once the iron is warmed up take it and press down on the board with about 20lbs of force for 20 seconds. (image 5)
6) turn it over and press for another 20 seconds.
7) turn it over again and let it cool for 1 minute or so and press for another 10 seconds.
8) turn it over again and press for another 10 seconds.
9) let it sit for 2 minutes.
10) now you can cut the tape and peel off the paper. hopefully the toner adheared to the baord. (image 6)
11) now go to your sink and using a paper towel and scrub off the white paper until you can see your crispy black lines.
12) if not use the brake cleaner and clean off the PCB completely and start over :(

PS: if you are lost in any of these processes this is a good video showing you how to transfer your PCB design.
http://www.youtube.com/watch?v=urv6jArKp6M

now we are almost done. WOOO HOOO!!!!!!!

Step 6: Etching the PCB

now that we have our PCB transfered and ready for etching.... um lets etch it
MAKE YOUR OWN ETCHANT:
Supplies
+Muratic Acid (image 1)
+Hydrogen Peroxide (image 2)
+PLASTIC measureing spoon (CANT BE METAL CAUSE THE ACID WILL EAT IT!!!!!) (image 3)
+and a PLATIC bowl (SAME REASONS)
1) Measure out 2 quantities of hydrogen peroxide and pour it in your bowl.
2) Measure out 1 quantity of muratic acid.
  Ex. 2 tbls of hydrogen peroxide, and 1 tbls of muratic acid.
   Keep in mind the 3 A's from high school chemistry class
   Always
   Add
   Acid
always pour acid into water or what ever you mixing not water into acid!
 3) Now you have your own etchant solution.

ETCHING THE PCB:
1) Go ahead and pour some etchant into a tuper ware bowl (if you made it you should already have it a bowl)
2) Use a plastic fork to slowly lower the PCB into your etchant solution. being carful not to splash.
3) Let it sit in the solution until you canot see any more copper, ecationaly lifting the board with the plastic fork just to get it all even.
4) Once you think its done remove the board and rinse it off with water.
5) get the brake cleaner and spray some on the board and scrub with a paper towel untill all the toner is off. Checking to make sure that all your traces are good and not broken.
yess we are so close to finishing this thing i can almost taste it.

Step 7: Drilling Holes

DRILLING HOLES:
this step is pretty self explanatory but....
1) I would rather use a fine drill bit but those are hard to find so I went to the hardware store and bought a dremel bit set for 5 bucks. (image 1)
2) Pick out the bit you want making sure that its not too big or too small, and put it in your drill press. (image 2)
3) I put a piece of wood under my PCB (not actually the PCB cause I forgot to take pictures) so that it will be on a flat surface.
4) Drill all the way through the tabs where we will put our header pins. DRILL DRILL AWAY. (image 4)

Step 8: Soldering on the Header Pins

SOLDERING ON THE HEADER PINS:
+header pins
+soldering iron
+electronic solder (with flux perferd)
this is kinda a pain cause we dont have the privalage of through hole soldering, so we have to solder on both sides of the PCB.
1) place your header pin in the board
2) Solder in each pin on the side that says "TOP"
3) let cool
4) turn the board over and romove the black plastic it should just slide right off.
5) here comes the sort of hard part. solder the bottom of the pin and try to keep it relativly straight, or else it woulnt fit in the arduino. You must to this because we have a double sided pcb.
6) try inserting it into the arduino and if it doesnt fit heat up the solder and adjust the pins as needed.


Step 9: Testing the Adapter

If you dont have the Arduino program installed yet then go to www.arduino.cc/en/Guide/HomePage and follow the arduino getting started tutorial.
Part I
1) DOWNLOAD these 2 files
www.megaupload.com/
www.megaupload.com/
2) Create a new folder called "WiiChuckDemo" without the quotes.
3) Place those 2 files in the folder
4) Open up arduino IDE and goto file> open> and open "WiichuckDemo.pde"
5) Upload that sketch to your arduino
6) we are done with part 1

Part II
+various jumper wires
+4 leds
+the nunchuck adapter
+bread board or protoshield
+and a wii nunchuck
1) Plug in the adapter into analog pins 5,4,3, and 2 like image 1 shows.
2) Now were are going to put in all our ground jumpers, in a "daisy chain" style. (image 2)
3) Now put in all the wire going from the LED's positive legs to there coresponding pins on the arduino. (image 3)
UP led= digital pin 4
DOWN led= digital pin 5
LEFT led= digital pin 2
RIGHT led= digital pin 3
4) Now its time to place our leds into the bread board making sure that the short leg or the flat side on the led is in the ground, and the long leg is in the positive (or the wire going to the arduino digital pins) (image 4)
5) plug in you wii nunchuck
6) power up your arduino
7) and hopfully it will work if now leave a comment and i will try my best to help you.
8) heres a demo video





Arduino Contest

Runner Up in the
Arduino Contest

Share

    Recommendations

    • First Time Author

      First Time Author
    • PCB Contest

      PCB Contest
    • Holiday Decor

      Holiday Decor

    55 Discussions

    0
    None
    mykuls

    3 years ago on Step 9

    Can you provide new links for the demo files?

    0
    None
    jashock

    3 years ago on Step 9

    how do you get the files to do this at because the mega upload thing didn't work because it was shut down can you make a new file on a different website try mediafire

    0
    None

    Yes, I would assume that it would be fine. I would still use a scrap bowl though (certainly not your nice china)

    0
    None
    lug big lug

    6 years ago on Introduction

    Mega Upload has been shutdown dude, can you upload the files somewhere else, or email/pm them to me?

    0
    None
    jrast362

    6 years ago on Step 9

    i think that the whole idea behind this could be very useful but now that megaupload is down i cant get the two files. Is there any way i can get them?

    1 reply
    0
    None
    berqjrast362

    Reply 6 years ago on Introduction

    Yeah, ditto on the "Megaupload got shut down by the FBI so what now?" problem.  The Arduino forums allow up to four attachments (4 MB combined size) per Topic post, so that might be a solid option.  Plus you're far less likely to be consorting with federal criminals!

    0
    None
    redsunmtm

    6 years ago on Step 9

    hi,
    excuse me but i am really a newbee in arduino...
    i am trying to make this instructable, but when i want to load the sketch i have this error:
    -------------------------------------------------------------------------------------------------------------------
    In file included from WiiChuckDemo.cpp:2:
    /nunchuck_funcs.h:13:22: error: WProgram.h: No such file or directory
    In file included from WiiChuckDemo.cpp:2:
    /nunchuck_funcs.h: In function 'void nunchuck_setpowerpins()':
    nunchuck_funcs.h:24: error: 'delay' was not declared in this scope
    /nunchuck_funcs.h: In function 'void nunchuck_init()':
    nunchuck_funcs.h:33: error: 'class TwoWire' has no member named 'send'

    As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.

    nunchuck_funcs.h:34: error: 'class TwoWire' has no member named 'send'

    As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.

    /nunchuck_funcs.h: In function 'void nunchuck_send_request()':
    nunchuck_funcs.h:43: error: 'class TwoWire' has no member named 'send'

    As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.

    /nunchuck_funcs.h: In function 'int nunchuck_get_data()':
    nunchuck_funcs.h:63: error: 'class TwoWire' has no member named 'receive'

    As of Arduino 1.0, the Wire.receive() function was renamed to Wire.read() for consistency with other libraries.

    /nunchuck_funcs.h: In function 'void nunchuck_print_data()':
    nunchuck_funcs.h:114: error: 'Serial' was not declared in this scope

    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    i also tested various sketches from other instructables and i always have errors !
    with the included libraries i have no problem !!!
    what is it happening ?
    please help me !
    PS:
    i have the Arduino Mega Atmega1280 and use Arduino V1.0

    5 replies
    0
    None
    dany32412redsunmtm

    Reply 6 years ago on Step 9

    Sorry i didnt reply earlier. Yeah i hate that new arduino 1.0, there's too many changes. All my libaries from before don't work on it. I'm just using Arduino 22 until they male some changes. See if it works with that

    0
    None
    redsunmtmdany32412

    Reply 6 years ago on Step 9

    hello and happy new year
    thanks for answering that quick !
    so it is due to the V1 ?!?
    i was searching the Arduino 22, but i cant find it ! could you please send me that version by mail please?
    tha would be very friendly...
    regards

    0
    None
    redsunmtmredsunmtm

    Reply 6 years ago on Step 9

    it is ok i found at arduino's, i was searching in google arduino 22 and couldn't find nothing, but went to site and voila, thank you, i am going to get 0022 and 0023 to see, thanks again.

    0
    None
    dany32412redsunmtm

    Reply 6 years ago on Step 9

    Im glad you found everything. Version 22 and 23 should work, but i'm currently working on getting the library to work with Arduino V1. Hopefully ill post that soon

    0
    None
    redsunmtmdany32412

    Reply 6 years ago on Step 9

    hy,
    yes i found them, but nothing works, i mean, the sketches seem to install correctly, but nothing happens, only sometimes the led 13 keeping alive and my up and left led staying lighting with no change from nunchuck.
    the leds are new, the nunchuk too and even better i cutted the cable to connect directly on the board, so no false contact... but nothing...
    have tryed to send only the pde, then i try to send pde and h files and nothing... disapointed ! :(
    i think i'll wait you V1 version !
    thanks

    0
    None
    redsunmtm

    6 years ago on Step 9

    hy again,
    now i placed the folder in C:\Documents and Settings\mich\My documents\Arduino\
    i open the .ino i converted before, start loading and now:
    ----------------------------------------------------------------------------------------------------------------------
    In file included from WiiChuckDemo.cpp:2:
    /nunchuck_funcs.h:13:22: error: WProgram.h: No such file or directory
    In file included from WiiChuckDemo.cpp:2:
    /nunchuck_funcs.h: In function 'void nunchuck_setpowerpins()':
    nunchuck_funcs.h:24: error: 'delay' was not declared in this scope
    /nunchuck_funcs.h: In function 'void nunchuck_init()':
    nunchuck_funcs.h:33: error: 'class TwoWire' has no member named 'send'

    As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.

    nunchuck_funcs.h:34: error: 'class TwoWire' has no member named 'send'

    As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.

    /nunchuck_funcs.h: In function 'void nunchuck_send_request()':
    nunchuck_funcs.h:43: error: 'class TwoWire' has no member named 'send'

    As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.

    /nunchuck_funcs.h: In function 'int nunchuck_get_data()':
    nunchuck_funcs.h:63: error: 'class TwoWire' has no member named 'receive'

    As of Arduino 1.0, the Wire.receive() function was renamed to Wire.read() for consistency with other libraries.

    /nunchuck_funcs.h: In function 'void nunchuck_print_data()':
    nunchuck_funcs.h:114: error: 'Serial' was not declared in this scope
    In file included from WiiChuckDemo.cpp:105:
    /nunchuck_funcs.h: At global scope:
    nunchuck_funcs.h:14: error: redefinition of 'uint8_t nunchuck_buf [6]'
    nunchuck_funcs.h:14: error: 'uint8_t nunchuck_buf [6]' previously declared here
    /nunchuck_funcs.h: In function 'void nunchuck_setpowerpins()':
    nunchuck_funcs.h:17: error: redefinition of 'void nunchuck_setpowerpins()'
    nunchuck_funcs.h:17: error: 'void nunchuck_setpowerpins()' previously defined here
    /nunchuck_funcs.h: In function 'void nunchuck_init()':
    nunchuck_funcs.h:29: error: redefinition of 'void nunchuck_init()'
    nunchuck_funcs.h:29: error: 'void nunchuck_init()' previously defined here
    nunchuck_funcs.h:33: error: 'class TwoWire' has no member named 'send'

    As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.

    nunchuck_funcs.h:34: error: 'class TwoWire' has no member named 'send'

    As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.

    /nunchuck_funcs.h: In function 'void nunchuck_send_request()':
    nunchuck_funcs.h:40: error: redefinition of 'void nunchuck_send_request()'
    nunchuck_funcs.h:40: error: 'void nunchuck_send_request()' previously defined here
    nunchuck_funcs.h:43: error: 'class TwoWire' has no member named 'send'

    As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.

    /nunchuck_funcs.h: In function 'char nunchuk_decode_byte(char)':
    nunchuck_funcs.h:49: error: redefinition of 'char nunchuk_decode_byte(char)'
    nunchuck_funcs.h:49: error: 'char nunchuk_decode_byte(char)' previously defined here
    /nunchuck_funcs.h: In function 'int nunchuck_get_data()':
    nunchuck_funcs.h:57: error: redefinition of 'int nunchuck_get_data()'
    nunchuck_funcs.h:57: error: 'int nunchuck_get_data()' previously defined here
    nunchuck_funcs.h:63: error: 'class TwoWire' has no member named 'receive'

    As of Arduino 1.0, the Wire.receive() function was renamed to Wire.read() for consistency with other libraries.

    /nunchuck_funcs.h: In function 'void nunchuck_print_data()':
    nunchuck_funcs.h:79: error: redefinition of 'void nunchuck_print_data()'
    nunchuck_funcs.h:79: error: 'void nunchuck_print_data()' previously defined here
    /nunchuck_funcs.h: In function 'int nunchuck_zbutton()':
    nunchuck_funcs.h:141: error: redefinition of 'int nunchuck_zbutton()'
    nunchuck_funcs.h:141: error: 'int nunchuck_zbutton()' previously defined here
    /nunchuck_funcs.h: In function 'int nunchuck_cbutton()':
    nunchuck_funcs.h:147: error: redefinition of 'int nunchuck_cbutton()'
    nunchuck_funcs.h:147: error: 'int nunchuck_cbutton()' previously defined here
    /nunchuck_funcs.h: In function 'int nunchuck_joyx()':
    nunchuck_funcs.h:153: error: redefinition of 'int nunchuck_joyx()'
    nunchuck_funcs.h:153: error: 'int nunchuck_joyx()' previously defined here
    /nunchuck_funcs.h: In function 'int nunchuck_joyy()':
    nunchuck_funcs.h:159: error: redefinition of 'int nunchuck_joyy()'
    nunchuck_funcs.h:159: error: 'int nunchuck_joyy()' previously defined here
    /nunchuck_funcs.h: In function 'int nunchuck_accelx()':
    nunchuck_funcs.h:165: error: redefinition of 'int nunchuck_accelx()'
    nunchuck_funcs.h:165: error: 'int nunchuck_accelx()' previously defined here
    /nunchuck_funcs.h: In function 'int nunchuck_accely()':
    nunchuck_funcs.h:171: error: redefinition of 'int nunchuck_accely()'
    nunchuck_funcs.h:171: error: 'int nunchuck_accely()' previously defined here
    /nunchuck_funcs.h: In function 'int nunchuck_accelz()':
    nunchuck_funcs.h:177: error: redefinition of 'int nunchuck_accelz()'
    nunchuck_funcs.h:177: error: 'int nunchuck_accelz()' previously defined here
    WiiChuckDemo.cpp: At global scope:
    WiichuckDemo:3: error: redefinition of 'int loop_cnt'
    WiichuckDemo.pde:-1: error: 'int loop_cnt' previously defined here
    WiichuckDemo:5: error: redefinition of 'byte accx'
    WiichuckDemo.pde:-1: error: 'byte accx' previously declared here
    WiichuckDemo:5: error: redefinition of 'byte accy'
    WiichuckDemo.pde:-1: error: 'byte accy' previously declared here
    WiichuckDemo:5: error: redefinition of 'byte accz'
    WiichuckDemo.pde:-1: error: 'byte accz' previously declared here
    WiichuckDemo:5: error: redefinition of 'byte joyx'
    WiichuckDemo.pde:-1: error: 'byte joyx' previously declared here
    WiichuckDemo:5: error: redefinition of 'byte joyy'
    WiichuckDemo.pde:-1: error: 'byte joyy' previously declared here
    WiichuckDemo:5: error: redefinition of 'byte zbut'
    WiichuckDemo.pde:-1: error: 'byte zbut' previously declared here
    WiichuckDemo:5: error: redefinition of 'byte cbut'
    WiichuckDemo.pde:-1: error: 'byte cbut' previously declared here
    WiichuckDemo:6: error: redefinition of 'int ledPin'
    WiichuckDemo.pde:-1: error: 'int ledPin' previously defined here
    WiichuckDemo:7: error: redefinition of 'int Lledpin'
    WiichuckDemo.pde:-1: error: 'int Lledpin' previously defined here
    WiichuckDemo:8: error: redefinition of 'int Rledpin'
    WiichuckDemo.pde:-1: error: 'int Rledpin' previously defined here
    WiichuckDemo:9: error: redefinition of 'int Uledpin'
    WiichuckDemo.pde:-1: error: 'int Uledpin' previously defined here
    WiichuckDemo:10: error: redefinition of 'int Dledpin'
    WiichuckDemo.pde:-1: error: 'int Dledpin' previously defined here
    WiiChuckDemo.cpp: In function 'void setup()':
    WiichuckDemo:13: error: redefinition of 'void setup()'
    WiichuckDemo.pde:-1: error: 'void setup()' previously defined here
    WiiChuckDemo.cpp: In function 'void loop()':
    WiichuckDemo:22: error: redefinition of 'void loop()'
    WiichuckDemo.pde:-1: error: 'void loop()' previously defined here
    ----------------------------------------------------------------------------------------------------------------------
    another type of error... i don't understand...

    0
    None
    redsunmtm

    6 years ago on Step 9

    hello again,
    i placed the .pde and the .h files to: libraries\Servo\examples\WiiChuckDemo
    then i renamed .pde to .ino
    i restart loading and now here is the error:
    ----------------------------------------------------------------------------------------------------------------------
    sketch_jan01a.cpp:3:28: error: nunchuck_funcs.h: No such file or directory
    sketch_jan01a.cpp: In function 'void setup()':
    WiichuckDemo:16: error: 'nunchuck_setpowerpins' was not declared in this scope
    WiichuckDemo:17: error: 'nunchuck_init' was not declared in this scope
    sketch_jan01a.cpp: In function 'void loop()':
    WiichuckDemo:27: error: 'nunchuck_get_data' was not declared in this scope
    WiichuckDemo:29: error: 'nunchuck_accelx' was not declared in this scope
    WiichuckDemo:30: error: 'nunchuck_accely' was not declared in this scope
    WiichuckDemo:31: error: 'nunchuck_accelz' was not declared in this scope
    WiichuckDemo:32: error: 'nunchuck_joyx' was not declared in this scope
    WiichuckDemo:33: error: 'nunchuck_joyy' was not declared in this scope
    WiichuckDemo:34: error: 'nunchuck_zbutton' was not declared in this scope
    WiichuckDemo:35: error: 'nunchuck_cbutton' was not declared in this scope
    -------------------------------------------------------------------------------------------------------------------
    it looks like no finding the.h file ...
    what i am doing wrong ?
    please help !
    thank you in advance.

    0
    None
    jrh065

    7 years ago on Step 5

    Did you mean to put a video link up there ^?

    Also, good 'ible! Especially step 6.

    0
    None
    ModariusCinder Dragon

    Reply 7 years ago on Introduction

    It is so that one can use a Wii nunchuck with one's arduino without having to cut/ damage/ modify the original cable, which make the nunchuck useless for its intended purpose.

    0
    None
    wfelix

    7 years ago on Introduction

    maybe it is a dumb question... I tested, works fine(only with original nunchuck... a spare chinese one fails-works on wii)... I understand how its works :D


    understand joyy, joyx, accy and accx... but I can't understand accz... what kind of move change accz value? I shake the nunchuk, the value changes, but i cant understand exactly which move change this value

    thanks