Wii Remote IR Camera Hack with Arduino Interface by BigRedRocket
Featured
We'll physically extract the IR camera from the Wii remote and interface it with an arduino controlling a servo.

The Wii IR camera is a beautiful thing. It has an integrated processor which outputs the X and Y positions and size of the 4 brightest IR points that is sees. This can be very useful for tracking in robotics or human interfaces. Enjoy!

 
Remove these adsRemove these ads by Signing Up

Step 1: Extract the Wii IR camera

You'll need a Wii remote or "Wiimote" to start with. Normally they are about $40, in the end that is not too bad for a pretty awesome sensor. Otherwise you can check out ebay or elsewhere for used or broken Wii remotes.

You'll need to rip apart the case. It has some crazy three pronged screws. I didn't want to completely trash the case so I made a small tool to take it apart.

Now you need to desolder the 8 pins and the 2 struts holding the camera on the board. I used some desoldering braid. It wicks the solder away and makes it easy to get the camera out. Be careful, don't break the camera!

How to use desoldering braid: http://www.youtube.com/watch?v=AcbezX8TrOU

You might want to keep the rest of the parts. You might be able to scrap other parts. Also, If you decide later to use the Wiimote again, you could always put the camera back in.
1-40 of 64Next »
aws alnabulsi says: Oct 11, 2012. 2:12 PM
Great work!! you've done a great job explaining details...thanks for that :)
i have one question though,,how is the IR camera calibrated?or what is the x,y reference?the origin (0,0) point
Thanks again,
Aws
pavel.s says: Jul 27, 2012. 12:01 AM
I bought Wiimote at the MiniInTheBox, disassembled it, but camera inside is different:



Who know something about this? It has the same interface or it's completely different?
pavel.s says: Jul 27, 2012. 12:03 AM
bharrison7 says: May 21, 2012. 8:16 AM
You can now buy the camera's pre soldered onto a clock circuit from this place:

http://rocketbrandstudios.com/store/pcb-s-and-boards

He's even got some video and code examples for using it in a followme setup on a bot.

I'm not sure if you would still need to run it through a converter circuit to use it with a 5v board like the arduino but it looks to be running fine interfacing to an arduino nano in the video

Either way it makes for a much neater little package than unsoldering and proto boarding your own :-)
drujensen says: May 2, 2012. 10:43 AM
(removed by author or community request)
mmalluck says: Jan 31, 2012. 1:21 PM
I'm wondering if a 3.3v to 5v logic converter is necessary. Some folks have had luck with disabling the internal pull-up resistors used in wire library and installing their own pull-up resistors to 3.3v source.

http://www.varesano.net/blog/fabio/how-disable-internal-arduino-atmega-pullups-sda-and-scl-i2c-bus

No converter necessary.
evolvingtech says: Dec 26, 2011. 11:33 AM
I imagine that the IR camera is a custom made component made only for Nintendo. Does anybody know if there is an equivalent product that can be purchased from an third party company be it Pixart or anyone else?
EvilChip says: Dec 11, 2011. 1:24 PM
Hi. You know which is the range of IR that the WiiMote detect?
BigRedRocket (author) says: Dec 11, 2011. 9:14 PM
I think that the IR LED's that I was using were in the 940-950 nm range. I imagine that the camera is sensitive to a range around that.
Gonazar says: May 20, 2010. 4:02 PM
OK, so i'm new to the use of inverting logic gates and i don't understand the schematic. After reading wikipedia i see that the logic gate has 6 inverters in it. Does it matter which you two you use? And as far as i can tell from the photos, your using using the VDD (pin1) and NC (pin16) but what are they connected to?

Also, would you be able to make a list of recommended digikey parts for the standard parts? I'm not quite familiar with the logic gates and don't know which to pick. I'm also not sure about the crystal either.
BigRedRocket (author) says: May 31, 2010. 2:33 PM
 It has been a while since I made this, so I had to scratch my brain.

I used the 74AC04 inverter chip. Pin 1 is not Vcc. It is weird like that. here is the data sheet:
www.datasheetcatalog.org/datasheet/nationalsemiconductor/DS009913.PDF

Pin 7 is ground and Pin 14 is Vcc. The gates are all the same, use any two.

As far as digikey is concerned. You'll probably want a 14 pin DIP package. We are running the chip at 3.3V, so we need to check that it'll work with that, but it looks like they all do. Otherwise, you'll want to buy something that has a minimum quantity of 1 and is available. I see 4 options with that, they are all good, buy the cheapest. Get a few (they are cheap) in case you blow one out.

The crystal is easy too. Filter with 'through hole' and 25 Mhz. After that you'll get a bunch. I forget which one I got, but they are pretty much all the same. We are not too concerned with the stability and tolerance. Sometimes I like to get a few different ones in case. It is cheaper to buy a few than to ship stuff again.

The caps can be annoying to buy because there are a million of them. Again, get a through hole with the right capacitance. We are not dealing with high voltage, so they will all work. Just find the cheapest then. Maybe get a few different ones if you are not sure. That is what I do.

Just get the cheapest 1/4 watt 1.0 Mohm resistor. 


questionman says: Oct 5, 2011. 10:22 AM
Hi there. Is 74LS04 ok with this circuit? Thanks buddy. :)
BigRedRocket (author) says: Oct 5, 2011. 11:27 AM
I am not sure. A quick look at the 74LS04 datasheet shows that it runs at a minimum of 4.75 volts, but the logic will run at 3.4V so I have no idea. I would wire up the clock part and make sure it is working correctly before connecting it to the Wii IR Camera.
questionman says: Oct 4, 2011. 8:24 AM
Hi there. That is a very interesting project you have. I am wondering if instead of using that voltage converter shield, can we use this instead:
http://www.sparkfun.com/products/8745
It has the same purpose though, which is to convert voltages.
Forgive my knowledge about this, since I am just a beginner as a hobbyist.
Thanks a lot buddy! :)
BigRedRocket (author) says: Oct 4, 2011. 9:11 AM
Yeah, I have looked at that too. I don't know for sure if it will work, but it says that it can do i2c conversion, so it seems like it will do. If it does it would be cheaper and easier to work with. Thanks for the comment!
questionman says: Oct 5, 2011. 4:04 AM
Hi. Sorry for this newbie question but, is the theory behind the circuit of
http://www.sparkfun.com/products/8745
same as this?
http://i52.tinypic.com/2niprtz.png
I am trying to work your on your project and I followed all the circuits,
except for the voltage converter shield. It seems that the i2c scanner:
http://todbot.com/blog/2009/11/29/i2cscanner-pde-arduino-as-i2c-bus-scanner/
cannot detect the i2c device, which is the pixart camera.
I would really appreciate if you can help me on this. Thanks again. :)
bskaloud says: Aug 26, 2011. 6:07 PM
Hi, I am having problems getting this circuit to work. I've tried replacing all the components, different wii IR cameras, and still I get a continuous output of all blobs with a size of 0. I lowered the pull-up resistance on the SDA-in and SCL-in to 1.5k ohms, and this worked for a bit, but then after a few days it stopped working again. I've also tried soldering all the components instead of using a breadboard, but this had no effect. Do you know what the problem might be? This is driving me nuts. My next step is to vary the pull-up resistor values and see if something works. Thanks for your time.
BigRedRocket (author) says: Aug 29, 2011. 11:13 AM
It is hard for me to say without working with your setup. I did burn out a camera at one point by accidentally cranking up the voltage on it. I have had no problems on a breadboard. If you have access to an oscilloscope, check the output pins to see if you are getting any action. This may help you isolate the problem. I am going to be working with this again soon. If I come across anything I will let you know.
bskaloud says: Aug 29, 2011. 4:09 PM
Thanks for the reply. Turns out it was a grounding issue. I was only connecting pin 2 of the camera to ground, and when I connected pin 3 also, it worked. I don't quite understand it because the pins are connected internally... Also, one of the cameras I was trying to use was burnt out, so that just added to the frustration.
ameenyousuf says: Nov 24, 2010. 9:01 PM
nice work. I was wondering whether similar circuitry could be used to detect finger movements? I am working on an optical projection keyboard project and was planning to use the Wiimote IR sensor for the purpose of detecting finger movements when a user hits a key. I think what you have made could be applied to some extent to my project also?Is that possible? Thanks
pspittle says: May 18, 2011. 1:23 PM
You may find it a lot easier if you were to do something like what is in this video for your project. Doesn't require such lengthy amounts of work, and you can keep the wiimote in one piece
Beenay25 says: Apr 16, 2011. 9:28 AM
Brilliant instructable.

Do you know how to change the pins that the camera uses on the arduino? I think it defaults to 6 and 5, but I'd like to change these and can't figure out where they are set...
BigRedRocket (author) says: Apr 17, 2011. 10:49 PM
I don't know offhand, but I would assume that it is defined in the Pvision.h library. I haven't had to change it myself.
marcwolf says: Apr 2, 2011. 6:54 PM
Very interesting project and also thanks - I have been curious about the 'speed' of processing.
I do animatronics as a hobby and one of the 'holy grails' is real time Lip Syncing where the mask will move it's lips in time with yours.

If one thinks of the lips as a flexible circle with points every 90 degree's then it's easy to put reflective points on the lips at that location/ Then it's easy to work out how open, cloded, or wide the mouth is and du0plicate it on the puppet.

Using an industrual face mask (for dusting) you can make a fully self contain system complete with camera and IR 'spotlight' that will protect the eyes and provice a dark environment.

Take Care

Marcwolf
razstec says: Oct 24, 2010. 9:03 AM
Anyone can help with building a smaller controler so i can attach it laptop screen side and use a pen as a mouse?

the wiimote its just too big, any sugestion?
A way to power it by usb would came in handy too.
thanks
jamwaffles says: Sep 22, 2010. 9:35 AM
Does anyone know where you can buy the camera on it's own?

Also, thanks for the cool instructible - that servo is incredibly responsive!
BigRedRocket (author) says: Sep 23, 2010. 2:43 PM
Thanks, glad to help. The servo is very responsive. It is fun to just sit and watch it move.

I do not know where to find the camera on it's own. As far as I know this is the company that makes it,

http://www.pixart.com.tw/about.asp

If you find them I'd really like to know where you can get them alone.
shining_wizard says: Nov 19, 2009. 10:03 AM
Very interesting project... for disassembling anything Nintendo related, you can find "trigram" or "triwing" screwdrivers pretty cheap on the web which will unscrew these, NDS cases, and many McDonalds toys too LOL.
BigRedRocket (author) says: Nov 19, 2009. 12:58 PM
Thanks, it is always good to know the proper jargon. I just made my own with a dremel and a few minutes, but it would be nice to have a proper tool.
cdousley says: Jul 13, 2010. 3:35 PM
i just use a very small flat bit theres an ible for it around here somewhere...
Lance Mt. says: Apr 17, 2010. 1:56 AM
 Could you mount to the servo and cut movement back to a 1:1 movement ratio?
BigRedRocket (author) says: May 31, 2010. 2:14 PM
 Absolutely. I've been playing with this method. It works better for tracking. You can also use two servos and track with both the X and Y axes.
Lance Mt. says: Jun 6, 2010. 5:18 AM
Miniature Mech Fighting toys, here we come.
thalass says: Nov 24, 2009. 4:22 AM
This is great. I wonder if you could use it to track the sun? There are cheaper and simpler ways to do that, I suppose, but the wiimote ir camera mounted in the middle of a group of solar panels, or a reflector dish for solar thermal, with the arduino programmed to return the array to a pre-determined position when an ambient light sensor determines it's dark outside (or the solar panel output goes below a threshold, or an internal clock determines it is close to sunset, or a combination). You could even alter the morning position based on the date, so the panels are in the right spot in the morning.

Very flexible, I like.
BigRedRocket (author) says: Nov 24, 2009. 6:01 AM
Yes, that would absolutely work. It would really be powerful in a moving platform where you might need some more dynamic sun tracking.

You can take this idea further. If I know the time of day and my position on the earth (longitude, latitude and possibly altitude as well) then I know where the sun should be. Then, by using a IR camera (or several of of them), you can measure where the sun is. Then, working backwards, I know (within some error) what the angular orientation of the cameras and therefore the orientation of the robot, airplane, etc as well.

This gives you a fixed orientation measurement that doesn't require integration as apposed to inertial navigation systems which builds up error over time.

Of course that would only work during the day. I wonder what IR signal the moon has?
thalass says: Nov 24, 2009. 7:48 PM
I don't think the moon has much of an IR signal. Not enough for the wiimote camera, probably. It'd be easy to test, though. With cwiid or another wiimote program for pc. Point it at the sky and see what the output looks like.

For orientation, that method would work great, except at around midday. Especially if your vehicle is on a tilt. That can be compensated for, though. But then again you can get hall effect compass systems for fairly cheap nowdays, which also have no accumulative errors or anything.

Now if your vehicle was on a body without any magnetic field, like the moon or something, then that would work very well. Especially if you could use the earth as a second reference point for when the sun is directly overhead.
thalass says: Dec 4, 2009. 12:59 AM
I just tried this out, with wmgui on my laptop. The sun is much too bright for the wiimote to register it! Even with two polerised sunglasses lenses at various angles (crossed at 90 degrees you can't see through them, though the sun still shines through) I got no output - though reflections of the sun on various things produced a myriad of points the wiimote will track.

I also tried the moon the other night, being a full moon, and I think that it wasn't bright enough either. Though I didn't try putting my sunglasses in front of the lense to test that out.


wkuace says: Apr 16, 2010. 8:45 PM
maybe you could try a welding mask? If you have a spare set of oxy acetylene goggles those might work, arc welding mask are actually darker and might block to much light. They might completely block the IR light though

also does anybody know if the IR cameras from the Nyko or other brand wii remotes will work?
thalass says: Nov 24, 2009. 7:54 PM
Actually if your system was sensitive enough you could work out longitude and lattitude, too!
Gonazar says: Apr 10, 2010. 9:48 PM
Very interesting instructable and well written.

I'm looking into taking this a bit further and was wondering if you set up an area where you have 1 camera on one side and another facing perpendicular from another side like so...
_____________
|                              |
|                              |
|              *              |<
|                              |
|_____________|
               ^

Where ^ is a camera direction and * is the light source in this square environment
Would you be able to track 3 dimensions? (1 camera doing xy, the other doing yz). Would arduino be able to handle the two cameras? I also assume that each camera would need it's own interface circuit as well?
1-40 of 64Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!