Picaxe WiiMote camera

Custom interfaces for-the-wild

What is this Exploration about?

To explore different types of interface modes for Urban HCI. The WiiCam offers a low-cost solution for absolute tracking, which is very attractive for DIY people. The low-cost and its light weight system footprint might also work in out-door scenarios. For detailed information about the Wii Mote visit the WiiBrew website, which has very good information about the camera used by Nintendo.

WiiCam Specification

Due to the fact that the component is excusively licensed to Nintendo, there is some confusion around the actual specifications. So here are the most likely specifications listed.

  • Manufacturer: PixArt
  • Interface: I2C
  • 8-bit I2C address: 0xB0 This includes the LSB being 0 (I2C write-bit) for writing.
  • 7-bit I2C adress: 0x58 (1011000B)
  • Resolution: 196 x 96 pixel
  • Field of View: 33 degrees horizontally, 23 degrees vertically
  • IR-Pass Filter: 940nm on to lense as well as plastic filter in front of the cam.
The picture on the right shows a read operation being the R/W-bit pulled high in the second packet.

Interfacing the WiiCam

The easiest way to desolder the WiiCam from the WiiMote PCB is to place a rather big blob of solder on all 8 pins at the same time. In that way you can heat up all pins and gently pull the camera down while heating up everything. For the casing, that is also soldered to the PCB, I recommend to snap its pins with sharp pliers. Heating the case might damage the plastic. However, heating it up toghether with the 8 pin solder blob method works too. Burning your fingers is likely :)
To use the WiiCam I chose to interface it with an Arduino (a.k.a. ATMega328). Please be aware, that the camera uses 3V3 and GPIOs of standard Arduinos are 5V. You should make sure that SCL and SDA are converted to 3V3 or run your ATMega at 3V3.
My suspicion is, that SDA and SCL are tolerant to higher voltages. I sometimes used accidently up to 5V, but the WiiCam still works. However, by checking camera Datasheets from PixArt that are comarable with the WiiMote specificaitons, it seems that is not a good idea to drive the I/O higher than 3V3.
The picture on the right shows an RBBA (Really Bare Bone Arduino) attached to an S65 Display shield and the custom WiiCam camera circuit with Wii IR-Cam.
To initialize the WiiCam via I2C the wire library included in the Arduino distribution was used. The initialization I used is as follows:

void Write_2bytes(byte d1, byte d2) {
  Wire.beginTransmission(slaveAddress);
  Wire.send(d1);
  Wire.send(d2);
  int ret = Wire.endTransmission();
  Serial.println(ret); // Used for Debug
  }

void setup() {
  Wire.begin();

  // IR sensor initialize
  Write_2bytes(0x30,0x01); delay(10);
  Write_2bytes(0x30,0x08); delay(10);
  Write_2bytes(0x06,0x90); delay(10);
  Write_2bytes(0x08,0xC0); delay(10);
  Write_2bytes(0x1A,0x40); delay(10);
  Write_2bytes(0x33,0x33); delay(10);
  delay(100);
}


Results

Tracking up to 35 - 40m at night was achieved with the custom made IR-Spot. Because the target was not optimal (it was bright, but did not spread the IR light ofer a big enough area. Also I did not tweak the WiiCam parameters available.) it can be assumed greater distances are possible in outdoor scenarios. A useful target size should be bigger than 15-20cm. A general problem, but also opportunity for a smart interaction design are halogen spot sometimes found in the streets. They emit strong light in the spectrum of IR and are tracked by the WiiCam quite easily. Sometimes this can be a problem, if a setup has to be in a certain direction, but one can certainly utilize these at the same time.

 

 

Technologies used:
Picaxe I2C Camera
Arduino
Oscilloscope
Custom IR-Spot