loading

UPDATE 04/04/2016 : Multipoint software + Emulating NES video/pictures + OPTION_7 Point and Click + speed test + OPTION video

UPDATE 03/24/2016 : CCD sensor reverse Engineering + Using 2 CCD sensors + Laser engraving vector files + Retropie playing

Hi and welcome to my third Instructable !


I have been reading about DIY touch screen table projects for a while now, and I find most of them very complicated. Often They imply using a videoprojector, reflection mirror and IR camera. The result gives you a complete multi touch screen solution, but you need some depth for the videoprojector to have a big screen. Not the best solution for a coffee table...

I made this tutorial to help people to build their own touch screen solution based on any flat screen TV. It uses light triangulation technology to read the coordinates. This method is quite cheap ( the priciest part is the TV), with a good quality image and you can make the table almost as small and as thin as your TV is.

Of course, nothing is perfect and with this solution it's not possible to build a 100% multi-touch screen and it's hard to cover the entire screen area. But depending on the way you make it you can have some interesting results. Plus, I am sure there are a lot of possibilities I haven't thought about to improve this.

Step 1: How does it work ?

This solution implies the use of light triangulation to read a very precise coordinate. Basically, it's like having a huge number of IR receptors with some IR LED. You turn on every LED one by one and read the sensors. When one receptor can't see any light, it means that an object is blocking the light. With enough LED and sensors you can get a much more precise solution.

But for this project, I was looking for something more suited for the reading. A CCD sensor, is in every scanner. In those devices, it's basically a black and white camera which reads only one line of pixels. To scan a color document, a RGB LED blink in the three colors and the CCD reads all of them for every line of the document. Then it can calculate the exact colors depending of the Red Green and Blue reaction.

Using a CCD sensor gives you access to 2700 light sensors on a 20cm line. Most people who take sensors and actuators from an old printer/scanners only take the RGB LED and the light conductor from this part, as we can see here. If you like recycling, you could examine the possibilities of CCD. Not having found many DIY projects on the internet using them, there are probably a lot of different ways with which you could use these sensors! In this tutorial I will also explain how to hack your own scanner.

For this touch table, I used one CCD sensor with 24 IR LEDs. The object is detected on a 740x380mm surface by a Teensy board (which works under Arduino environnement). This board turns the IR LED ON, reads the CCD and calculates the exact position of an object. Then it sends the coordinates as a mouse, a keyboard, a Python program or just as Serial on a Raspberry Pi which shows the interface through the HDMI on a 32" TV screen.

<p>hi my friend this is actually very interesting usiing ccd as a sensor, but I need your help because I want to hack some scanners to do this instructable and I dont find enough info in this tutorial, could you help me with some datasheets or other diagrams that maybe you have!</p>
<p>Hi, </p><p>That's the complicated part of this project, there isn't much documentation about it. I spent a lot of time on internet, but I couldn't find any datasheet of any scanner brand... That's the reason I had to &quot;reverse engineer&quot; the scanners I use. </p><p>The communication protocol is probably the same on many scanner, but the pinout seems most of the time different. That's why we don't have much choice as using an oscilloscope to read the CCD activity and figure out how to wire it. </p><p>If you have any question, I can help you. But I already posted all the data I have :( . </p><p>Good luck</p>
<p>COuld this be used to say connect to a computer and run windows 10? just curious as my group has a tv we currently use for a digital game mat and we are looking at converting it into a touch screen cheaply.</p>
<p>Yes, the teensy board can be connected to any computer over USB. It just acted like an Arduino board!</p>
<p>I Loveeeeeeeeeeee Arcade Stuff And Just Made A Cardboard Skeeball Machine</p>
<p>haha, I think I would love to add plenty of sensors in this ;-) </p>
<p>So, two ideas, have you looked into these?<br><br>1: since a normal page is twice as wide as the CCD sensor, that means the flatbed scanner had to have a way to warp 8.5 inches of image into a 4 inch strip and then warp it back out afterward. It would seem then that you could use some sort of lenses or something to focus the image of the entire line of LEDs into the 4 inch sensor bar to get a full view of the LED bar.<br><br>2: Seems like putting one of these on each axis (so like sensors on the bottom and right of the TV, LEDs on the top and left) would allow complete multitouch, because the worst case scenario is that you have a right triangle of points, so each axis is missing one point, but the other axis catches it. You'd probably have to halve your speed this way, but maybe not, you might be able to judge the strength of the shadows in each area to do both axes at the same time.</p>
<p>Hi, </p><p style="margin-left: 20.0px;">1. I am not sure I understand what you mean. The CCD sensor I used is 22cm (8.5inch) wide. Which is the size of a standard A4 page. So I don't have any lens here. I could use a A3 scanner to have a larger CCD sensor. But I didn't find any affordable for now :( </p><p style="margin-left: 20.0px;">2. The more I add sensors and LEDs, the more the screen is gonna get close to a good multipoint. But I think if I want to keep the speed, I ll probably need to add several Teensy, one for each CCD. I can probably also move to a faster uC (I think the digitalWriteFast of the Teensy isn't fully functional on high speed transition, that's why it didn't worked with my CCDs), maybe a STM32. </p><p style="margin-left: 20.0px;">I made several test on what would be the best positions with several CCD, maybe it would be the best on two sides,</p><p style="margin-left: 20.0px;">Thanks for your help </p><p style="margin-left: 20.0px;">Jean</p>
<p>awesome this got you victory to 3 contests</p>
<p>Thanks, I wasn't expected to win in the three, so very happy right now :)</p>
<p>But i can bet this project worth winning 5. Really liked your project</p>
<p>Haha, this project already made a lot. Now I have to focus on new ideas for new Instructables :-) </p>
Congrats you've won $4,909.00 worth of prizes...
<p>Thanks!! </p><p>That's gonna be a lot of new materials to play with :-) Can't wait to start new projects!! </p>
<p>gotta say awesome project. i tear apart a lot of electronics always wondered what those CCD sensors might be good for. very clever solution. i might have to dig one out of the junk boxes and play around with one now :D</p>
<p>I am still thinking on building a database of how each of those sensors works. Lets keep in touch of you discover new protocols or hack new brand, so I can add them to the list ;-) </p><p>I have to start thinking of new projects based on those now :p </p>
<p>awesome this got you victory to 3 contests</p>
<p>Great project, well done on winning, good work!</p>
<p>Thanks a lot!! I am really happy and already wondering what to make with this 3D printer :-)</p>
<p>I bet, some serious 3d printer envy going on here! I'll look forward to seeing what you do with it :)</p>
<p>haha, ;-)</p>
<p>What happens if you spill your coffee?</p>
<p>Then having a fitted carpet could be risky :p</p>
<p>Hi, </p><p>The panel of plexyglass has some small border sealed to it. So it shouldn't be a problem :) </p>
<p>thats awesome, so origional (and useful)!</p><p>thanks for sharing!:)</p>
<p>Thanks, a bit struggling right now on improving the multi-point :p </p>
<p><strong><u>THIS IS AN AWSOME PROJECT. EASY TO MAKE</u></strong></p>
<p>This is a fabulous project! A very worthy winner of the Pi contest, so well done for that!</p><p>With regard to speed, I wonder whether you could increase that with a more intelligent scanning algorithm. I haven't given it much though yet but what about a more tree-like scan rather than a linear one. What I mean is, say, turn on LEDS 1-8, followed by 9-16, followed by 17-24. If you see a shadow for one set and not the others then the point is near the left and you only need scan the LEDs from that one group. If you see for all then the point is near the right, so you only need to use a few LEDs to get enough overlap to triangulate the point. </p><p>I reckon you could get equal accuracy with a fraction of the scanning, at least in single-point mode. In multi-point mode it will be more difficult but I still think there are advantages to be had. Processing is fast compared to scanning, so use some analysis to get more value from your scanning time!</p><p>My other thought is that it would be great to do this <em>within</em> the glass . You might need to use visible light (glass does not transmit IR very well), but you could arrange LEDs shining within the glass and the total internal reflection will stop the light escaping except where the surface is touched. You might be able to achieve the same result and actually respond to touch rather than simply breaking a beam in the vicinity of the surface. The CCD is probably more sensitive to visible light anyway and I would bet that it would be less sensitive to ambient conditions.</p><p>Anyway, a fab project and one that I would love to try if I ever get the time.</p><p>Ugi</p>
<p>I was thinking about the scanning algorithm, but as I was developing the multi-point, it was not the good time to implement it. I made an update yesterday using a second CCD sensor to cover the entire screen with less LED. It helped increasing a bit the speed. </p><p>Then I thought about the needs of the application : </p><p>If I want to use a Mouse, I need a precise position, but not much speed. </p><p>If I use a keyboard for an arcade game I need a lot of speed but not much precision to emulate few buttons. </p><p>So I started to adapt like this : Only 8 LEDs with 2 sensors (25 pixels each) seems enough for the Arcade, and 16 with 2 sensors (100 pixels each) for the mouse give me a great precision!! </p><p>About the glass, it is a really good idea. I need to run few test to see if I can &quot;block&quot; the lights this way and about how the glass transmit. I am using IR filter to protect my CCD sensor from perturbation, do you think it's not gonna be possible to use this system with IR LED and filter? don't know much about that :) </p><p>Thanks a lot for your advices, if you need any help for CCD hacking, let me know ;-) </p>
U could use pymouse and then use it as a full time interface rather than just using it for games. I used it once but with a joystick and it shows great promise. And you can use spi or i2c instead of usb
<p>I never used Pymouse, I need to check that! Thanks :) </p>
<p>Its great. And since its the raspberry the possibility are endless. U can even use pykeyboard too. If u want help with it just lemme know. I got a CCD yesterday. Am going to try out your project and see.</p>
<p>I have just updated some CCD sensor hacking if you want to play with those ;-)</p>
<p style="margin-left: 20.0px;">Great, I spent my weekend hacking some new CCD. I will write an update in this Instructable in a day or two to show the results.</p>
<p>Or maybe next weekend, I have to finish the multi-point as well :p</p>
this is why I like instructables.. amazing projects like this.. Kudos! well built , and great instructable!
<p>Thanks, glad you like it :) </p>
<p>I have a really cool idea in mind and I want to know what you think. I'm thinking that you could have multiple CCD sensors daisy-chained so responses from one would look like any other, do you think this is possible? My whole design plan kinda hinges on this concept, but if it's not possible then hopefully I'll find a work around.</p>
<p>Hi, </p><p>You want to have several CCD in Serial? Why not in parallel as most board have several ADC? </p><p>I think your main problem is gonna be the speed. With one sensor you have 2700 light sensor, so several of them would take a lot of time to read.. </p>
<p>I only want four of them, and arranged in such a way that any input from them would look like a single board giving a response. kind of like wiring two buttons to an LED, but no matter which you push the light still comes on. Whether that's considered serial or parallel is beyond me (I don't have much skill in the electronic wiring.)</p>
<p>I think you should just plus the clock and Latch signal on the 4 CCD and read them on four different Analog pin. Then you store all the values on a table and order as you want. </p><p>If I understand well, it shouldn't be to hard ;) </p>
<p>hm... ok, I'll give that a try. thanks a bunch!</p>
<p>Epic work and great result buddy</p>
<p>Thanks! But still a lot to improve ;-)</p>
<p>Nice way to include a touchscreen.</p>
<p>I like using wood, it's easy and always good looking ;-)</p>
<p>Wow! I've always wanted to make/have something like this!</p>
<p>I can borrow you mine if you want :p but you help developing it! ;)</p>
<p>Did you happen to mean, &quot;lend you mine?&quot; And no thanks. I won't be developing it lol</p>
<p style="margin-left: 20.0px;">yes, translation mistake :p </p>

About This Instructable

56,059views

950favorites

License:

Bio: Born in the Alps, I love travelling, paragliding, trekking and, of course, designing projects. :) I learned a lot from open source project on the last ... More »
More by jeanotP1314:Touch Screen coffee table DIY with 32" TV and low cost CCD sensor Where are you? Follow your friends with a design map Emergency Button for 7$, Arduino, WIFI and ESP8266 
Add instructable to: