Thursday, June 15, 2006

How the Wii-mote works

I know this is pure speculation, but I've been following the Revolution/Wii for a while, and one thing that kept me intrigued is how would Nintendo build such a fantastic controller in a cost effective manner.

After much thought I think I get it.

There are two distinct control schemes in the Wii-mote:
  • Orientation and acceleration
  • Pointing

Orientation and Acceleration

The orientation and acceleration is quite easy, it only needs an accelerometer. This only tells you the orientation relative to the ground (if you're swinging, the 'perceived' ground shifts).


This is the hard part.

There are some observations I (and several others) made:

  • The Wii-mote has a dark plastic window in the front
  • You have to place a 'Sensor Bar' under or over the TV
  • The Wii can track multiple remotes with high acuracy
  • There is an image sensor in the remote
  • It has been mentioned of a problem with halogen lights
  • The remote has to be pointed to the sensor bar for precision aiming

Keeping those in mind, let me explain how it all makes sense:

First of all, the dark window in the wii-mote, is a visible-light filter. Very similar to the window in front of most remote controls. But instead of having a IR led behind it, it has an image sensor.

This image sensor only 'sees' infrared images, probably in fairly low resolution. It uses this to see the sensor bar, which is basically a row of IR leds.

The wii-mote captures an image of what's in front of it (basically a bright line on a dark background), and looks for the sensor bar (which should be the brightest IR thing in the image).

Since the size of the sensor bar is fixed, you can acurately calculate the distance of the wii-mote from the sensor bar, the rotation (the image sensor sees a line rotated), and the angle of the wii-mote in relation to the center of the sensor bar (the line is off-center in the image).

This approach is quite easy to implement, but it has several drawbacks:

  • If you are too close to the bar, you cannot acurately estimate the angle or position
  • If you are too far, the precision also suffers, since the resolution of the image sensor limits how far you can be
  • Halogen lights (or any other light source with lots of IR light, such as direct sunlight) can effectively blind the image sensor

It also is very cost effective since low resolution image sensors are quite cheap in bulk, and image tracking is also very well understood for this scenario (think of optical mice, for example).

Hope you enjoyed this.