Introduction: $50 Infrared Touch Surface
Hello, and welcome to my first instructable, an instructable based around building a cheap infrared touch interface that anyone can build, given they are willing to put time and effort into it. In this instructable, I will teach you how to build the touch interface, upload the programs necessary for its function, and show you how to troubleshoot and test it.
The Touch Surface functions like an interactive touch display such as a SmartBoard. This means that when wirelessly connected to a computer, touching within the touch area will move the mouse on the computer. The wireless factor means that it can also be placed within any area it fits in. The interface is also relatively cheap, costing < $50 to assemble. All of the programs are provided.
Update 12/6/ Please vote for this instructable in the contests it is involved in if you find it interesting or at least helpful. Thank you very much.
This is a primary prototype of an interactive touch interface and it is the prototype I have currently entered into numerous science fairs. This is the first prototype and it is capable of responding to touches accurately to a certain degree (you may watch the video attached to this instructable for a demonstration), I am currently working on a prototype with a larger touch resolution and with greater accuracy. I will make another instructable at a later date, teaching how to build the 2nd prototype.
Before getting into the instructions it is important to understand how infrared touch systems work. A quick overview of the function of these devices is as follows. A simple infrared touch system is composed of multiple infrared emitters (led or lasers) and infrared receivers. The purpose of the emitters is to emit infrared light to the receivers, a virtual grid system or similar formed by the emitters and receivers. The grid system is composed of x and y components, made by the receivers. The system is controlled by microcontrollers made by companies such as ARM and ATMEL. In this instructable, we will use Arduino boards as the microcontrollers which are made by ATMEL. The programs running on the microcontroller detect when a touch is encountered by one of the receivers when the said receiver sends a signal. The microcontrollers then analyze the positioning of the receiver and send a connected computer a signal with information on where the touch occurred relative to the screen.
Step 1: Compatibility
Touch interfaces usually require drivers on the PCs they are to be used on, but once this device is programmed, it can be plugged into any computer with a USB port, running any operating system and achieve normal functionality. When changing between computers of different resolutions make sure you install the appropriate file that corresponds to your screen resolution. The files for the different resolution will be uploaded on my GitHub as I get resolution requests. The default program for hub 5 supports x resultion, if your resolution is any different, please feel free to email me your resolution so I can give you the right program for hub 5.
Email: [email protected]
Step 2: Parts List & Requirements
One of my main goals within this instructable is to keep the project super low-cost. With this in mind, I was able to order all the parts that I needed on Ebay for no more than $50. To meet this price point it might be necessary to specifically seek out Chinese sellers for these items, the shipping time is usually 2 weeks. It is also important to keep in mind that it is always good practice to buy a few extra parts (especially for the small components such as resistors).
- Breadboard Male to Male Connectors Ebay
96 - 5mm Infrared Emitters (nm) Ebay
96 - 5mm Infrared Phototransistors (nm) Ebay
96 - k Ohm Resistors Ebay
12 - Texas Instruments Multiplexers Ebay
8 - pin Breadboards Ebay
7 - Breadboard Female to Female Connectors Ebay
6 - Ohm Resistors Ebay
5 - nrf24l01 Wireless Transceivers Ebay
4 - 10uF Capacitors Ebay
4 - Mini USB Type B Connectors Ebay
4 - Arduino Nano v Ebay
1 - Arduino Pro Micro V/8Mhz Ebay
1 - Micro USB Type B Connector Ebay
Step 3: Setting Up Arduino IDE (Build Computer Only)
The build computer is the computer we use to upload programs to the Arduino and calibrate the devices, it can be the same or seperate from the computer we test/use the device on. In order to upload the pre-written programs on the Arduino boards, we are required to use the Arduino IDE. The IDE lets us interface with the Arduino boards, upload programs unto them, and later troubleshoot and calibrate the microntrollers. It is important to mention that the mentioned processes need to only be carried out once, one the computer we will be using to upload the programs onto the Arduino boards. If the computer we test/use the device on is different from the one we use to upload and calibrate the programs, we do not need to install the following programs and drivers.
Downloading the IDE:
We can download the Arduino IDE from the official Arduino website: https://www.arduino.cc/en/Main/Software
After Downloading the IDE, please install and open it.
Installing CHG Drivers:
In order for our computers to interface with the Arduino Nano, we will need to install the necessary drivers, ( the CHG) drivers. The file marked as DCcduino_chdrivers.zip contains the necessary drivers, use an extraction software to extract the files and run Setup.exe in the following directory: ~\DCcduino_chdrivers\CHSER_WIN\CHSER. Now when you plug in your Arduino Nanos they will be recognized by the computer and you can upload programs to them.
Installing Pro Micro in Arduino IDE:
In order to upload the Pro Micro program, we first need to install the Pro Micro in the Arduino IDE.
The instructions on how to install the Pro Micro on the Arduino IDE can be found on the sparkfun website (they are simple and easy to follow): https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/installing-windows
Step 4: Building Required Circuits: Hubs 1 & 2
In order for the programs we will upload onto the Arduinos to function, we need to build circuits for them to interface with. In total there are 5 "complex" circuits in this project (they are not complex to build, the complexity comes from the fact that they are connected to the Arduinos which make them one huge circuit with processors and all sorts of other components). There are 4 sensor hubs and 1 receiver/command circuit. In order to build any of these circuits, we need to use breadboards and the aforementioned components. Each sensor hub uses 2 breadboards, 24 (emitters, receivers, and k Ohm resistors), 1 nrf24L01 module, 1 capacitor, 3 multiplexers, 6 Ohm resistors, and male to male breadboard wires. The images below appear blurry in the Instructables photo viewer, please download them and view them in programs such as paint for clearer resolution, THIS IS IMPORTANT FOR ACCURATE CONNECTIONS.
Building the first 2 Sensor Hubs
The process of building the sensor hubs is relatively the same so I used Fritzing to show the important steps of building as it is relatively straightforward this way.
Hub 1 & 2 Step 1 (refer to annotation on Image):
Connect the Arduino, multiplexers, nrf transmitter, capacitor, resistors and emitters in the same fashion as the one below. Be Make sure your connections to the Arduino are the same as the ones in the images.
Hub 1 & 2 Step 2 (refer to annotation on Image):
Connect the Infrared Receivers, and kOhm resistors onto the second breadboard and make the necessary wire connections as depicted in the images. The emitters are bright blue because Fritzing didn't have the right dark blue color that the nm receivers arrive in.
Hub 1 & 2 Step 3 (refer to annotation on Image):
Connect 8 infrared receivers to their respective positions on the multiplexers by using a wire from the pin between the resistor and receiver, going to the multiplexer. The connections are clearly depicted on the images.
Hub 1 & 2 Step 4 (refer to annotation on Image):
Connect another 8 infrared receivers to their respective positions on the multiplexers. The connections are detailed on the images.
Hub 1 & 2 Step 5 (refer to annotation on Image):
Connect the remaining 16 infrared receivers to the remaining 2 multiplexers. Make sure the connections for each set of eight receivers is similar to the way the first 8 were connected (which is detailed in the images for steps 3 and 4).
Step 5: Building Required Circuits: Hubs 1 & 2
Hubs 3 & 4 are nearly identical to hubs 1 & 2 in the way they are built but there are some subtle differences you may not have noticed while comparing the images for the two different types of hubs. The receivers on hubs 3 & 4 have different connections on the multiplexers. The grey, white, and orange lines on the multiplexers also have switched positions. Please pay attention to these subtle differences when building the 3rd and 4th hubs, failure to do so will result in circuits that do not correspond to the programs on the Arduino.
Step 6: Building Required Circuits: Hub 5
So far we have built the 4 sensor hubs that will send information to the receiver hub, now we have to build the receiver hub. The receiver hub has the most simple circuit out of the five as it requires only the Arduino Pro Micro V/8MHz and the only nrf24L01 module left. The included image shows how to build the circuit, we can use the female to feUsemale breadboard pins to directly connect the nrf24L01's pins and the Arduino's pins. We do not need a breadboard.
Disclaimer: This image of the pro micro hooked up to the transceiver module was not created by me, it is from the following forum: https://forum.mysensors.org/topic//pro-micro-h
I apologize, I could not make the image as there is no Arduino Pro Micro within Fritzing software.
Step 7: Uploading Programs
Now that we have successfully built our 5 circuits (4 sensor hubs, and 1 receiver hub) we will need to upload programs to the different hubs. It is important to note that each hub receives each own program. The code for each one of the hubs can be found on my GitHub page: https://github.com/Ultimatefire54/Arduino-Infrared
Please download the zipped folder and unzip it, then follow the instructions below to upload the instructions below to upload the programs onto the respective hubs. The hub programs can also be downloaded directly from the instructable.
Plug all of the hubs into your computer using their respective USB connectors (Mini USB for Nanos and Micro USB for Pro Micro) and open up the Arduino IDE. Open up device manager as you plug in the hubs and note which hub is assigned which COM port.
Move each one of the "Hub.ino" files we downloaded into their own folders of the same name (in total there should be 5 folders now).
Open each one of the "Hub.ino" files using the Arduino IDE and select the board (Arduino Nano) and COM Port of the hub you want to upload the respective program on first. You may then upload each respective hub's code onto its hub, except for Hub 5. Hub 5's program requires us to select the Pro Micro from the Boards Manager (be sure you select the right version which in this case is the V/8MHz version).
Step 8: Calibrating and Operation
Now that the programs of each hub are uploaded, we can calibrate the Hubs and start the testing. The programs that I wrote for each hub have a debug mode that can be accessed through the Arduino Serial Monitor. The Serial Monitor allows for the program to output data from the microcontroller it is connected to, effectively giving us a debugging tool. The program has been written to accept specific commands for specific functions such as calibrating, resetting, and other debugging functions. In this step, we will cover only the commands necessary to calibrate the hubs properly and have them function in the way an infrared touch interface would.
Arrange the Hubs so that they form a square formation. Looking on one side of the square, the bottom-left hub should be hub 1, on the bottom-right hub should be hub 3. The top-left hub should be hub 2, and the top-right hub should be hub 4. Throughout the following steps make sure that hub 5 is plugged in.
Lining Up Sensors:
In order for the main hubs (hubs ) to receive information from their sensors, the sensors must be lined up correctly with emitters from some other hub. In order to test whether the hubs are lined up, we can use the Serial Monitor tool within the Arduino IDE. After opening up the serial monitor of a certain hub we can check to see if the sensors are aligned by typing the letter "n" in the serial window and pressing Enter. If all of the values between are above the value of 50, the emitters are aligned with the receivers. If not you may adjust the position of the receiver or emitter hub to receive full coverage.
After we have confirmed that all of the receivers on hubs have full coverage we can then calibrate the programs on each hub, by entering the letter "a" into the serial monitor of each hub and pressing Enter. The receivers are now calibrated, but we now need to filter out shadows from the operation of the hubs so we send the "r" command and create as much shade over the 4 hubs to set a base light level. During the "r" operation, do not make any touches within the touch area until a data stream starts to flow from the serial monitor. After all of these steps we are ready to connect the 4 hubs to the 5th hub.
The 4 primary hubs send information wirelessly to the 5th hub so the hubs do not need to be connected to the same computer. Now that you have calibrated the hubs please E-mail me the screen resolution of the PC you plan on using the touch interface on to control the cursor. my email is: [email protected]
Step 9: Contests: Arduino, and First Time Author
This Instructable has been entered into the following Instructables contests:
Please Vote for this Instructable in the categories it is competing in, this really helps me out a lot.
Be the First to Share
Did you make this project? Share it with us!
Retro Tech Challenge
Made with Math Contest
Ever wanted to build a touch table or other touch-input project, but got stuck figuring out the touch part? [Jean Perardel] has your back with his multi-touch frame over on IO that makes any surface touch-reactive. In [Jean]s case, that surface is ultimately a TV inside of a table.
Of course, its a bit of a misnomer to say the surface itself becomes touch-reactive. Whats really happening here is that [Jean] is using light triangulation to detect shadows and determine the coordinates of the shadow-casting object. Many barcode scanners and consumer-level document scanners use a contact image sensor (CIS) to detect objects in the path of IR LEDs. These are a low-power, lower-resolution alternative to the CCDs found in high-grade scanners.
As [Jean] explains in the video below, an object placed in the path of a single IR LED facing a sensor array of either type will block the light from reaching the sensors. Keep adding LEDs and their emission angles will begin to overlap, increasing the detection precision. [Jean] reverse engineered a couple of different types of scanners until he found a suitable one. He ended up with CIS that has light sensors lined up in the space of 20cm ().
[Jean] designed a 3D-printable frame to hold 96 IR LEDs in stacks of three. A Teensy turns on the LEDs, detects the touch event, calculates the position, and sends those coordinates to a Pi to be displayed on the screen. He eventually went wireless and then built a nice looking touch table to house a 32 TV.
This is not the only way to build a multi-touch table, nor is it the simplest. Heres one that uses finger presses to scatter light and an industrial strength projection-based table that was open-sourced a few years ago.
Infrared Touch Frame (Total 24 Products)
Light-resistant design ,and support single and muilt touch points,widely use to financial telecom service,Adverstisement show,Industrial control ,public query ,self-service,E-education ,and games etc aera.Ultra-thin, ultra-narrow design, no matter whether it is external or built-in, it can adapt to various needs without affecting the appearance and saving built-in space. Infrared sensing principle, simple finishing, LED die, stable performance, high touch precision and long life.The unique installation method makes the installation of the client a breeze.The surface of the aluminum alloy is sprayed and oxidized, and the whole is delicate, simple, generous and multi-touch. Simple operation, USB connection, plug and play.
ir touch frame diy 84 Inch Infrared Touch Frame , TＢ Series multi touch screen frame
- 10/16/20 multi touch point
- x Resolution, USB Interface
- Withstands severe environments
- Stable, no-drift calibration performance
- Material is tempered glass with high light transmittance
- Finger, gloved hand and touch pen activation
- Operable in various light conditions, indoor and outdoor
- Our products have passed CE, FCC, ROHS certification!
Product Model number
|Model number||Ratio||Outline(mm)||Active Area(mm)||Thickness(mm)||Touch point|
|Touch Screen Size||84"|
|Touch Activation Force||No pressure required|
|Luminous Transmission||>92%(% with no glass)|
|Reported Touch Resolution||Without Driver: *|
|Touch Response Time(Multi touch)||ms|
|Touch Response Time(One touch)||7ms|
|Minimum Recognition Point Size||4mm*4mm|
|Touch Object Size Recognition||Yes|
|Interface||Socket type USB cable m, socket type 5P|
|Touch Refresh Rate||≥ Hz|
|Communication||USB Full Speed|
|Working Voltage||DC V±5%|
|Power Cunsumption||≤ W|
|Fault-tolerant||Able to work if less than 10% non-consecutive sensors are damaged|
|Humidity||Up to 90% RH from 0°C to +40°C, non-condensing|
|Temperature Range||Working temperature℃～50℃|
|ESD||EN level.4KV contact discharge and 8KV air discharge|
|Firmware Upgrade||USB Upgrade: Windows 8,Windows 7|
|Support OS(Multi touch)||Windows10,Windows8,Windows7,Andriod|
|Support OS(One touch)||WindowsXP,MacOS.Linux|
- Gaming device
- Education training
- Pubic query machine
- Self-service machine
- Map directory
- Any interactive machine
- And more
Infrared touch screen is to use a dense matrix of infra-red x, y directions to detect and locate the user's touch. Infrared touch screen installed in front of the monitor box outside a circuit board, circuit board arranged on four sides of the screen infrared led and an infrared receiver and corresponding anyway cross the infrared matrix.
When users touch the screen, fingers will be blocked anyway after the location for both infrared and therefore can judge the position of the touch points on the screen .it can detect essentially any input including a finger, gloved finger, stylus or pen.
Frame touch diy infrared
Hi everybody !
I'm working on building my own IR touch frame, for those who are wondering what is it, let's check for PeauProductions products :
I have been working for few days on some solutions and I would like to show you what I want to do The main question is "Will this mess work ?" I am not an expert so feel free to tell me things that are going wrong. Instead of asking you a question without any context, I will try to show you my reflexion, maybe that could help
(And I'm sure you've already guessed that english itsn't my first language :p)
So take a cup of tea or coffee and let's go !
An Infrared touch frame is based on an array of IR Leds and photodiodes (or phototransistors but I'm currently working with photodiodes) forming a grid, when a person touch the screen, he stops the IR flow horizontaly and verticaly, puting some diodes in the shadow, we can then compute the actual position of the finger on the screen.
My frame is a 64*64 points touch screen, that means 64 IR leds facing 64 photodiodes verticaly and another 64 IR leds facing 64 photodiodes horizontaly. The microcontroller is an arduino micro acting as a HID device.
This projet has many concerns, basically the IR leds draw mA EACH ! So the deal is to power them one by one and to check the facing photodiode(s).
This post isn't about powering the IR LED but about dealing with the photodiodes (and reading values !!!)
Let's start with one photodiode, so easy, here is the basic usage schema of a photodiode (thank you the internet)
Yeah ! It is mount "reversed", basicaly, as light hits the photodiodes a reverse current flows into it. So the more light hits the photodiode, the more current can flows and the voltage of the photodiodes changes (and the resistor too).
The A0 wire is connected to the A0 pin of an arduino, I have already tested this design and it works :-)
Oh and the photodiodes I am using are BPN10NF from Vishay.
As mentioned before, there is photodiodes, 64 on the vertical side and 64 on the horizontal side. Lets focus on one side only, so 64 photodiodes, 64 times the previous schema
Hum No !
It is pointless to measure the 64 values (and to power on the 64 photodiodes) "at the same time". Let's remember that there is only one IR Led ON, I could measure only the facing photodiode, I will actually measure the one facing and some adjacent photodiodes to increase precision. Let's say 8 of them ;-)
Actually, I will power on 8 photodiodes and read their value using a demultiplexer like the CDBE.
So basicaly, a PNP transistor is controlled by the Digital Pin D5 of the arduino, by puting D5 to LOW the transistor will let the current flow and power on the 8 photodiodes (there might be one resistor missing between D5 and the base, true ?) The transistor hasn't be choosen yet, so don't considerate its name.
The DEMUX is controlled by the arduino through D2, D3, D4 and the value of each photodiode is read on A0 (obsviously not exactly at the same time but the DEMUX and the Arduino are fast enought to get something interesting).
The transistor seems to be useless but it is not Let's imagine I would like to measure 8 more photodiodes, I could duplicate this schema or I can try something like this :
Lovely isn't it ? The deal is to wire up 8 others photodiodes in parrallel with the first ones and to "switch on" only one transistor to read the value from the photodiodes wired to it.
! AND HERE IS MY QUESTION !
???? DOES IT WORK ????
I have a massive concern about potential current leaks For instance if I power on the second line of photodiodes (D9-D16), is there any risk of a current leak to D1-D8 photodiodes ? And how the other transistor will react, will I break it ?
If the answer is NO, IT WON'T WORK it is useless to go any further
If the answer is YES, IT WILL WORK ! The next step is to use 8 lines of transistors wired to 8 photodiodes each, and here we go ! 64 diodes on a single Analog In on the Arduino !
Of course I won't use 8 Digital Out pins to control each transistor. Instead I will use another CDBE (or maybe a stronger one) but this time as a MULTIPLEXER to ground the required transistor's base with only 3 Digital Out of my arduino.
Here we are ! It is such a long post, I know But I hope you could help to make it real !
Thx a lot !
diy infrared touch screen
1 Piece(Min. Order)
65" IR Multi touch Overlay /screen with 6 Points for multi-display in sale, advertising, presentation Without glass Dual touch ,4/6/10/16points touch can be optional USB interface ,plug and play 1. Don't need a card, or any other controller , Plug and play 2. Sun readable 3. A single USB power supply, power supply and communication share one USB cable 4 . Ultra-thin,Ultra-narrow % - % light transmittance 6.Multi ir touch screen frame can Support 2/4/6/10/16 touch points 8. Stable and reliable performance,Long service life, 9.Suitable for vertical and horizontal screen installation Gloves, touch pen, finger can touch Strong adaptability,no interference on current, voltage & electrostatic, adapt various environment Good stability, no drift , not drift with time and e nvironment Water-proof vandal-proof dust-proof Datasheet MECHANICAL P/N C IL series Overlay Thickness mm (Including 4mm Thickness Glass ) Overlay Frame Width mm Housing Aluminum frame TOUCH CHARACTERISTICS Input Method Finger or touch pen Touch Points NA2= 2 Touch Points,NA4= 4 Touch Points, NA6=6 Touch Points NA10=10 Touch Points,NA16=16 Touch Points Touch Activation Force Non Minimum activation force Position Accuracy 1 mm Resolution (W)&times;(D) Response Time Touch: 6 ms Drawing : 6 ms Cursor Speed dot/sec Glass 3mm glass Transparency : 92% Object Touch Size &ge; &Oslash; 5 mm Touch Intensity Over 60 millions single touch ELECTRICAL Operating Voltage DC V ~ DC V Power W (mA at DC 5V) Anti -Static Discharge (Standard :B) Touch Discharge,Grade 2:Lab Vol 4KV Air Discharge,Grade 3:Lab Vol 8KV ENVIRONMENT Temperature operating &deg;C ~ 6 0 &deg;C storage&deg;C ~ 7 0 &deg;C Humidity operating% ~85% storage:0%~95% Relative Humidity 40 &deg;C,90% RH Anti &ndash; glare Test Incandescent lamp (V,W) , operating distance over mm Altitude 3,m Interface USB Download " CINAP-3K1 x x x Download 17" CINAP-3F2 x x x Download " CINAP-3K1 x x x Download 19" CINAP-3F2 x x x Download 19" CINAP-3K2 x x x Download " CINAP-3K1 x x x Download 22" CINAP-3K2 x x x Download 23" CINAP-3K1 x x x Download " CINAP-3K1 x x x Download 24" CINAP-3K1 x x x Download 24" CINAP-3K2 x x x Download 26" CINAP-3K1 x x x Download 27" CINAP-3K1 x x x Download 32" CINAP-3K1 x x x Download 32" CILAP-K1 x x x Download 37" CILAP-K1 x x x Download 39" CILAP-K1 x x x Download 40" CILAP-K1 x x x Download 42" CILAP-K1 x x x Download 42" CILAP1-K x x x Download 46" CILAP-K1 x x x Download 47" CILAP-K1 x x x Download 48" CILAP-K1 x x x Download 50" CILAP-K1 x x x Download 52" CILAP-K1 x x x Download 55" CILAP-K1 x x x Download 58" CILAP-K1 x x x Download 60" CILAP-K1 x x x Download 65" CILAP-K1 x x x Download " CILAP-K1 x x x Download 70" CILAP-K1 x x x Download 75" CILAP-K1 x x x Download 82" CILAP-K1 x x x Download 84" CILAP-K1 x x x Download Trading Info Trade Terms: FOB, CIF, EXW Payment terms : T/T, Western Union, PayPal, L/C, MoneyGram. Payment Condition: 30% deposit in advance, 70% balance after delivery at best Delivery Time: working days after deposit for sample ,others depend on quantity Packing: Neutral Carton, Wooden case for large size ,Batch goods with Pallet Shipping: By sea, by air and by express delivery Warranty and qualification 3years warranty for IR touch screen Other produce line of CJtouch
- Eso mercenary staff
- 2012 toyota camry
- Vent a hood motor
- Watch street outlaws
- Patriot auto sales anchorage
- Baseball clip art
Magic Frame : Turn Everything into a Touch Area
Of course, nothing is perfect and with this solution it's probably not possible to build a % 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. ;-)
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 CIS sensor, is in most 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 CIS 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 CIS sensor gives you access to 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 CIS. 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 CIS sensor with 24 IR LEDs. The object is detected on a xmm surface by a Teensy board (which works under Arduino environnement). This board turns the IR LED ON, reads the CIS 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.
View all 7 files
- 1× Raspberry Pi
- 1× Teensy 3.X
- 1× CIS sensor From a scanner
- 20× Led IR
- 1× TV Any type
View all 6 components
Project Logs Collapse
Magic Frame V3 is ready !jean.perardel • 10/21/ at • 0 comments
The Magic Frame V3 is now printed and assembled.
The 3D design has now 8 LED row per piece of 13cm. Each row has 3 LED so 24 LED per piece. Which is 32 * 3 = 96 LED for a 52cm frame.
Here is the schematic :
And the schematic of the Bluetooth / HID central
I didn't had much time to solder it and build a 3D printed box. This will be for later ^^
Now wireless with Bluetooth and Lipo Batteryjean.perardel • 10/16/ at • 0 comments
It's nice to have frame on your wall with a photo or painting. But to be really discret and easy to integrate, we don't want to have a black wire going away from it.
The new version of the frame now embed a mA Lipo Battery and a NRF24L01+ multi-pair bluetooth module. Now, we can get rid of the annoying micro USB cable!
The reception is made by an Atmega32u4 board wired to a computer with a USB port.
The particularity of the Atmega32u4 on the Arduino Micro board is to be able to act as an USB HID device and/or a serial port. This mean we can send some Keyboard keys, mouse position or CDC serial data.
The original program of the Magic Frame on the Teensy board also gave the possibility to act like a HID or CDC, but now we can also do it wirelessly ;-)
Magic Frame V2 printed and wall mountedjean.perardel • 10/16/ at • 0 comments
A lot of printing hours later
Here are 2 of my LED frame elements plugged in. I added the IR LED and the driving circuit.
I only added 1 LED per line (except on the seventh one, there are 3) because it's enough for the first frame size I want to build.
I also drew a roof for the element to hide the wires and circuit.
And now, the frame complete. There are actually only 4 elements at the top and bottom, but they are a bit larger.
We can see the round rotary button under the word frame. You can increase or reduce the CIS's sensitivity with it.
I am really sorry This assembly is a mess!
That's one of the reasons why I've I immediately started to drawing a Magic Frame V3 :-p
Magic Frame V2jean.perardel • 10/16/ at • 0 comments
The idea is to build an adaptable frame inspired by a jigsaw puzzle. Any size screen can be made just by adding more elements and by increasing the infrared LED power.
Here we have a "LED element" ready for 3D print. Several elements can be plugged into each other to create two emitting frames. The 5 small holes lines are for the LEDs. You can fit 3 LED per line to increase the emitting angle and the power. So this element can have 15 LED in total but it's only a 5 LED detection.
Here is a CIS element. As it's 26cm (inch) large, It's printed in two parts to fit into an Ultimaker 2.
The corner of the frame to hold the structure and insert a screw for a wall mounted use.
The last corner integrates the control board with most of the elements :
- A battery for wireless autonomous application
- The Teensy control board
- A rotary going through the hole. It controls the sensitivity of the CIS sensor.
- 6 WS RGB LED. As this element is printed in white. The LED gives a color to all of the enclosure. It will also help with calibrating.
Here is the frame with all the elements. At left and at the top, we have 10 LED elements so 50 LED. At the bottom and on the right we have 6 CIS sensors.
This will make an almost perfect multitouch screen!
Video of my new hacked CIS sensor ^^jean.perardel • 10/15/ at • 0 comments
As I was saying on my last log, here is the video of the CB I hacked. It took me a while, because there isn't any information about it on the internet
Now lets add it to the touch frame!
New CIS sensors bought on internet, let's HACK!jean.perardel • 10/15/ at • 7 comments
As I was saying in a previous post, I bought some CIS sensors on Ebay.
I have already hacked several sensors I found directly in old scanners, but this method is really time consuming and you never really know what kind of sensors you will find!
So I wanted to find a more "generic" CIS sensor, and this wasn't easy I ended up buying on Ebay some sensors with the wrong references and no datasheet.
When I received them, it was the start of a very long day
I started with some internet research, all the videos and blogs with people playing with CIS sensors (on their oscilloscopes most of the time). I couldn't find any information about those references.
From left to right : CIS front sensor with a cover, CIS back sensor with a cover, CIS front sensor without a cover
I started with the CB I bought two of them, so I removed the circuit of the first one to have a better visual access to the lines. This sensor has 14 lines and you need a flat flex scanner cable (you find some in every scanner) and a ZIF connector to build an interface board more easily.
From left to right : CIS sensor, Flex cable, ZIF connector interface board, breadboard interface, Teensy
I was able to identify :
- GND on Pin 6 and 8,
- LED pins on Pin 11 to 14
- VCC on Pin 2 and
That's a good start, but still 6 Pin left for the :
- Analog output
- Differential lines?
- Maybe others if the protocol is different
Then, I compared them with some CIS I used to hack and I discovered that CIS from the brand HP had the same Pin so far. Interesting! But at that time (2 years ago!) I couldn't make it work Here is the informations I had :
- Analog output on Pin 1
- Latch on Pin 5
- Clock on Pin 9
- Still no idea for the other lines
Second step, I found an old HP scanner and opened it. And this was an amazing moment : the same plastic package, and it looked as throught it was the same Pin from the one I had so far!!
So I wired my CB CIS sensor directly into the flex connector of the mother board, and I could see the outputs of the CIS on line 1.
Here is the exact configuration :
- 1 Analog output
- 2 VCC (5 volts, but works with )
- 3 VCC volts
- 4 GND
- 5 Latch
- 6 GND
- 7 differential signal (opposite to the clock)
- 8 GND
- 9 Clock
- 10 VCC
- 11 - 14 RGB LED
A few lines of code on the Teensy board, and now you have a new sensor to play with!!
The blue signal is the Latch (to help to synchronize), the yellow signal is the analog output. You can see 4 rounded peaks very close to each other, on the yellow signal, it's my 4 fingers. ^^ I ll upload a video soon!
I actually damaged one one of the two CB, some pixels don't work anymore But I still have one more sensor, and also the possibility to order more!
I haven't yet succeed at hacking the CE Here is what I can say about it so far :
I need to work a bit more on this. I ll keep you posted! ;-)
Too many LED, lets add a driver!jean.perardel • 10/15/ at • 0 comments
I am currently working on a new frame to make the project more adaptable. As I don't want to have too many wires to solder on my Teensy board. It's probably now time to move to LED drivers.
Several years ago, as I was building some LED Cubes, I used to play a lot with STP16CP05 a lot.
Those driver are very easy to use and program. Moreover, they can drive 16 outputs and you can add as many STP as you want in serial (exactly like the WS RGB LED system).
To make it work,
- add VCC ( or 5V) and a ground with a 10uF capa between them.
- Set the OE/DM2 to ground
- Add a resistor between R-EXT and the ground (the value depends on the output current you want, see the datasheet)
- And wire the SDI, CLK and LE signal to your control board.
- To add a second driver wire the SDO to the SDI of the second one!
You can find a test code on the GIT of the project.
Increase the system speed by x with a Teensyjean.perardel • 10/15/ at • 0 comments
I received a Teensy this week to replace the I was using. I have to say, Paul Stroffregen has done an amazing job again!
The package, is maybe a little too big, as the board has a micro SD slot embedded in it and many IO. But here are some comparison from the website OpenAudio.
It's not on this list, but the Teensy can be overclocked at MHz which makes it two and half times faster than the Teensy I was using. I can easily double the number of LED or read twice as many pixels and still be more reactive! :-)
CIS or CCD ?jean.perardel • 10/04/ at • 0 comments
There are two types of sensor in a scanner. The one I mainly used is actually a CIS (Contact Imaging Sensor) and not a CCD (Charged Coupled Device). You can either, but CCDs are really small. To cover a large screen, it's easier to use a CIS.
I've actually mistaken CCD and CIS on the video, I will change it soon
I ordered several CIS sensors from "ON SEMICONDUCTOR" on Ebay :
-> The CE which has sensors on mm
-> The CB which has sensors on mm
If they work well, it's going to be a good start for building a screen frame.
This website is really insterresting in helping you understand the differences.
New video is online!jean.perardel • 09/27/ at • 0 comments
I've just finished my new video!! Hard work ^^
It explains everything you need to know to understand the project. I tried to make it as funny as possible :p
View all 11 project logs
Build Instructions Collapse
When I am working on a project, I like to build things that are the most cost efficient possible but still of good quality. So even those on a tight budget can afford to build their own. It's hard to give the exact amount of money spent, as many things are second hand or from the tip. Here is an approximation :
- Raspberry Pi (41$). I built my project with a Pi 2, but the B+ should also be fast enough.
- Teensy 3.X (20$). I love building projects with my Arduino UNO. But the specifications of this tiny Teensy board are really crazy! (32 bits cortex M4, 72MHz, K Flash, 64K RAM, 34 digital PIN). I think it's very useful to keep one at home. If one of your projects needs more PIN, more memory, more speed or just needs to be smaller, you can easily switch as it's fully Arduino compatible! Just install the Arduino plug-in and keep developing! The only little thing you have to be careful of is the access to the button to reprogram. I had to wire an external button when the table was built and I still needed to calibrate and debug.
- The CIS sensor. You can easily get one from any old scanners which can be found everywhere. Or buy one on Ebay
- LED IR ($). I used some nm.
- The TV. It's hard to give a price, mine is a LG 32" that I bought second hand for 80$.
- Computer Fan. You can find some in most old computers, you don't need to buy one.
Some parts can be a bit difficult to solder, I recommend having a good soldering iron. At home I have been using a WS81 from Weller. A bit expensive to buy but it's precise and you can keep it for 20 years ;-)
The wooden box and table :
This part is gonna depend on your TV screen. This is for my 32" LG TV :
The TV box :
- 2 panels of MDF wood 10mm for the sides : x mm
- 2 panels of MDF wood 10mm for the sides : x mm
- 1 panel of MDF wood 10mm for the top : x mm
- 1 panel of MDF wood 3mm above the top : x mm
- 1 panel of Pine wood 18mm under the TV : x mm
- 2 large Framing lumber supporting the TV : 37 x 54mm (mm long)
- Small Framing lumber to ease the screw 15 x 20mm
The Table under :
- 1 panel of MDF wood 18mm for the top of table : x mm
- 1 panel of MDF wood 10mm for the layer under the table : x mm
- A very large framing lumber for the table's feet 37 x 54mm, mm long(2 for each feet)
Approximate cost of the wood 70$
I also used a Trotec laser cutting machine to engrave some characters on it and to cut several small parts of the wood. You can rent it for 25$ an hour from the Fablab next to my place. As I often help them on electronic projects I can sometime have it for free :-)
Touch detection :
- 1 Plexiglass 5mm for the support : x mm
- 2 Plexiglass mm, x 12mm
- 1 Plexiglass mm, x 12mm (protecting the sensor)
- 1 Plexiglass 5mm, x 12mm (with the LED on it)
- 8 mirrors x 15mm (approximately as it's hand cut)
- To create a IR lighting paper filter I combined a primary red paper filter with a congo blue paper filter
- black masking tape
- CIS Reverse engineering Part 1
As Wikipedia is way better than me on explaining :
"Contact image sensors (CIS) are image sensors used in flatbed scanners almost in direct contact with the object to be scanned. Charge-coupled devices (CCDs), often used for this application, use mirrors to bounce light to a stationary sensor. CISs are much smaller than CCDs, use typically a tenth as much power, and are particularly suitable for low power and portable applications, often powered over USB.
A CIS typically consists of a linear array of detectors, covered by focusing lenses and flanked by red, green, and blue LEDs for illumination. The use of LEDs allows the CIS to be highly power efficient, allowing scanners to be powered through the minimal line voltage supplied via a USB connection. CIS devices typically produce lower image quality compared to CCD devices; in particular, the depth of field is greatly limited, which poses a problem for material that is not perfectly flat. However, a CIS contact sensor is smaller and lighter than a CCD line sensor, and allows all the necessary optical elements to be included in a compact module, thus helping to simplify the inner structure of the scanner. With a CIS contact sensor, the scanner can be portable, with a height of only around 30 mm. CIS is both a key component of, and widely used in, scanners (especially portable scanners), electrographs, bar code readers and optical identification technology."
Basically, the CIS you find in a scanner doesn't read lights in two dimensions, but on one line. With the one I tried, there are different light detectors that we can use as pixels on a X position.
As I couldn't find any tutorials explaining how they work on the internet, I tried to understand the logic by myself. I started by taking a printer scanner from the trash and opening it. Please be very careful with these devices, they use V! Don't do it if you are not sure of what you are doing. Always manipulate them when it's not plugged in and isolate any high power part.
By visually checking all the lines going from the control board to the CIS you can try to identify the 4 lines controlling the RGB LED, they are generally located at the extremity of the CIS board. With a multimeter, you can check where those lines are going on the communication flex.
Then you can check if some lines are bigger than others (it's probably going to be the power and the ground, you can verify which one it is with your oscilloscope when the power is ON). Plug an oscilloscope between the other lines and the ground to understand what they are doing.
I tried two CIS sensors from different brands and they where both using the same communication protocol but not on the same "line order on the flex". When I turned the scanner ON, I could see some data passing. It means that the device was probably testing the sensor when it is turned ON.
- One line was giving a perfect square signal, I deduced that it was a signal clock.
- One signal was turning ON and OFF at the beginning of the clock transmission, it's the Latch signal
- one signal was sending a lot of analog value. Those values changed when my hand was next to the sensor. It is the values from the CIS.
So I made a test program the on a Arduino UNO board. You can download it at the end with the project.
With this, you can read on the serial port 16 average values (I call them pixels) of light sensor on the sensor, so almost the total. Just plug in the lines as explained at the beginning of the above file on any Arduino board and read the data on the serial monitor.
- CIS Reverse engineering Part 2
Last week, I was trying to find some solutions to improve the cover of the detection area. To do this, I wanted to have a second sensor to test new configurations and speed. So I went back to the tip and I took several printer/scanner from different brands.
I was a bit frustrating to discover that some scanner have a different kind of sensor. No need to open the entire device, they are pretty easy to recognize, as the black plastic package is way bigger (picture 1). Inside, they have a way more complex mirror architecture, a lens and a very tiny sensor: A CCD! I will try to hack those one to see the possibilities soon, but for now, I needed another "normal" 22cm CIS. So I moved on!
Second printer I opened was from EP*** brand (Picture 2). The flex connection had 12 lines on 5V :
- 1 Analog OUTPUT to 4 are big lines easy to identify for the LED
- 2 (large) VCC? 5 (large) seem to be VCC
- 3 GND 6 GND
- 4 (thin) has a square signal with a ns period, the clock!
- 5 (thin) has a short square signal every 20us.
- 6 (thin) has a short square signal every 20us, another latch?? the latch.
- 7 (GND)
- 8 VCC
- RGB LED
After few hours of test, I couldn't find the good protocol to have the OUTPUT response. Even when the CIS was plugged in the scanner, the analog wasn't giving any clear response (on startup test as the printer was then reporting an error).
So I moved on to a third printer from H* brand. The flex had 14 lines on V :
- 1 The analog
- 2 VCC
- 3 GND but not linked directly to the other GND
- 4 VCC but not linked directly to the other VCC
- 5 A latch every 40us
- 6 GND
- 7 ?
- 8 GND
- 9 CLK (clocking every ns)
- 10 VCC
- 11 - 14 RGB LED
I could access some PAD from the different line (picture 3). After a bit of testing I succeed to have a clean answer on the analog line (pictures and explanations 4 and 5).
The CIS I was using since the beginning is from CA*** brand. Here are the lines :
- 1 Analog
- 4 VCC
- 5 ?
- 6 Latch
- 7 Clock
- 8 ?
- 9 - 12 RGB LED
View all 16 instructions
Enjoy this project?Share
Very interested in DIY a touchscreen table/monitor. I came across a Youtube channel "
PeauProductions." The guy introduced 5 different ways of making a touchscreen screen. It's been 10 years based on the comments in YouTube and there was no more updates anytime soon this year, seems like they're in productions now.
Do you happen to know what that channel was about?
Are you sure?yes | no
I have two hp cis sensors. I haven't got an osiloscope. What is the best way to locate what pin goes where please. They look like 10 pin sensors.
Are you sure?yes | no
If you double the CIS sensor bars and LEDs to completely surround the frame, switch between opposite pairs of LEDs and CIS bars >50hz, you can probably also use the RGB LED functionality to create "notification lights" - or possibly even do pointer color detection of somewhat reflective pointers
Are you sure?yes | no
How fast could this detect and triangulate? For example, if I were to send a bullet through the frame, would it detect? Or is it too slow for that? Just trying to think of more fun ways to draw :)
Are you sure?yes | no
Have you tried make the teensy into a usb HID mouse for faster input than serial? I would love to use a dual CIS set up on my 49 inch TV as a mouse.
Are you sure?yes | no
I spent much time waiting for never-delivering TouchJet Wave great work you did guys.
Are you sure?yes | no
Yes, this concept of light triangulation already exist in industrial products but when you have time, DIY is more fun! :p
Are you sure?yes | no
Nice project. I've been looking for reasonably priced touchscreens to make an interactive (waterproof) table and I really haven't found any good solution yet. Have you checked those touch frames they sell? The concept looks similar to yours and they promise multi-touch.
Are you sure?yes | no
On my last log, I ordered some CIS sensors on Ebay. If they are efficient it's gonna be possible to make large screen multitouch for less than a $. I keep you in touch
Are you sure?yes | no