USB Wii Sensor Bar

Posted by foobar2k Thursday, 05 April 2007 19:31

intro.jpgNintendo's Wii has a great controller which has both accellorometers and pointing functionality for fun with motion, and it also communicates using the Bluetooth protocol. This means that it is possible to hook the Wiimote up to a Bluetooth enabled PC which has all sorts of possible applications. For example, it is possible to use the Wiimote as a mouse in Windows, or use it in games. To detect where it is pointing, the Wiimote uses the Wii's "Sensor bar", which is actually an array of infrared LEDs which the Wiimote uses as a position reference. To make it nice and easy for me to use my Wiimote on my computer I decided to construct a USB sensor bar for my PC. Here are the instructions for how you can make one too!

Tools:

  • Soldering Iron
  • Wire cutters
  • Screwdriver/Dremel/Drill (to cut holes in pen casing)

Materials:

  • 30cm (12") of reasonably thin wire
  • 1 x 91 ohm or similar valued Resistor (Maplin: A91R)
  • 2 x 3mm Infra-red LEDs (Maplin: N17BU)
  • USB Cable
  • Heatshrink
  • Solder
  • Pen casing (preferably "Wii White" ;))
  • Hot Glue/Putty/Blutak

Instructions:

  1. The first thing you need to do is chop the end off your USB cable. Make sure to chop off the end which goes into your device and not the end going into your PC! Try to cut the wire as close to the end as possible to preserve the length of the cable.
  2. Strip away some of the external plastic and shielding (if any) from the cable, then expose the 4 wires inside the cable. They should be red, black, green and white.
  3. Chop off the green and white cables and insulate their ends with a bit of heatshrink or electrical tape. These are the data lines on the USB and we will not need these, we are only interested in the convenient 5 volts supplied by a USB port.
  4. The red wire carries 5 volts and the black wire is ground. Strip about 2mm off the end of each of these wires. Here's what my USB cable looked like with the wires stripped:
    materialst.jpg
  5. Now cut the wire into 3 10cm pieces and strip about 2mm off each of the ends. Using a sensor bar on a PC monitor at such close range requires the LEDs to be closer together than they are on the original Wii sensor bar, and 10cm spacing seems to work great.
  6. Now it is time to prepare the LEDs and resistor. Cut the legs on the LEDs and the resistor to about 5mm in length. If your LEDs are the type with a flat side to indicate -ve then just do this straight away, otherwise if negative is only indicated by a shorter leg on the LED then make sure to note this down. Here is one of my LEDs after cutting the legs:
    ledandheatshrinkt.jpg
  7. The next step is to join all of these components together into a circuit. Solder a length of wire to the +5v red wire on the USB cable, and another length to the Gnd black wire on the USB cable. Next, solder the resistor to the wire coming from the +5v wire, then solder the positive leg of the first LED to the other end of this resistor. Now solder one end of the final length of wire to the negative leg of the first LED, and the other end to the positive leg of the second LED. Finally solder the negative leg of the second LED to the extended Gnd wire from the USB cable. The circuit diagram is as follows:
    circuit.jpg
  8. Cover the soldered points with electrical tape or heatshrink. Here is what mine looked like at this stage:
    wiredt.jpg
  9. Now is a good time to test the setup. Plug it into your USB port and download some software to test your Wiimote with. I recommend using WiinRemote. If you have any trouble syncing your Wiimote with your PC try checking WiiLi.org which has lots of information on this.
  10. Now the wiring is complete it is time to construct a housing for the sensor bar. For the housing I used an old CD writing pen, as it was almost the perfect length and comes in the ever popular "Wii White" :). Remove both ends of the pen and its internals. Here is the pen I used:
    pent.jpg
  11. Now you should have a cylindrical tube, and you need to make holes for the LEDs to stick through. I used a screwdriver to burrow a hole into either end of the pen of just less than 3mm diameter so that the LEDs will fit in snugly given a push.
  12. Now thread one of the LEDs through the pen and push it through the hole in the end. Do the same with the other LED at the opposite end. Tuck any loose or extra wire into the tube.
  13. Now it is important to try to align the LEDs as well as possible. Personally I found that having each LED pointing directly forward gave the best results, but try it out on your setup. Once you have aligned the LEDs perfectly, set them in place using some hot glue or putty. I had neither handy so I used large chucks of Blutak, which also doubled to secure the sensor bar to my monitor. At this point I thought it would be a good idea to "brand" my new sensor bar by writing "Wii" on it :).
    incasingt.jpg
  14. Now that the sensor bar is completed, all that remains is for you to attach it to your monitor and test it out! I attached it to the top of my monitor with some Blutak, and secured the cable to the back of my monitor with a piece of tape. Here is the finished set up with WiinRemote running:
    mountedt.jpg

Good luck if you are thinking of trying this. Let me know how you did by leaving a comment or leaving a message on our forums!

Discuss this article on the forums. (7 posts)

Comments (61)
h0gboy @ Thursday, April 05 2007 21:54
Looks good mate. I have also made a usb sensor bar for my pc which i need to stick in a housing, looks like im going to have to pinch a few of the kids pens lol.
Zentik @ Thursday, April 05 2007 23:52
cool I will make one,
where can I download the software that you are showing in your PC??
cong @ Friday, April 06 2007 01:16
Where do you get the materials specifically the LED and resistor?
foobar2k @ Friday, April 06 2007 01:24
@cong:
I'm in the UK and I bought the LEDs from Maplin (http://www.maplin.co.uk) but they are easily purchased from Radio Shack in the US. Just look for any old Infrared LEDs, make sure to check the forward voltage because this affects what resistance you need to buy. I had the resistor already from another project and the resistance isn't too important as long as it is big enough.

@Zentik
The software is linked to in the article, it is called WiinRemote and it is from http://onakasuita.org/wii/index-e.html I highly recommend it!

Sign up for the forums I can post better replies on there!
Black @ Friday, April 06 2007 17:50
Is 2 ir leds enough?
I wanted to built mine with 4 ir leds... is it too much?
foobar2k @ Friday, April 06 2007 22:22
2 IR LEDs should be perfect for use on a standard size pc monitor. Having extra LEDs on each side, angled slightly differently, will increase the side range at which you can use the wiimote. 2 should be fine for such close range.
Anger @ Saturday, April 07 2007 00:53
i use 4 for my tv also using an old gba adapter for the power and 2 old digtal remotes for the led's and the casings.
its a good idea to use a pen for the casing tho. i find you get more range with more groups of led's spaced further apart (up to a point then it gets worse again - approx 2 pen lengths). i think having 4 just increses the wiimotes ability to see them at a distance. but this is a guess.
MODaWii @ Saturday, April 07 2007 13:24
I've built one of these usb sensors similar to yours, but my problem is bluetooth related. I'm running Vista x64 and my cheapy $9 ebay bluetooth adapter is giving me the hardest time. It even crashed my computer twice and the Bluesoleil drivers installed a file "BThidmgr.sys" which caused my computer to stop booting up (until I booted off of another hard drive and DELETED the file.) What bluetooth adapter did you use, and with what software/drivers in Vista???
Hemsleym @ Sunday, April 08 2007 00:21
I have made one of these except i ended up with 5mm IR LED's that ran on 1.2volts and after some calculations i had a resistor that allowed me to run the device off a "AA" battery and it works great!!
foobar2k @ Sunday, April 08 2007 20:11
@MODaWii:
I'm running vista x86 and I had a lot of trouble with my bluetooth drivers. The way I got everything working was by following this guide:
http://www.dev-hack.com/forum/viewtopic.php?t=1297

P.s. the comments system isn't so good for posting things like links, the forums are much better.
HT @ Monday, April 09 2007 01:05
Radioshack has High output infrared LED 5mm 1.2VDC 29mA 940nm Model: 276-143 Catalog #: 276-143. What should the resistance be?
Anger @ Monday, April 09 2007 01:40
well i dont remember my old electiral training but why not do some simple maths.
1.2v x 4 led's in series = 4.8v
3 x 1.5 batterys = 4.5v
so this is slightly less voltage than the leds require but it wont damage them. it would however mean you have to have all the led's in series rather than 2 sets of parallel.
perhaps it would be better to have a proper circuit with proper resistance values but the way i see it is that why bother about such small differences as long as there lower than the voltage thats available. obviously if you were talking about microprocessors you would go to that kind of detail but a simple circuit of just 4 led's? waste of time and money going out to get a resistor just so you can do the circuit in parallel - just add another battery and your all set. im sure someone will have a good reason to choose parallel over series but i am using 4 in series running from a 4.5 volt power supply and it is effective.
Lucas @ Wednesday, April 11 2007 11:33
That is absolutely amazing!!! I tweaked it so that is would run on an AA battery (no plugs). I haven't tested it on my computer yet, but seeing as it worked ON MY WII I'm sure it will work fine!

Lucas
http://open-soft.org
hacktek @ Thursday, April 12 2007 06:23
I tried it and it didn't work =/ Have no idea where i messed up since i have very little experience assembling circuits. I feel bad that i couldn't get such a simple one to work heh.
hacktek @ Thursday, April 12 2007 06:37
I'm a dumbass. I used the wrong led from my package. I got a emitter/detector pack from radio shack (part number 276-142) and i used the clear leds instead of the tinted ones. Gonna go replace the leds and see if it works.

For these i need about a ~16 ohm resistor which is just excellent since i also bought a pack of 15 ohm resistors xD I'll let u know if i get it done.
hacktek @ Thursday, April 12 2007 06:57
IT WORKED :D
Redsquirrel @ Thursday, April 12 2007 14:18
Thats pretty neat. I might try it sometime. Id probably make it bigger though, as I just want a spare one at home so i dont need to keep grabing the bar all the time cos have two tvs i play on.
John @ Saturday, April 14 2007 16:54
This seems like a great mod. Is there any chance of Maplin codes of the 90ohm resistor & 3mm Infrared LED that you used? Thanks
foobar2k @ Saturday, April 14 2007 19:47
@John:
Added the Maplin codes to the materials section.
MiddleCut @ Thursday, April 19 2007 14:21
I used 4 for better range and no need for a resistor! agnle the 2 outside ones slightly outwards!
I also made one with 4 AA panlight batteries (2x LED 1X 100ohm resistor)
Steve @ Friday, April 20 2007 07:26
MiddleCut - How did you do it with batteries? Can you post some pictures
brady @ Monday, May 07 2007 23:12
hey, just wanted to let you know that i made my IR sensor bar using a round tooth brush holder. thanks a lot for the guide.
works great.
Vimes @ Tuesday, May 15 2007 15:40
There has been some talk here about how monitor size and viewing range may affect the LED size/count and separation distance required between them.

I want to build a bar for use with my 56" TV at a viewing distance of about 20 feet.

Anyone have suggestions on how I should build my bar?

Vimes @ Tuesday, May 15 2007 18:44
I have a question about sizing the resistor:

I found a LED circuit resistor calculator here:
http://ourworld.compuserve.com/homepages/Bill_Bowden/led.htm

Given the attributes for this circuit and the LEDs you reference I used the following values:
No. of LEDs : 2
LED Voltage : 1.4 v
LED Current : .060 mA
Total Voltage : 5 v

Using the calculator the suggested resistance to be added is 36 Ohms (not 91 Ohms).

What am I doing wrong?
JAMIROQUAI 1 FAN @ Wednesday, June 06 2007 07:56
I Have used this to my advantage to use as a mouse/keyboard for pc as suggested it also works for wii.

Good Work
Frank Langner @ Monday, June 11 2007 17:31
can't i just cut the wire on the wii sensorbar and replace that with a USB connector? Is that possible?
zahid27 @ Monday, July 16 2007 12:50
Hey,
Can you get a Wii with a built-in sensor?I just got one today and it has no sensor bar for the top of the telly.
Hassan @ Tuesday, July 17 2007 16:37
Would the High Power IR LED work aswell using the USB (Maplin: YH70M).
Is a resistor needed if you are using a USB instead of batteries.
WueR @ Wednesday, July 25 2007 17:40
Hey,
I've got the same question.
Can I buy sensor bar for Wii and just cut off the wire and replace that with a USB plug?
Whats the voltage in Wii sensor bar?
tazok @ Thursday, July 26 2007 13:30
wuer

11 volts
Paul @ Tuesday, August 28 2007 14:55
I tried building my own with 4 ir leds, it worked ok, but no where near as good as the nyko wireless bar I have now.

The only problem I have now is it eats through 4 aa rechargeables.

would it be possible to simply solder the v from a usb cable to the and the ground to the minus battery plates inside the sensor bar?
Cyman @ Friday, August 31 2007 13:58
I am also interested in cutting an official extension cable for the Wii sensor bar and adding a USB connector to one of the ends. Would this work or does this require additional components due to the voltage of the sensor bar?
Frank Langner @ Sunday, September 23 2007 19:47
Ok for all you folks out there who need one of those IR senders (sensorbar).
I did buy the battery driven IR senders from NYKO and DRAGON. Est. Cost about 20 - 30 Dollars. They work better than the official wii bar, greater distance.. So i encourage you folks get one of those. Much easier to aquire and much easier to set up.
Wiimote @ Sunday, October 14 2007 09:11
Hi,
I also want to use the original wii sensorbar converted to usb...is this possible, has anybody tried it yet??
Cory @ Saturday, November 17 2007 18:59
USB only puts out 5v... Sensor bar uses 12v... you could use 5v, but your sensor bar would be very weak, and would only work for short distances...
FireWire, on the other hand, puts out 12v. ;-)
John @ Monday, November 19 2007 00:18
Guys MAKE SURE YOU CALCULATE YOUR OWN RESISTORS! Especially if you used some other site to purchase LEDs.
bob @ Monday, November 26 2007 00:05
a lot of people asked this question. can i just buy a regular wii sensorbar and cut the end off of it and join it with a USB cord
Tim @ Thursday, December 06 2007 05:21
u download the software hes using from http://onakasuita.org/wii/index-e.html
Guru @ Friday, December 07 2007 22:18
Is it possible to just put a firewire plug on an official wii sensor bar and use that?

Avoiding the need for messing about with resistors etc?

If so how? as in what colour are the wires etc...

Cheers,

G
Tom Anderson @ Wednesday, December 12 2007 19:18
guru the firewire plug would likely require drivers that would interface the mote with the different interface.

not sure about anything else, about it though

Cheers back Tom
Gustavo Brenck @ Thursday, January 10 2008 03:38
I wanna make myself one... but i got a question... i have a 40inch monitor/tv... the same i use the wii on, but also is conected to my pc and its my monitor... so... will i need just 2 IR leds? or i need more because the tv its to big?
Gustavo Brenck @ Thursday, January 10 2008 03:39
Ohh and how far i can position one led from another? can i do like a 3 feet bar?
foreveranndy @ Wednesday, February 27 2008 06:10
clear stock offer , thanks for your support :

XBOX 360 Controllers Extension Cable?2M?100US$1.50
USB JoyPad1300US$1.00
AC Adaoter power max forxbox/ps2/Drea500US$1.00
PS2 Rubber Pad ( better quality than all other ps2 joypads )270US$2.00
PS2 controller normal 5000US$2.90
XBOX High Density Deluxe DancingMat145US$7.00
PSP multifunctional Carry case69US$2.00
xbox 360 sensational headset 500US$4.00
Stereo Earphone with Original Sound Effect500US$1.50
M9569G/A iPod Dock Connector to USB 2.0 Cable 300US$1.80
XBOX 360 VGA AV cable(2m)88US$4.90
PS3 console protector300US$4.00
Silicon Protect Skin for Nintendo Wii Controller500US$2.20
Multi-function double layer Carry Bag56US$2.80
Nintendo Wii 4in1
Multi-function Blue Light Stand88US$9.90
PS2 To PS3 Controller Converter ( 4 LED Indicators)88US$5.00
Thermostatic Cooling Adapter For XBOX 36088US$6.50
Wii Sport & Cooling Adapter 4in170US$8.00
XBOX 360 Bag 53US$8.80
Wii Console Organizer Case88US$9.00
Console Organizer and Travel Case PS388US$9.50
PlayStation 3 PS3 DVD Remote440US$5.50
Wii dock and charger88US$8.50
PS3 Cooling Fan100US$6.80
FS19003 Component Cable for Nintendo Wii 1.8M180US$3.60
FS19001 Scart Cable forNintendo Wii 1.8M88US$2.90
PS3001 HDMI to HDMI Cable 1.8m150US$3.50
PSP127 PSP 3D Sticker50US$4.30
psp128 4-in1 psp stand/charger dock with remote88US$7.50
FS18045 ps3 - ps2 Adapter88US$8.50
FS18042 ps2 to ps3 controller adapter88US$5.20
Wii remote dock / charger99US$7.40
FS19030Wii Multi-function Blue Light Stand88US$8.00
FS19030 Wii Sport 4 in 188US$6.80
FS18016PS3 Vertical Stand with Rubber Plug 2in188US$3.10
FS18036 PS3 Triple Power Cooling System100US$5.00
FS19033 Wii Sensor Bar80US$5.00
FS18044 PS3 Controler charge station(cradle)200US$5.50
XB3032 XBOX 360 Controllers Extension Cable?2M?100US$1.50
PSP multifunctional Carry case100US$2.00
PS1 AC adaptor3000US$1.80
FS19003 Component HD AV Cable for Nintendo Wii 1.8M1000US$4.00
video008 IPOD AV cable181US$0.80
PC032Game Projector viii USD100/pc , for stock , 2pcs only
PC034Projector PC034 USD100/pc for stock
PC039LCD Game Projector USD278/pc for stock
FS02043 Family Entertainment projector?USD468 for stock
fight night round 3 $30/pc
genji: days of the blade $28/pc
MS gundam:target in sight $$33/pc
foreveranndy @ Wednesday, February 27 2008 06:11
contact us by firstsinganndy100 gmail com
Dan @ Sunday, March 02 2008 20:14
so does anyone know the answer on firewire powered wii sensor bar (as in the official sensor bar)?

Tom Anderson said "guru the firewire plug would likely require drivers that would interface the mote with the different interface."

This sounds a bit wrong to me - drivers? what does the sensor bar care about drivers for? all it needs is the power from the firewire cable. Surely this is enough.
Raven @ Monday, March 24 2008 21:24
what is a 1x91 ohm resistor i couldnt find 1. What r the watts how many ohms. What type can i get from radio shack.
Raven @ Tuesday, March 25 2008 01:31
not workin man im so confused
Raven @ Wednesday, March 26 2008 20:42
one question, HOW IS THE COMPUTER SUPPOSED TO KNOW IT'S A SENSOR BAR. wiinremote cant be tho only thing you need. Some1 answer because i really want this to work. Someone asked does the wii have i boult in sesnor. I dont know but it should have had a black bar.Hmm..............
Raven @ Thursday, March 27 2008 15:16
1 more question :(
would a wirless sensor bar connect with the blutooth or something.
Mike B @ Wednesday, April 02 2008 03:02
>one question, HOW IS THE COMPUTER SUPPOSED TO KNOW IT'S A SENSOR BAR. wiinremote cant be tho only thing you need.

The computer doesn't interface with the sensor bar... all the sensor bar does is allow the Wiimote to figure out its orientation in relation to the screen.

When people want to connect their sensor bars to the PC, it's not for interface, it's for a power supply that isn't the Wii.
erog 38 @ Sunday, May 11 2008 17:18
I followed the directions compleatly but I used a 100 ohm resistor will this make too much of a difference? it didn't work so I hope this is the problem
Frivolous Sam @ Sunday, May 18 2008 17:31
100ohm will be fine, you're just making a slight difference in the current drawn. Slightly higher resistor, slightly lower current. But negligible really.

For those that are wondering - firewire doesn't sound doable either without adding a resistor - it supplies 30V:
http://www.interfacebus.com/Design_Connector_Firewire.html

The best solution I can think of is this... there are 10 LEDs running at 1.2V each inside the sensor bar and drawing ~20mA. Open the sensor bar up, completely disconnect the middle LED on each side (cut it off) then solder short cables so that each side is running 2 parallel circuits containing 2 LEDs in series. That way, each side is running at 2.4V and drawing ~40mA. Since the two sides are running in series, the total thing is running at 4.8V and drawing ~40mA. USB can supply 5V and 100mA so you're close enough to the voltage and well below the max current. Change the connector for a USB connector and you're done... sounds easy - I might give it a go!

All you'd need would be a USB plug, four very short lengths of wire, wire cutters, a soldering iron and a screwdriver - no building your own case and all you lose is one LED each side...
Frivolous Sam @ Sunday, May 18 2008 17:31
Plus, there are USB connectors on the back of the Wii so you wouldn't need to have two sensor bars.
Frivolous Sam @ Wednesday, May 21 2008 19:12
Just tested the voltage of my Wii sensor bar while it was running and got 7.35V. JaremyP ( http://www.avsforum.com/avs-vb/showthread.php?t=754430 ) got 7.8V but I definitely didn't.

The two sides are in parallel.

Each side has 5 LEDs (dropping ~1.25V) each and a 24 ohm resistor (dropping ~1.1V) in series.

By Ohm's law we can work out the current drawn by each side is 1.1/24 = 46mA. This means the total current drawn is 92mA.

USB provides 5V and supports up to 100mA. This means we need to reduce the voltage required by each side. Four LEDs at 1.25V plus a 1 ohm resistor is the way. I just need two 1 ohm resistors...
Frivolous Sam @ Thursday, May 22 2008 00:09
I'm on my way to developing a USB mod for the stock sensor bar. Check out my diary/post on Wiili forums:
http://www.wiili.org/forum/modding-stock-sensor-bar-to-run-from-usb-port-on-wii-pc-t3978.html
Shaun @ Thursday, May 22 2008 11:21
To stop faffing about inside the sensor bar couldn't you just connect it up using 2 usb plugs? Wouldn't that act like using 2x 5v batteries?
Frivolous Sam @ Thursday, May 29 2008 15:28
No.

It's very, very unlikely that two usb sockets would be electrically isolated, so you could end up short-circuiting one of them by trying to combine two of them.
Confused @ Monday, June 16 2008 18:52
I have cut up two USB cables and both have the following inside: Orange, Blue, Green and White. Which is 5v and which is ground?
Confused @ Tuesday, June 17 2008 07:03
Solved. It was pretty obvious, I guess. Orange = 5v, Blue = Ground, Green and White = Data.

I have carefully built two sensor bars. One like yours and one within an old wireless keyboard and mouse receiver. Both work fine. My only issue is that in order to get the mouse centered on my screen, I have to tilt the Wii remote back about 80 degrees i.e. I have to point it to the ceiling.

Why is this happening?
Confused @ Tuesday, June 17 2008 08:32
I hope someone has an explanation for this. The issue of having to point the remote at the ceiling was happaning at home. I am now at the office and have to point the remote about 80 degrees to the left, not up!?
Why does the orientation keep changing when I connect my Wii remote in different environments?
Confused @ Tuesday, June 17 2008 09:14
OK. I feel like an idiot now. My remote has been picking up other strong light sources.
The remote works fine with WiinRemote's motion sensor, but not with IR running. I obviously have not assembled my sensor bars properly. Sorry for all the posts.

Write comment

security code
Write the displayed characters


Powered by Azrul's Jom Comment
busy