An FTIR Touchscreen Device
The DJ Touch is a portable turntable touchscreen and interactive LED display.
Our end goal was to produce a low cost touchscreen device, and demonstrate its application in a common consumer application. Out of an interest in electronic music, and with the knowledge of deejaying’s close roots to electronics, we decided to develop a touch screen turntable.
The device relies on the concept of frustrated total internal reflection (FTIR) to detect user motion on an acrylic surface. Using a camera system and infrared LED setup, these blobs of infrared light are read into the microprocessor and detected using a dynamic thresholding algorithm. The data is streamed over serial using the FT232R USB connection and a compatible program on the user interface emulates the turntable motion. We have also written up additional code that uses the blob tracking for simple mouse movement. Using MATLAB’s powerful image processing library, more complex interactions can be coded.
High Level Design
There has been a plethora of touchscreen gadgets in today’s market of consumer electronic goods. Smart phones and portable entertainment devices are expected to ship with some form of touch screen functionality. In particular, several multitouch projects have been successfully completed leveraging on the FTIR effect. These include and have served as an inspiration for our build. DJTouch demonstrates the ability to build an interactive display using minimal processing resources for low cost.
At the heart of the device is an ATMEGA644 which is connected to a CMOS camera and a LED driver. With only a RS232 serial port to communicate data to the computer, we had to push most of the image processing to the ATMEGA644, outputting only a stream of bits representing the background/foreground data of the screen. The LED display allows the user to confirm that the touch screen is functional, if the computer is not used.
On the computer end, there is a serial read-in code that translates the binary bits of information into a full image. Applications can be developed to use the data to track motion across the screen, or as demonstrated in the main DJ application.
The system relies on the program Virtual DJ Home, which simulates a DJ deck. Configuring the appropriate keyboard inputs to the turntable actions, the user’s rotational motion across the surface of the acrylic is translated into rotations of the turntable. This allows the user to “scratch” music. There is also an additional play/pause button, located in the center of the touch screen.
The project relies on I2C, SPI and serial communication protocols. I2C is used to program the camera to allow for optimal image capture of the touchscreen. SPI is used to drive the LED display, controlling up to a maximum of 64 LEDs using only four input wires from the microcontroller. The serial communication data stream is custom formatted in order to minimize the time needed to send data over the connection.
With the limited bandwidth of the serial port connection, our device speed is limited. With the addition of processing from the MATLAB front end, the low sampling rate can be compensated for, applying correlation to determine user movement. Using a reduced version of the code, which only outputs rotational speed, we can speed up the rate of image sampling and increase the sensitivity of the device. For demonstration purposes, however, we felt that streaming the full image was essential to show the proper operation of the touchscreen.
As the device’s sole output is through the serial port connection, there were no applicable standards by which our device had to conform.
To our knowledge, while the term “multitouch” is patented by Apple, the concept of FTIR to track user finger presses across a surface predates the patent application.
Our device consists of a touchscreen and a LED display. As a significant part of the project required setting up the FTIR touchscreen, we have documented the process of obtaining blobs on the acrylic surface. In addition, we will discuss hardware concerns regarding the LED matrix build and the physical camera characteristics.
Frustrated Total Internal Reflection is a multi-touch methodology developed by Jeff Han (Multi-Touch Interaction Research, 2006). Light directed from a material of a smaller refractive index to a material with a higher refractive index at an angle above that of a critical sum will be reflected totally. Light from the infrared LEDs directed into the acrylic is trapped in the material. When the user presses on the surface, the refractivity of the user’s finger frustrates the light rays, breaking the TIR effect. This is visible as bright blobs on the camera.
The choice of acrylic was paramount for the application. We began with a piece of acrylic that was of insufficient thickness. In addition, we had manually machined the parts, leaving the edges unclear. After determining that the minimum thickness for the TIR effect was 3/8″, we ordered a custom 1″ 6″x6″ acrylic that was polished. The acrylic can be tested with visible light. The amount of pressure needed to get the FTIR to be visible depends on state of the user’s fingers. We noted that wet/oily fingers helped the effect. Future work might consider using a compliant coating of silicon, so that this issue is resolved.
To maximize the effect, we painted the interior of the frame with white paint. This surface is highly reflective and allows the light to be reflected back into the acrylic material. We also taped the sides of the material to block out light shining directly from the LEDs. The device is constructed on a plywood base, fixing the distance between the screen and the camera. We intended to construct this to be a vertical box, for a more intuitive touchscreen surface. However, as the minimum distance between screen and camera is about 8″, the structure would be more stable in a horizontal position.
The CMOS camera is directed at the touchscreen, such that the field of vision includes the entirety of the 6″x6″ screen. The screen is built from a piece of 1″ thick clear acrylic with a frame embedded with 9 infrared LEDs. The LEDs output at a peak frequency of 940nm and have a radiant intensity of at least 25mW/Sr. This is the minimum intensity recommended for the FTIR effect to be observed. We began with small cheap LEDs with only 15mW/Sr, but could not observe the FTIR effect. Debugging this effect was troublesome because although most camera phone cameras can view infrared (as purple light), the FTIR blobs are not bright enough to be visible on them.
While we originally began with an ordinary webcam, modified to view IR wavelengths, we were unable to interface the Atmega644 with the device. We purchased the C3038 CMOS camera, which has been a popular choice in previous ECE4760 projects (Customizable Virtual Keyboard, Scanalicious) and has extensive documentation on its use. We made careful note to purchase the model that does not include the IR-cut filter. Consumer cameras often include a visible light filter that rejects infrared wavelengths, but often the image sensor on it is sensitive to the infrared spectrum. In addition, the camera in monochrome mode is sensitive to the desired wavelength of light for our application, or 940nm. The camera can be additionally programmed using I2C communication. The customization allowed us to maximize the camera’s sensitivity to IR. Further details on the data capture of the image stream are given in the Software section of this report.
For more detail: An FTIR Touchscreen Device
This Post / Project can also be found using search terms:
- diy ftir with arduino