Converting a Monitor to a Giant Android Tablet

Touch screens are common in devices such as smartphones, game consoles, all-in-one computers and tablets. They also play a prominent role in the design of digital appliances such as digital signage, Point of Sale (POS) systems, satellite navigation devices, mobile phones, video games and some e-books. The Android OS, one of the main operating systems for the ODROID, has an intuitive user interface designed for use with a touch screen. This articles describes how to use an ODROID to change any monitor or TV into a giant Android tablet.

Figure 1 - 42-inch Big Giant Tablet with ODROID-XU
Figure 1 - 42-inch Big Giant Tablet with ODROID-XU

Infrared vs Capacitive touch screen

Touch screens primarily use either infrared or capacitive technology. Capacitive touch screens are more popular for smartphones and tablets, but are also more expensive, especially when the screen size is larger than 20 inches. A capacitive screen can only be activated with an exposed finger (no gloves or pointers), and can experience operational difficulties if the monitor is not correctly mounted into a metal housing due to the electrical field. Considering its ease of use and lower cost, the infrared-type touch screen is better suited for this project.

Figure 2 - Principle of IR (Infrared) touch screen
Figure 2 - Principle of IR (Infrared) touch screen

Infrared(IR) Grid touch screens

An infrared touch screen uses an array of X-Y infrared LED and photodetector pairs around the edges of the screen to detect a disruption in the pattern of LED beams. These LED beams cross each other in vertical and horizontal patterns, which helps the sensors pick up the exact location of the touch. A major benefit of the infrared system is that it can detect essentially any input, including a finger, gloved finger, stylus or pen. It is generally used in outdoor applications and point of sale systems which cannot rely on a conductor (such as a bare finger) to activate the touch screen.

Unlike capacitive touch screens, infrared touch screens do not require any patterning on the glass, which increases durability and optical clarity of the overall system. However, infrared touch screens are sensitive to dirt and dust that can interfere with the IR beams, and suffer from parallax in curved surfaces and accidental touch notifications if the user hovers his/her finger over the screen while searching for the item to be selected.

Figure 3 - Principle of IR (Infrared) Multi-touch screen
Figure 3 - Principle of IR (Infrared) Multi-touch screen

How to Choose an Infrared touch screen

You can make your own touch screen by following guides found on the Internet, but it is not easy to implement the complex multi-touch algorithm and well aligned IR emitter/receiver pairs, as seen in Figure 4.

Before purchasing an infrared touch screen, it’s important to evaluate its compatibility with Android. It must meet at least one of the following requirements:

1) Is your touch screen listed in the Linux multi-touch compatibility table?

http://lii-enac.fr/en/architecture/linux-input/multitouch-devices.html

If yes, it will be very easy to activate your touch screen.

2) Is your touch screen Windows 8 compatible?

If yes, you need to add a few lines in the Kernel driver and an input configuration file.

3) Does your touch screen manufacturer supply specific Android driver source code?

If yes, you need to follow their porting instruction.

A touch screen which meets the first requirement was not available in our local Korean or Chinese markets. Some touch screen manufacturers in China offered to supply the driver source code for their products, but the sample code was not useful in the real world. The best alternative was a touch screen that supported Windows 8 HID-compliant Plug & Play.

It’s important to check whether the touch screen is really Windows 8 compatible or not. True Plug & Play devices do not require a separate driver to be installed on a Windows PC. If the touch screen needs a specific device driver, it is not natively compatible with Windows 8 and will be less likely to work with Android.

Figure 4 - 42” touch screen connected to an ODROID-XU
Figure 4 - 42” touch screen connected to an ODROID-XU

Connect the touch screen to Android

There are 4 steps to using the touch screen with the Android OS:

Get the Vendor ID and Product ID from the touch screen USB interface

Modify the files hid-ids.h and hid-multitouch.c, both located in kernel/drivers/hid/

Build the kernel with the HID-MULTITOUCH option enabled, and transfer the kernel image to the ODROID

Create an IDC (Input Device Configuration) file.

Step 1: Check the VID and PID

Plug the touch screen into any Linux PC, then find the VID and PID by typing “lsusb” in the terminal as shown in Figure 5.

Figure 5 - Reading the VID and PID of the USB touch screen using a Linux PC
Figure 5 - Reading the VID and PID of the USB touch screen using a Linux PC

To determine which device entry is associated with the touch screen, list the devices before connecting the touch screen, then list them again after connecting it. The new entry will correspond to the touch screen device.

During our project, when the 23-inch touch screen was connected, an entry of VID:03FC, PID:05D8 appeared in the device list, which represents a touch screen made by Elitegroup Computer Systems. With the 42-inch touch screen connected, an entry of VID:1870, PID:0119 appeared to represent a touch screen from Nexio Co., Ltd. Other touch screens will report different VID, PID and vendor information.

Step 2: Modify hid-ids.h and hid-multitouch.c

After downloading the appropriate Android kernel source from dn.odroid.com, navigate to the kernels/drivers/hid/ directory, then add the VID and PID to the end of the hid-ids.h header file.

Figure 6 - Example PID and VID values added to kernels/drivers/hid/hid-ids.h.
Figure 6 - Example PID and VID values added to kernels/drivers/hid/hid-ids.h.

Also, add the new ID in the hid-multitouch.c source file. It must be placed in the hid_device_id mt_devices structure define.

Figure 7 - Example of adding the touch screen ID to kernels/drivers/hid/hid-multitouch.c
Figure 7 - Example of adding the touch screen ID to kernels/drivers/hid/hid-multitouch.c

Step 3: Build the kernel with the HID-MULTITOUCH option enabled

Type “make menuconfig” to configure the kernel, then go to Device Drivers -> HID Devices -> Special HID drivers -> HID Multitouch panels and select it as an embedded driver (*), as seen in Figure 8.

Figure 8 - Configuring the touch screen with an embedded driver in the kernel configuration.
Figure 8 - Configuring the touch screen with an embedded driver in the kernel configuration.

Set below two options as an embedded driver, indicated with an asterisk (*)

Device Drivers -> Input device support -> touch screens -> USB touch screen Driver

Device Drivers -> Input device support -> touch screens -> GeneralTouch touch screen device support

Figure 9 - Configuring the touch screen with an embedded driver in the kernel configuration.
Figure 9 - Configuring the touch screen with an embedded driver in the kernel configuration.

Save the Kernel configuration and compile it to make a zImage.

Transfer the zImage to your ODROID via fastboot protocol in the u-boot.

Step 4: Create an IDC (Input Device Configuration) file

If you don’t make a proper IDC file, the resolution of the touch screen will not match the HDMI resolution.

The IDC file is a unix-formatted plain text file.

Here is an example. You can use this file as is.

touch.deviceType = touchscreen
touch.orientationAware = 1
device.internal = 1

keyboard.layout = qwerty
keyboard.characterMap = qwerty2
keyboard.orientationAware = 1
keyboard.builtIn = 1cursor.mode = navigation
cursor.orientationAware = 1
The file name must be Vendor_xxxx_Product_yyyy.idc (xxxx: Vendor ID, yyyy: Device ID). I made two files for Elitegroup and Nexio. Note that the filename is case sensitive.

Vendor_03fc_Product_05d8.idc and Vendor_1870_Product_0119.idc

Copy the IDC files to your ODROID with the below commands.

adb remount
adb push Vendor_03fc_Product_05d8.idc /system/usr/idx/.
adb push Vendor_1870_Product_0119.idc /system/usr/idc/.
adb reboot

How to Attach the 42-inch Touch Panel to the TV Screen.

Prepare the touch screen

Figure 10 - Preparing the touch screen
Figure 10 - Preparing the touch screen

Attach very strong double-sided tape to the frame of the touch screen panel.

Figure 11 - Attaching the double-sided tape to the monitor
Figure 11 - Attaching the double-sided tape to the monitor

Carefully attach the touch screen to align the viewing window.

Figure 12 - Aligning the touch screen with the monitor
Figure 12 - Aligning the touch screen with the monitor

Test the touch screen. Our touch screen could detect up to 6 points.

 Figure 13 - Testing the touch screen
Figure 13 - Testing the touch screen

How to Attach the 23-inch Touch Panel to the Monitor Screen.

This smaller 23-inch touch screen panel came with 4 velcro belts and it was relatively easy to assemble.

 Figure 14 - 23-inch touch screen panel with velcro belts
Figure 14 - 23-inch touch screen panel with velcro belts

Figure 15 - Playing Fruit Ninja on the 23-inch touch screen with my finger.
Figure 15 - Playing Fruit Ninja on the 23-inch touch screen with my finger.

Conclusion

Besides gaming and personal use, the ODROID is ideal as the core computing device for kiosks, digital signage, human interface research, and more, because of its high performance computing power, relatively low cost, and open platform which allows modifications such as this touch screen.

To see a video of the results of this project, visit http://youtu.be/b8_cV_NeWQ8, and for more giant Android tablet Minecraft action, visit http://www.youtube.com/watch?v=HDsnuxchxtU.

Be the first to comment

Leave a Reply