Page 1 of 1

Problem with WMP and NK

Posted: Thu Mar 24, 2011 9:44 am
by tmator
Hi,

i'm trying since one week to connect my nunchuck on my wmp and the gui says always NK not connected.

I try to reconnect all but nothing more. I use official WMP and NK + Arduino uno board.

Any idea ?

Regards,

Re: Problem with WMP and NK

Posted: Wed Mar 30, 2011 1:16 am
by johnint
Hey all,

I am just starting out with building my quad, and I am having this issue too. The nunchuk is connected, but neither the Arduino Uno nor the GUI seems to detect the Nunchuk. I am using version 1.7pre.

Any help would be appreciated :)

Re: Problem with WMP and NK

Posted: Sat Apr 23, 2011 6:47 pm
by johnint
Just an update --I replaced the NK with an original and it flies great now in stable mode.

Re: Problem with WMP and NK

Posted: Wed May 04, 2011 8:53 am
by manu
Hello,
I began to construct my first wii copter and I get the same problem as above.
I use an Arduino pro mini + original WMP + orginal nunchuck (I tested with two differents one) and the 1.7 code version

the WMP seems to work fine but the NK is not recognized. (even if i try to read/calibrate/write in the GUI)

when using I2C bus scanner (http://todbot.com/blog/2009/11/29/i2csc ... s-scanner/),
it found 2 addr (82 & 83). does it should only see one addr ?

I'm wondering if I have to do something with the code/GUI to set the WMP in passthroug mode ?
Any help will be appreciated !!

thanks

Re: Problem with WMP and NK

Posted: Wed May 04, 2011 7:54 pm
by Alexinparis
You may try to increase the interleaving delay.
Or maybe your connection is wrong somewhere: did you thing about the little VCC jumper on the WMP in the passthroug mode ?

Re: Problem with WMP and NK

Posted: Thu May 05, 2011 8:54 am
by manu
hello,
which jumper do you mean ?
Is the wire on the photo http://radio-commande.com/wp-content/up ... iring1.jpg labeled "must be connected to VCC" ?

I also tried to increase all delay values in the function i2c_WMP_init() by multiplying them by 10 without no succes.

Do you think It's possible to access WMP and NK separatly instead of using the passthroug mode ot the WMP?

Re: Problem with WMP and NK

Posted: Sat May 07, 2011 2:50 pm
by manu
Hello,
I received today a new wmp thinking that it can solve my problem.
After wiring everything, same problem.the wmp work well, but the nk is not recognized.
Did I forget to do enable something ? a jumper to set on the wmp ?

here is a photo of my wire, maybe someone will found what wrong ...
DSC_0006.JPG


thanks

Re: Problem with WMP and NK

Posted: Sat May 07, 2011 3:58 pm
by Rurek
...

Re: Problem with WMP and NK

Posted: Sat May 07, 2011 4:01 pm
by Rurek
I think, maybe you have a wrong wiring of NK...In many NKs pinouts are:
1 Vcc
2 not connected
3 SCL
4 SDA
5 GND

(or maybe reversed, try to find GND in addition to whole board) - it should be in this case :1GND, 2SDA, 3SCL, 4 n/c, 5Vcc

Re: Problem with WMP and NK

Posted: Sat May 07, 2011 4:43 pm
by manu
Hello,
If I refer to this schema :
http://radio-commande.com/wp-content/uploads/2010/06/WMP_NK_wiring1.jpg

I was doing exactly the same ? or I miss something ?

Re: Problem with WMP and NK

Posted: Sat May 07, 2011 4:50 pm
by Rurek
I never owned the original NK ;-) so I can't too much help by looking at the photo ... you should take a multimeter and check where is GND and Vcc ...

Re: Problem with WMP and NK

Posted: Sat May 07, 2011 10:13 pm
by manu
I got the NK working alone when I power it with 3.3v. the original NK sems to freeze using 5v.... (sic)
Well, I'm wondering if I have to power both wmp+nk with something like this http://www.sparkfun.com/products/526 ?

Re: Problem with WMP and NK

Posted: Sun May 08, 2011 12:16 am
by Rurek
Maybe you should try to use new procedure to connect NK...as a standalone sensor (not pigtailed thru WMP) and with #define NUINCHUCK in the sketch...but now I have one question...Did you tried a 100kHz I2C bus speed? Because original Wii sensors works only on 100kHz...

Re: Problem with WMP and NK

Posted: Mon May 09, 2011 9:57 pm
by manu
Hello,
I got my wmp+nk WORKING :) , powered in 5V
For the moment, I am using a modifed version of this code: http://www.windmeadow.com/node/42#comment-28
and I'am not able to get it working with the multiwii 1.7 code as it does not use the wire library.
the problem seems to be on the WMP initialization ( in the i2c_WMP_init() function )

the working initialization (for my wmp+nk) seems to loop until it initialize the wmp like this :

Code: Select all

#define TWI_FREQ_NUNCHUCK 100000L
TWBR = ((CPU_FREQ / TWI_FREQ_NUNCHUCK) - 16) / 2;

 unsigned long time = millis();
  do
  {
    Wire.beginTransmission (WII_NUNCHUCK_TWI_ADR); // transmit to device 0x52
    Wire.send (0xF0); // sends memory address
    Wire.send (0x55); // sends data.
    if(Wire.endTransmission() == 0) // stop transmitting
    {
      Wire.beginTransmission (WII_NUNCHUCK_TWI_ADR); // transmit to device 0x52
     Wire.send (0xFE); // sends memory address
      Wire.send (0x05); // sends sent a zero.
      if(Wire.endTransmission () == 0) // stop transmitting
      {
        rc = 0;
      }
    }
    Serial.println(i++);
  }
  while (rc != 0 && (!timeout || ((millis() - time) < timeout)));


I have to do 7 loop until the wmp+nk are initialized. Does someone have any clues to help me working on the multiwii code ?

ps: in the code, I have defined this:

#define I2C_SPEED 100000L //100kHz normal mode, this value must be used for a genuine WMP
#define INTERLEAVING_DELAY 5000

thanks !

Re: Problem with WMP and NK

Posted: Tue May 10, 2011 9:04 pm
by manu
Ok,
I can make working the WMP or the NK ( even it's connected to the WMP extention )
but not both at the same time :(

Even if I initialize the wMP in passtru mode and it returns the correct identification code : 0000 A420 0505
(which mean from wiibrew: "Activated Wii Motion Plus in Nunchuck passthrought mode"), I receive only WMP value and nothing from the NK.

when I initialize the NK (using the "new way") from the same circuit, I only get NK value (which it's should be normal...) .It validates my circuit is correct.

As I feel unlucky with the NK (I got 3 original now), I should probably invest in a BMA020 OR BMA180 accelerometer....

Re: Problem with WMP and NK

Posted: Sun May 15, 2011 12:57 pm
by manu
Hi there !
Finally, I got it working properly without any code modification. :)
I remarked that the NK was low powered when the WMP is set in passtrough mode. I just added two pull-up resistors on the NK
and it does the trick.

Re: Problem with WMP and NK

Posted: Tue May 24, 2011 8:40 am
by esmith289
manu wrote:Hi there !
Finally, I got it working properly without any code modification. :)
I remarked that the NK was low powered when the WMP is set in passtrough mode. I just added two pull-up resistors on the NK
and it does the trick.

Hi Manu,

I'm having the same trouble getting the WMP+NK working together. Where on the NK did you add the pull-ups?

Re: Problem with WMP and NK

Posted: Fri May 27, 2011 12:59 am
by nicepix4u
i got the same problem for some reason it works on one board Ver. 3.0 and on the other it does not work, maybe you can tell us where to put the pull up resistors ?

thanks in advance :-)

Re: Problem with WMP and NK

Posted: Fri May 27, 2011 8:17 am
by manu
On th NK board, I added one resistor from the VCC to the SCL line and one resistor from the VCC to the SDA line.
I used 2K2 resistors ( in this page http://www.robot-electronics.co.uk/acatalog/I2C_Tutorial.html, they recommand 1K8 to 47k. )

To locate VCC, SCL, SDA, GRN, you can use this diagram http://radio-commande.com/wp-content/uploads/2010/06/WMP_NK_wiring1.jpg

you can check that you have 5v between the VCC and the GRN.

note: If you already have 5v between GRN and SDA and between GRN and SCL, you do not need to use pullup resistor, it's another error....

Re: Problem with WMP and NK

Posted: Sat Jun 25, 2011 8:15 pm
by Plugin
manu wrote:On th NK board, I added one resistor from the VCC to the SCL line and one resistor from the VCC to the SDA line.
I used 2K2 resistors ( in this page http://www.robot-electronics.co.uk/acatalog/I2C_Tutorial.html, they recommand 1K8 to 47k. )

To locate VCC, SCL, SDA, GRN, you can use this diagram http://radio-commande.com/wp-content/uploads/2010/06/WMP_NK_wiring1.jpg

you can check that you have 5v between the VCC and the GRN.

note: If you already have 5v between GRN and SDA and between GRN and SCL, you do not need to use pullup resistor, it's another error....


Hi all. I have the same problem, my nunchuck is not always detected, and when it does, the values dont change in the gui.

Manu, i have 4.40 volts between GRN and SDA. Do i have to put pullup resistors? If yes, the pullup resistor have to be connected to the VCC on the arduino or other (bec) or to the VCC in the nunchuck ( that have 4.40 volts, not 5)

Thanks in advance,

Re: Problem with WMP and NK

Posted: Fri Jul 01, 2011 9:29 am
by caotri
Hi, I amusing cline WMP with ITG 3205 on it and Clone NK also.

I make the config and have to uncomment the //NUNCHAK option so the config program see the accelerate ( but it say ACC, not numchuk).
If I comment the NUNCHAK , the software do not see accelerate at all.

I am using ver 1.7

Please let me know if i did something wrong.

Re: Problem with WMP and NK

Posted: Thu Jul 07, 2011 11:11 am
by al tom
Hello folks,
I need help!!
I use a WMP with a IDG650 / IZG650 IC's , the Arduino is a MINIPRO328 and the software is V1_7.
I use a original Wii connetor, soldered to the Arduino board.
Nothing works.
Removing the WMP and install a Nunchuk to the Connector, changing to Nunchuk alone in the SW, I see "ACC"=green "Active"=green and any Nunchuk movement will get a result.
Resetting the software to original condition, connecting the WMP to the board and plugin the Nunchuk in to the plug of the WMP, nothing will happen.
May be somebody has a solution.

Thanks in advance
Altfrid

Re: Problem with WMP and NK

Posted: Thu Jul 07, 2011 11:20 pm
by Alexinparis
I use a original Wii connetor, soldered to the Arduino board.
Nothing works.

=> something is wrong here.
you should solve this problem first before going with nunchuk

Re: Problem with WMP and NK

Posted: Fri Jul 08, 2011 8:07 pm
by ripcurl0-0
check cycle time should be 6000 for both connected, if not may have to change interleave from 3000 to 4000

Re: Problem with WMP and NK

Posted: Sat Jul 09, 2011 1:18 pm
by al tom
Thanks folks,
problem is solved.
I received yesterday two new WM+'s. Original NINTENDO Wii Motion Plus devices. 8.90Euro per piece inclusive TAX, custom and delivery.
The PCB is equipt with an IC ITG3205 and they work.
The two others with the IC's IDG650 and ISZ650 doesn't work at all.
I will check these devices with a Wii-console.

I tried changing >INTERNAL_I2C_PULLUPS<, >INTERLEAVING_DELAY 3000< up to 4000 and 6000 but nothing work's out.

For the next time I have to look for "RVL-026" NINTENDO Wii Motion Plus, the ORIGINAL replacemet number, before ordering a clone.
Saving a lot of time.

Altfrid

Re: Problem with WMP and NK

Posted: Sat Jul 09, 2011 10:08 pm
by felipealex
manu wrote:Hi there !
Finally, I got it working properly without any code modification. :)
I remarked that the NK was low powered when the WMP is set in passtrough mode. I just added two pull-up resistors on the NK
and it does the trick.



Hello manu!

I'm having the same trouble too. WM+ works normally, but when I put NK, I have not signal.
I solved this trouble only when I read the analog signal from ADXL335B (http://www.analog.com/static/imported-f ... DXL335.pdf), changing the code "#define ADCACC".
If you have other informations about the WM+ and NK and I2C, please, send to us.
Thanks
Felipe from Brazil

Re: Problem with WMP and NK

Posted: Sun Jul 17, 2011 9:16 am
by al tom
Hello folks,
1. The clone WM+ with the IC's IDG650/ISZ650 is working on a Wii.
2. Not working with the MultiWiiV1_7

Setup: Clone WM+ only; MINIPRO328 board
I did some scope measurement on the clone WM+ (IDG650/ISZ650).
Refer to the NXP spec "UM10204" I receive a "Not Acknoweledge" (NACK) instead of an Acknowledge (ACK) (addr 0x52).

START condition
Addr = 1010010
R/W = 0
NACK condition

I modified the "I2C Wii Motion Plus" init a little bit to see some change.
I installed the library "Wire" to the "MultWiiV1_7" SW ("#include <Wire.h>")
From Line 887 to 889 I changed to "Wire" command.

Wire.beginTransmission(0xA6);
Wire.send(0xF0);
Wire.send(0x55);
Wire.endTransmission();

I received with these setup an ACK. But I don't see any response from WM+ movement.
Changing also the line 891 - 893 to "Wire" command will result again in NACK.
Any idea?
Altfrid

Re: Problem with WMP and NK

Posted: Sun Jul 24, 2011 1:53 pm
by al tom
High folks,
the solution for the WM+ clone with IDG650 and ISZ650 IC's.
I found the solution in a german forum.
http://forum.xufo.net/bb/viewtopic.php?p=173063
The laurels are going to "QUAX".
He found that the I2C-STOP-condition for the clone is tooooooooo short.

If you have the same WM+ clone and the clone will not work with "MultiWiiV1_7" you have to change line 340 in the software.
Original line 340:

Code: Select all

TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN) | (1<<TWSTO); // send REAPEAT START condition
to
NEW:

Code: Select all

TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO); // send REAPEAT START condition
delayMicroseconds(50); pauses for 50 microseconds
TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN); // send REAPEAT START condition

It works.
I played a little bit with the delay time. Up to 21 microseconds and the clone does not work. A value of 22 microseconds and the clone works.
Thanks to "QUAX".

Altfrid

Re: Problem with WMP and NK -->ADXL335

Posted: Mon Jul 25, 2011 12:14 am
by cob
For Felipe from Brazil and anyone using an ADXL335 on analog inputs: I use a WMP clone (with a IDG650 / IZG650 IC's) and an ADXL335B on analog inputs.
You may have a look at this post : viewtopic.php?f=6&t=521
Regards