This is my first Instructable so please be nice. This is how to make a multi-touch interface out of you desk for very little money. Finally got a video uploaded,sorry about the bad frame-rate my laptop isnt all that good.

Step 1: Necesary objects

For this you will need a Webcam, a Glass Desk, software called roboRealm ( RoboRealm download ). For me i mounted my webcam under my desk with ducktape.

Step 2: The Software and Setup

For this step we will be setting up the software to read and interpret the image. You can download this software from there website www.roborealm.com. iI have not perfected the software for using fingers,kinda hard to seperate them,but..., I do have a pen like thing that I built from random things lying around my room that powers up an LED. The file Pen.robo is for using the LED pen thingy,u can use anything that powers up an LED and for added precision you can put an IR filter over the camera that is made from either a floppy disk drive or a completely dark spot from a negative on camera filem strip, And the file Touch.robo is for using hands but is not perfected.

Step 3: The LED Pen device

The following pictures(sorry about the quality) are my newest version of the LED pen device, in the picture i have about 6-7 LED's attached but you only need 1 or 2 for extra precision

Materials needed are
3 volt small clock/watch battery x 1
Zip tie x 2
Electrical Tape
Switch with 2 wires coming out of it
LED's x 1/2 (your choice)
Penny x1

Steps for it are:
1) take the + side and face it down
2) put a wire to the switch on the - side
3) wrap zip tie tightly around battery so wire is held firmly, cut off excess zip tie
4) put tape on battery and zip tie
5) place penney on tape making shure it does NOT touch the battery
6 place second wire to switch on penny
7) tightly tie second zip tie in opposite direction than first one and cut off excess
8) place squares of tape on top/bottom
9) insert LED(s) by taking the long end and bending it up a little and then further down bending it down so the two wires a further apart but still even and parallel with each other

and make shure the - side touches the penny and the + touches the + side of the battery and when you flip the switch it should turn on, this is a very easy/compact way of doing an LED pointer for this project
How exactly do you download the files? all i do is click them and it takes me to a blank site thingy and it shows &quot;http://www.instructables.com/files/orig/F2M/35LI/F5HVTEJN/F2M35LIF5HVTEJN.tmp&quot;<br/>
hey whats up? hear you can try my link to the download its downloading for me right now <br/><br/><a rel="nofollow" href="http://www.roborealm.com/d.php?e=carrock19@yahoo.com&amp;k=1934276738">http://www.roborealm.com/d.php?e=carrock19@yahoo.com&amp;k=1934276738</a> <br/>
please dont use my e-mail for anything bad think you and this link works
also teh text in it is 205 0 320 0 TRUE 4 100 1 2 Current Source TRUE -90 0.00 -60 2 TRUE 2 TRUE -1 FALSE TRUE 9 TRUE -1 gui newX 1400 1050 newY...what do i do with this?
Just save that file as a .txt and then after it is done downlaoding hange the extension to .robo
very very nice project 4 stars because i had to figure it out a lil by myself idea for a sweet add on: 4 point calibration :)
The touch one won't register my hand at all. Instead the thing locks onto the backround AND spazzes out I tried putting the thing so it is facing away from the light and my hands would be reflecting the light (night) and it still spazzes out, locked onto a black backround. What is the cause of this? BTW no laser pointer or LED or anything that I could rly use >_>
The camera with IR filter seems to work better because it only picks up light that is escaping from the IR lens.
i dont get how to use the script
the software doesn´t show me anything. only a grey screen. Why is that? and also I can get any signal or movement. please help!!!
OMG I want to do this so badly! Sadly, though, I don't have a glass surface I could use, or even clear plastic... or do I.... Well... I have clear plastic that WOULD be usable.. if it weren't for the dips in it. It is from the Serpent's Spiral coaster set thing and it has some things dipped in to separate the areas. Would this work? I would have to use legos or K'nex to hold it up, but that isn't what I'm asking. Would it work? Also, I don't have a usable red/blue/anything LED. Unless I were to use something rly bulky lol.
send me a picture of what it is your are planning on using and ill tell you how well it can work, and for a LED thing, for a low-cost solution if you want I can tell you how to make a LED light thing with only (2 zip ties, electrical tape, a 3 volt watch battery, a penny and a switch)
I can't do that and here is why. Well I am using my only camera (a PS2 accessory hooked up to my PC) so if I set it up for the pic I can't take it.
That's pretty cool. I was playing around with it and found that my 15FPS webcam just isn't fast enough to be translated over a whole screen. So my idea would be to change it to work like the pad on a laptop. Would that be possible? As it stands I have a 1280x1024 screen, and moving the cursor at a decent rate across the screen takes just a few frames, meaning very rough mouse movement. I actually sped it up a lot by disabling "low light boost" in the advanced tab of the video capture area, but I'd still like more tracking like systems.
i am very impressed with your project, and so i decided to do my version, i have used part of your software in my project a 3d mouse using a web cam. thank-you again for releasing your code as i used it for school :) .<br/>i have posted it here <a rel="nofollow" href="http://laserlife.googlepages.com/project">laserlife.googlepages.com/project</a><br/>best regards <br/>luke <br/>
Hey, I had a great idea for clicking, I am not sure if it would work yet. The Basic Concept: To move the mouse you hold the pen at a certain height. To click you just move the mouse closer to the glass. I think this would be possible. Just thought I would add a little something.
I thought of that when I made this but you have to lift it far up from the glass for there to be a noticeable difference in the size of the blob.
O yeah it would be awkward to have to stand up just to move the mouse Oh well.
could you use a rubber sheet with a grid on it stretched out over the area and have it detect deformations in the grid?
Wow man, that's good thinking. Unfortunately, I don't know how to this. Anyone?
hi when i run the program it only works in the top bit of the screen it wont work the full screen thanks
whadda u mean by,it only wokrs on the top bit,as in it doesnt recognize it if its lower? And are you using an LED to control it?
when i have my screen on 800by600 pixels it moves the mouse on the whole screen but i use mine on 1280 by 1024 pixels it only moves the mouse on the top corner of the screen
in RoboRealm are you using the pen.robo file that i have,or did you make your own file,if you made your own you need to include the VBScript part of the pen.robo file because that stretches the coordinates to fit the screen.
i made my own because i used a blue led insted and i dint no how to change it i had the vbscrip running and it still dint work
Take the one that i have and where it says RGB filter double-click it,a winow will pop up and it will have some check boxes,un-check red and check blue and you will be set,also,you might want to edit the cropping because your camera is most likely set up different.
hey mobilegamer999 i've been reading and i like your idea, i think i've got my head around it. You have problems with your mouse system and i think i might have a way to fix it. If your camera picked up two colours you could put a tri-colour LED in your pen. You could then add an SMD switch into your pen and when you clicked the SMD you would change the colour. The problem is you would have to change your software so you could pick up two colours at once. In the end you would have software and a camera which could pick up two colours at once and a pen (which would still be slim)and would have a tri-colour LED in it and an SMD switch. Hope i can help you P.S. you would have to change your software a bit.
thanks it works fine now great instructable
For the clicking, I'm imagining taking apart a wireless mouse and mounting the electronics and smaller buttons onto this LED-pen. I guess this depends on whether the roborealm software actually replaces the default mouse or whether it works along side it. I'll have to look into this once I move into my new place if nobody else does it first.
That would work well and RR doesnt over-ride the mouse so clicking using that <strong>would</strong> work, heres some pros/cons<br/><br/>Pros:<br/>Clicking(Obvious)<br/>Simple,and intuitive<br/>Could easily be placed for comfortability<br/><br/>Cons:<br/>Probably hard to take apart the mose so that all you have left is the buttons and no movement part without causing some kinda internal error<br/><br/>I wanted to make the thing as smal as possible and putting the mouse on would make large and bulkey,and if you can get it working id love to see pics of it and possibly a vid of it<br/>
Cool idea.<br/>I am definitely going to try this.<br/>I had been looking at something like this for a while but needed software for it and this seems to be the perfect match.<br/>I'm goin to combine this idea with another one I saw on youtube: [url]<a rel="nofollow" href="http://youtube.com/watch?v=yzNh31q61gc">http://youtube.com/watch?v=yzNh31q61gc</a>[/url]<br/>This will hopefully filter out any confusing colors for the camera.<br/>I think the software will have to be changed slightly though.<br/><br/>Thanks for the great instructable!!!!!<br/>
I need help. I can get the program to work, and I can move the mouse, but I can't get it to click anything! Other than that, this is one of the best multi-touch projects I've seen (for the cost: FREE!). Keep up the good work.
Yea,i dont have the clicking part working, once i can get around to finding some tracing paper or actually buying it (im broke)>_<. But once i can get around to getting some i will update the instructable and the files.
this looks cool, i will tr yit. Couple of questions : How did you work out the drawing area size on the glass? Is you "LED pen thingy" just a pen converted to shine light? Is it an infrared LED, or what colour is it? Sorry, I'm a noob at all stuff like this. thanks in advance
The LED pen thing was just made from completely random parts i found lying around my room,The battery holder is made from a tube that held those things u crack and they glow,and it was perfect for AA batteries and i just coiled wire at each end to conect to the terminals of the batteries and i hooked that up to a switch to the LED. and its a red LED but i do have a partial IR filter over the camera lens which relieves all ambient light differences.
ok, thanks so 'll muck around with making a light pen.<br/><br/>So how does it <em>actually</em> control the mouse? <br/>How do I configure the program to do that?<br/>
The program looks for a big red dot and gets the center of it and stretches that coordinate to fit the screen and then sets the stretched co-ordinate and sets it as the mouse position.
What's the program/instruction you're using? I kinda have a semi-working thing, but I was wondering what you'd done. Does the IR filter help a lot, cause I've been using the center of gravity piece/module/thing in the program to move the mouse. ie the mouse modules x and y settings are set to cog_x and cog_y respectively. What does the glass do, other than provide the max possible area and convience for the pen? Lastly, what resolution webcam are you using? ~Istarian P.S. below you said "in RoboRealm are you using the pen.robo file that i have,or did you make your own file,if you made your own you need to include the VBScript part of the pen.robo file because that stretches the coordinates to fit the screen." What VBscript part is that?
A:) Thaks for the intrest B:) The IR Filter makes it more precise,and without the filter if i touch my hand down to the desk my had gets red from the light and that messes it up C:) The glass,on my desk at least, scatteres the light so objects about 4-6 inches above it dont show up(you can simulate this better by using tracing paper which i cant find any even thou i just saw some the other day >_< ) D:)I believe my resolution is 240*360 E:)The VBScriptProgram is found under the extentions categoryr on the left side of RR
Just for kicks, any chance you could like list the parts/modules that make up your pen.robo file and any specific settings they need. I particularly want to know what your doing for making the mouse move, ie what you have to accomplish what you said above, "The program looks for a big red dot and gets the center of it and stretches that coordinate to fit the screen and then sets the stretched co-ordinate and sets it as the mouse position." ~Istarian
The filters are as follows from top to bottom 1:) Average - 4 2:) Crop - Change the values as needed 3:) Verticle Flip 4:) RGBFilter - Change the checks to whatever color LED you have 5:) Blob Size Filter - Cutoff:30,Pixel Area:10,Max Objects:1 6:) Center of gravity 7:) VBScript Program - code is in underlying comment 8:) Mouse - X Coordinate:newX,Y Coordinate:newY
Heres the code<br/><br/>f1x=getVAriable(&quot;COG_X&quot;)<br/>f1y=getVariable(&quot;COG_Y&quot;)<br/>sizeX=(getVAriable(&quot;CROP_X_END&quot;)-5)-(getVAriable(&quot;CROP_X_START&quot;)+5)<br/>sizeY=(getVAriable(&quot;CROP_Y_END&quot;)-5)-(getVAriable(&quot;CROP_Y_START&quot;)+5)<br/>tx1=f1x/sizeX<br/>ty1=(sizeY-f1y)/sizeY<br/>tx1=getVariable(&quot;SCREEN_WIDTH&quot;)*tx1<br/>ty1=getVariable(&quot;SCREEN_HEIGHT&quot;)*ty1<br/>setVariable &quot;newX&quot;,tx1<br/>setVariable &quot;newY&quot;,ty1<br/>
ok, so it needs that big red dot. i need to make sure my webcam is seeing that then. For some reason my webcam is only viewing black and white I will have a play with it. thanks
Hey there! Just saw your instructable and signed up just to post a comment. I think RoboRealm is great. For those of you who are having trouble with noise, I would suggest using a translucent type of glass or plastic. I'm using a translucent plexiglass one and this way only the light from the LED goes through, making it perfect for this application. I'd love to see a version with the mouse click incorporated. I modified it so that it always clicks, but then you can't drag the LED, you can only light it up when you want to click. If you have any ideas or are working on incorporating the mouse click, please let me know.
Oh, and I forgot to add that it would also be great if the mouse stayed in the last position once you remove the light. I found that if it doesn't detect any light the mouse will move to the bottom-left corner of the screen by default. And also, use a blue LED and change the settings so it only searches blue and you won't have any trouble with your skin color. Green works fine too. Anyways, thanks for everything.
Thats a good point, when i get the time ill try to make it so it keeps last position.
hi everyone so what are your feeling about that : easy to set up? good precision? can I use it as "electronic paint system" (graphical palette)? i would try to build mine, but i want to be sure i could work on photoshop with it... really nice instuctable. sorry for my english
I have been fiddling with this today. I have noticed (maybe obviously) you need a realtively fast webcam, I have a cheap one that gives very stuttery results. You also need to have the cam (roughly) focused on your "writing" area I'm not done yet, I will be playing around with this some more, because I love the results I've achieved so far, but I need to build a better set-up. I'm also racking my brains trying to think of a way to include mouse clicks...
Well i did add 1 filter to this that smooths out the movement by averaging over i think its 4 frames,but also it is mostly going slow because it is doing a lot of processing with the image which is slowing it down and i dont know how to speed it up. And if would probably be more precise if it is focused well,but it would be glitchy and it would be less precise but less glitcy if it has not that good focus.
true about the glitchyness with the good focus, which is why I said roughly focused. The reason I realised about this, is from taking my camera apart involved removing the focusing lense. I would be interested in testing a decent quality camera to see the difference. My next task is to build a decent light-pen and then build a robust box build it on, as I dont have a glass desk.

About This Instructable


40 favorites


More by mobilegamer999: Multi-Touch Interface on the cheap(really cheap)
Add instructable to: