Update: Well, I got a logic level converter, and it made no difference to the outputs. Seems the clones just weren’t any good. No matter, I’ve already got an ITG-3200 gyro and a BMA180 accelerometer waiting in the wings. Chalk that one up to experience.
On Friday, I got the Wii nunchuk and Wii Motion Plus that I picked up from eBay. Unfortunately, it turns out that they’re clones, and not original Nintendo parts. However, for the price I paid, I really can’t be surprised. Clones however can be … difficult. So, let’s get unpacking and assembling, and see how we go.
|WMP board (top), and Nunchuk (bottom)|
Unpacking the two boards, and then desoldering the connectors to get the raw PCBs didn’t take long and wasn’t very hard. But first, I matched up all the pins using a multimeter to verify that the pinout is how I expected it to be. The pinouts were fairly similar between the two boards, and fortunately the coloured wires used a sane colour scheme which I duplicated when I made the jumpers that go to the Arduino.
So, following this tutorial on the AeroQuad forums, I marched ahead. First, I discovered that I need desoldering braid - a solder sucker isn’t good enough for that kind of tiny work. Second, the tip on my iron is too big! I need a smaller tip, really. But I made do anyway.
In essence, the nunchuk is attached to the WMP board, then the WMP board is connected to the Arduino. First, I attached the nunchuk, as here;
|Connecting the WMP to the Nunchuk|
The grey wire is the Device Detect line on the nunchuk, which isn’t needed. Note the jumper on the WMP that links VCC to the WMP’s Device Detect line.
After that, it’s necessary to get the WMP and the nunchuk aligned properly. This alignment is the same alignment that’s used for the MultiWii. ”Forward” is at the top of the picture.
|Sensor orientation - up is "front"|
So, with the sensors in that orientation, I attached the coloured wires from the nunchuk to the location where you see the grey wires on the WMP, and then attached wires using the same colour scheme to the WMP so they could go to the Arduino. Attaching the whole kit to a breadboard gives this;
|Attached to a breadboard|
The yellow wire is SCL, the green wire is SDA, black is GND, and red is +VCC. SDA connects to analog pin 4, and SCL connects to analog pin 5. VCC is set to 5 volts.
So, how did it work?
Not so well, to be honest. The WMP appears to be rather intermittent as to whether it works or not. It either just returns zeroes or some garbage value that doesn’t change. Power cycling the WMP repeatedly can cause it to come good and then work fine, but losing the IMU appears to make the AeroQuad software crash, requiring a reset. And the reset kills off the WMP again.
However, putting MultiWii onto the Arduino had a slightly different result. The WMP still would often not initialize properly, but when it did I could connect the MultiWii configurator and have the pitch/roll meters work properly. That’s a start, but it’s not exactly what I want.
I asked the good folks at AeroQuad for help on the forum, but it looks like my problem may be the clone sensors. Not much I can do there, at least until I get a logic level converter so I can try and run it off 3.3v and see if that stabilizes things.
Well, I’m thinking what I’ll do is order in an ITG-3200 gyro and a BMA180 accelerometer, which are the recommended parts to go onto the AeroQuad v1.9 shield I’ve got coming in. That shield does come with a logic level converter board, so I’ll test the WMP using it, but I’ll use the “correct” parts anyway. If the WMP works fine with the LLC, then I’ll keep them aside for a miniquad or something similar.
It’s a bit disappointing to get roadblocked straight out of the gate, but I went with the Wii sensors knowing they were dirt cheap and with the view that I might have to get the expensive breakouts anyway. Looks like that happened, and I’ll put more time into diagnosing it later.
I have a pretty good hunch the problem is going to be the 5v feed.