Getting inside the WiiMote, I2C, PixArt and all that good stuff…
Some of you will have noticed that I was able to modify a WiiMote to do visible light tracking recently. My goal was to produce a gesture tracking system for the laser harp.
This was OK, but having to use Bluetooth, and Windows was a PITA - I needed a hardware only solution that could be wired straight into the harp.
At the recent Maker Faire I talked to Johnny Lee about the amount of information available on WiiMote internals - he directed me to the WiiMote project forum and I was able to locate this post that hinted at how the PixArt sensor could be attached to a microcontroller using I2C.
http://www.wiimoteproject.com/other/red-laser-and-i2c-bus-done-t579.0.html
Post #34 is pretty crucial:
Here’s how I get this to work:
Remove Pixart sensor from wiimote.
The sensor needs a 25 MHz clock signal here’s a circuit and pinout:
http://www.kako.com/neta/2007-001/2007-001.html
Connect the Sensor to your MC (don’t forget the pullups)
The slave address is 0xB0.
Initialise like here
http://www.kako.com/neta/2006-019/wii_ir_test2_src.zip
http://www.kako.com/neta/2006-019/2006-019.html
Now send 0×38
Capture 8 Bytes from slave
Capture 4 Bytes from slave
(I’ve seen this by sniffing the Bus)
I’m not sure about how to interpret the data(Haven’t even tried this yet, maybe it’s like the basic report?)
Some tips:
Kako.com is Japanese I’ve used babelfish to translate to English http://babelfish.altavista.com/
You can connect the sensor to the extension port and use the wiimote as usual. (With 25MHz Clock extern)
If you have problems with desoldering the sensor you can carefully break the case of the sensor. There is a second SMD case around the cam. I’m not responsible on any damages!
Please share your experience with the community.
If somebody knows how to remove the IR filter please post it here!
Does somebody know if the sensor can be used with 5V?
Fortunately the good ‘ol Arduino has everything we need - 3.3v output and an I2C protocol, accessible using the Wiring language.
Here’s a nice article on using I2C with an Arduino
Over the next few weeks I’m going to be trying to create an Arduino/PixArt/WiiMote hybrid that is capable of 200Hz blob tracking and MIDI controller output…
Stay tuned!
But in the meantime - check out LadyAda’s excellent new Boarduino USB!
All the goodness of a regular Boarduino, now with the FTDI chip/USB built right in.