Saturday, June 20, 2009

Wii Remote on Mac or PC - DIY Sensor Bar


You can find this info other places on the web so I certainly don't claim to be posting new information - just my experience with using the Wii remote on my Mac.

The Wii remote uses bluetooth to communicate with the Wii which many computers these days have built in. If you don't have bluetooth on your computer, you can buy a bluetooth adapter for under $20. With a program called DarWiin Remotes (click link to download) you can connect your Wii remote to your computer quite easily. The only problem is that to use the controller as a full fledged mouse you either have to master using the accelerometer to move the mouse pointer (not an easy task) or you can buy or build a sensor bar like the one that comes with the Wii.

The sensor bar is just a few IR LEDs separated by about 7". The Wiimote uses some form or triangulation to determine where the mouse pointer needs to be based on it's position related to the sensor bar. It then relays that information back to the computer via bluetooth. Since I wanted to use the controller with my computer, I figured the best way to power the sensor bar would be my USB hub.


The IR LEDs I purchased had an operating voltage of 1.5v with like 15mA current draw. I connected three LEDs in series which made the voltage required 4.5V which leaves only half a volt to deal with. There are numerous calculators online to determine what value resistor you need for LED arrays. I used this one and came up with needing a 22 ohm resistor. I ended up using a 26 ohm because that's all the store had and it works fine.

I glued the circuit board into the case with gorilla glue and used 24 gauge hook up wire to connect the two boxes.
This is the whole thing closed up and plugged in. I tried it out and everything works but I have to experiment with the distance between the two boxes. I made the connecting wire a little long just to mess around with it. When I tried it out the pointer jumped around a lot but as I adjusted the distance, it became more accurate.

One note about the bluetooth connection: sometimes I have issues with the connection dropping but I think that may be the DarWiin remotes program. There are other programs that work with the Wii remote but you have to pay for them.

0 comments: