Close

Capacitive Touch

A project log for (Yet another) BeagleBone Display+CapTouch cape

A cape for the BeagleBone Black using readily available replacement spare TFT Panels and capacitive touchscreen originally used in tablets

kumar-abhishekKumar, Abhishek 06/06/2015 at 13:070 Comments

The LCD adapter board allows for a capacitive touch screen to be attached to the BeagleBone Black as well. The capacitive touch screen I use has a FT5306 touch controller, which supports upto 5-finger touch. It has a 6-pin FPC and the pin out is printed directly on the flex connector:

The touch panel is powered by 3.3V [VCC and GND] sends touch data via I2C [SCL and SDA]. The INT pin goes low as the screen is touched and this acts as an interrupt for the BeagleBone to sample touch data, and then there's the RESET pin.

If we look at the pin-out of the AT070TN90 LCD datasheet , we find that pins 45, 49 and 50 are NC (not connected) [Note that it also lists the 1,2,3,4 pins at NC but they are meant for the LCD LED Backlight]. So we have 3 spare pins. Could we squeeze the touchscreen data lines into this? Yes!

So VCC and GND connect to the DVDD and GND of the LCD panel, and then RESET is shared between the LCD panel and the touch panel. This leaves us with 3 pins - INT, SCL and SDA which can be squeezed into the 3 NC'd pins of the panel and carried to the cape in the same 50-pin FPC.

The touchscreen controller module is "edt_ft5x06" which is already present in the mainline Linux kernels. So we just need to write appropriate DTS for it, and it will work right away. Here's a snippet of the one used:

touch: edt-ft5x06@38 {
    status = "okay";
    compatible = "edt,edt-ft5x06", "edt,edt-ft5306";
    pinctrl-names = "default";
    pinctrl-0 = <&ctp_int_pins>;

    reg = <0x38>;
    interrupt-parent = <&gpio2>;
    interrupts = <14 0>;

    touchscreen-size-x = <1024>;
    touchscreen-size-y = <600>;
};
Notice that even though our display is a 800x480, the touchscreen which I bought must have been intended for a tablet of display of resolution 1024x600. When I put 800 and 480 in them, the touchscreen required additional calibration. When size X and size Y are set to 1024 and 600, the touchscreen works perfectly without any additional calibration.

Uploading a video shortly.

Discussions