Page 1 of 4 1234 LastLast
Results 1 to 10 of 33

Thread: Being defeated by a Wii Nunchuk

  1. #1
    Join Date
    Feb 2012
    Location
    Sydney, Australia
    Posts
    364
    Rep Power
    33

    Being defeated by a Wii Nunchuk

    Hello all, long time no see (and nice to see a few familiar faces around here!).

    After a long break (thank you PhD...) I'm slowly getting back into robotics, but my skills must have atrophied.

    For this problem I bought a Wii Nunchuk a few weeks back and am trying to get it working an an Arduino Uno. I've hooked up the nunchuk to the Wii adapter board, connected +5V, GND, SDA and SCL. The demo code compiles and has been uploaded to the Uno, but when I power everything up (power LED on the adapter board is lit, too) and look at the serial monitor nothing makes sense. An example of the output is as follows:

    Code:
    18 13569 3 -12266 777 1 0
    -25082 -11000 2051 230 513 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    6 256 131 -29694 1 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 0 -32761 2 141 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    -25082 -11000 1027 2 6181 1 0
    Moving the joystick, the controller or pressing the buttons does nothing. As you can see, the majority of the values are identical and look to be impossible. Reading the 5V output from the Arduino gives me 5V, however the voltage regulator on the adapter board is getting mighty toasty, and measuring between the 3.3V pin and ground gives me only 1.66V.

    So... have I just got a dud board, or am I missing something very basic?

  2. #2
    Join Date
    Jul 2012
    Location
    Richmond, IN
    Posts
    652
    Rep Power
    38

    Re: Being defeated by a Wii Nunchuk

    When I have used the Nunchuk with arduino in the past, I just used jumper leads to directly connect it. It was even powered off the Arduino's regulators.

  3. #3
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,282
    Images
    27
    Rep Power
    275

    Re: Being defeated by a Wii Nunchuk

    Is the nunchuck's connector plugged in the right way around? Does the regulator still heat up and produce the wrong voltage when the nunchuck is not connected to the breakout board?

    edit: I have one of the older breakouts with just the really nice connector and no regulator or level shifting, and, as Ardutank said, it works fine with a direct connection to the ruggeduino. The nunchuck I have appears to be somewhat 5V-tolerant on the SDA/SCL pins since it does not die from the 5V I2C outputs.
    Last edited by tician; 02-26-2016 at 08:30 AM.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  4. #4

    Re: Being defeated by a Wii Nunchuk

    It has been several years since I tried one of these. Like Ardutank, I wired mine in directly, by removing the connector...

    Which board? Which test program? Pullup Resistors?

    Welcome back

  5. #5
    Join Date
    Feb 2012
    Location
    Sydney, Australia
    Posts
    364
    Rep Power
    33

    Re: Being defeated by a Wii Nunchuk

    Cheers for the responses. Answers are:

    Quote Originally Posted by tician View Post
    Is the nunchuck's connector plugged in the right way around? Does the regulator still heat up and produce the wrong voltage when the nunchuck is not connected to the breakout board?

    edit: I have one of the older breakouts with just the really nice connector and no regulator or level shifting, and, as Ardutank said, it works fine with a direct connection to the ruggeduino. The nunchuck I have appears to be somewhat 5V-tolerant on the SDA/SCL pins since it does not die from the 5V I2C outputs.
    Have just double checked the connection, the 3 pin side of the nunchuk connector is connected to the 3 pin side of the board, 2 pin to 2 board.

    When the nunchuk isn't connected the regulator stays about room temp, and puts out exactly 3.3V. LED is much brighter, too. Further data: this happens regardless of whether I'm using USB for power or a benchtop power supply. If the latter, when the nunchuk isn't plugged in then I'm drawing 0.07A @ 10.2V, when I plug it in then it jumps to 0.28A @ 10.2V. Yikes.

    Quote Originally Posted by KurtEck View Post
    It has been several years since I tried one of these. Like Ardutank, I wired mine in directly, by removing the connector...

    Which board? Which test program? Pullup Resistors?

    Welcome back
    Boards are a standard Arduino Uno, the adapter board is the RobotGeek Wii Adapter v2.1. No external pull-up resistors, my understanding was that those were built in (looking at the RoboTurret assembly instructions for adding a nunchuk, I also don't see anything on the Grove base shield that sits between the adapter and the Arduino.

    Will try a direct connection from the nunchuk to the Arduino once I can scrounge up some header pins. Busy all day though, so if there're further thoughts between now and then I'd love to hear them.

  6. #6

    Re: Being defeated by a Wii Nunchuk

    I don't see any either. Don't see any schematics for the adapter board, but it does look like it might have some resistors on it...

    Looking at: http://dangerousprototypes.com/2009/...k-quick-guide/ it says the nunchuck has a very weak PU built in...

    Also looking at: http://www.robotshop.com/media/files...-datasheet.pdf

    If it were me, I would hook up my Saleae logic analyzer and see what signals I was getting, but...

    The Test program and library look pretty simple...

    Seeing it is an Arduino UNO, I doubt it would be an issue, but you might check I2c speed to see if this is an issue.

    I am now taking a quick look at the some code I was playing with them and see it is dated in 2012...
    I see my Init code is different:
    Mine (removed ifdef stuff for old IDE:
    Code:
    //===============================================================================
    // Hardware I2C version
    //===============================================================================
    void nunchuckh::Init(void) 
    {
      Wire.begin();                // join i2c bus as master
      Wire.beginTransmission(0x52);// transmit to device 0x52
     Wire.write((byte)0x40);// sends memory address
      Wire.write((byte)0x00);// sends sent a zero.  
      Wire.endTransmission();// stop transmitting
    }
    Looking at the library from Trossen.
    Code:
    void ArduinoNunchuk::init()
    {      
      Wire.begin();
      
      ArduinoNunchuk::_sendByte(0x55, 0xF0);
      ArduinoNunchuk::_sendByte(0x00, 0xFB); 
      
      ArduinoNunchuk::update();
    }
    
    void ArduinoNunchuk::_sendByte(byte data, byte location)
    {  
      Wire.beginTransmission(ADDRESS);
      
        Wire.write(location);
        Wire.write(data);  
      Wire.endTransmission();
      
      delay(10);
    }
    Again it has been a long time, but my 40, 0 appears to match what is in the Robotshop document...

  7. #7
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,282
    Images
    27
    Rep Power
    275

    Re: Being defeated by a Wii Nunchuk

    210mA seems like way too much for something like the nunchuck. It is a low power MEMS linear acceleration sensor, a small 3.3V microcontroller, two pots, and two buttons. Wonder if the nunchuck was exposed to 5V and something burned out, or maybe an internal connector got plugged in backwards. They are easy to disassemble and reassemble.

    edit: for some reason I thought it was an angular rate sensor, but is actually accelerometer.
    Last edited by tician; 02-28-2016 at 04:47 PM. Reason: doh
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  8. #8
    Join Date
    Feb 2012
    Location
    Sydney, Australia
    Posts
    364
    Rep Power
    33

    Re: Being defeated by a Wii Nunchuk

    Visual inspection of the nunchuk's electronics yielded nothing, nothing looked burnt. I2C speed looks fine, if there's an issue there I don't see it.

    Googling the part number for the regulator on the board shows that it's the 3.3V version of this one, pinout tallies up with what the reg's connected to on the board.

    I'm leaning towards a hardware failure, the connected vs non-connected power draw is definitely not right and I can't see software causing that. The voltage difference when I connect/disconnect the nunchuk made me think of a short in the nunchuk itself, but multimeter testing isn't showing me a short on any combination of the pins. Will see if I can get a friend who has a Wii to test the nunchuk, I guess that'll definitively say whether or not it's the problem. Might still try directly connecting the nunchuk to the Arduino, but I'm now kinda wary about that.

  9. #9
    Join Date
    Jul 2012
    Location
    Richmond, IN
    Posts
    652
    Rep Power
    38

    Re: Being defeated by a Wii Nunchuk

    Try powering the nunchuk directly off of a pair of AA batteries. At 1.8V when fresh, they'll provide the unit with 3.4V to work with. If the nunchuk draws that low, there's something weird going on.

  10. #10

    Re: Being defeated by a Wii Nunchuk

    I am not sure if it would help or not. But I vaguely remember that people were hooking their nunchuks up to 5vs and not killing them...

    I was also curious, if I still had my test setup, as I could not remember if I was using the Lyxmotion Botboarduino, or maybe using the Teensy 3.1 by then... I found it. Turns out I was using my own Adruino Mega shield, that at the time Lynxmotion (and maybe Trossen?) were considering a Mega board that similar in size to the Seeedstudio mega... Lynxmotion instead decided on a simpler board (Botboarduino which was Atmega328).

    Click image for larger version. 

Name:	L1020344.jpg 
Views:	117 
Size:	117.3 KB 
ID:	6463
    The connections on the top left in the picture were for the hardware I2C where on this board I had a 4 pin setup. I have my jumpers in place for the I2c PUs. The connections toward the bottomish rightish is to control a the second one using software I2C...

    Again not sure if that helps or not.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •