A Modified Relay for Performing Tap Tests on Touch Screen Devices

by melarthurs in Circuits > Sensors

719 Views, 0 Favorites, 0 Comments

A Modified Relay for Performing Tap Tests on Touch Screen Devices

IMG_1642.JPG

The aim of this project is to design a low-cost and accessible method for simulating a finger touch down gesture on any capacitive touchscreen device. I found many of the low-cost solutions for this problem to produce unreliable results. The logical starting point for the solution is to use an Arduino. An Arduino allows us to use a delay function within an infinite loop to repeat the touch down gesture at a regular interval. We can then use the digitalWrite function to control the state of the touch simulation device. 

Capacitive touchscreen devices will register a gesture when an object with similar capacitance to a finger is placed on the screen. There are a number of types of gestures recognised by smartphone iOS and Android. We will focus on simulating the iOS touch down gesture and Android action down motion events. For these events to be detected, the touch simulation device must only be placed on the screen for a short period of time, where the duration of the period will depend on the device.

Supplies

  • Omron G5LE-1-DC5 relay
  • Arduino Uno R3
  • Single strand wires
  • Silver plated copper wire / Copper wire
  • Plastic card (An expired credit or debit card is ideal)
  • Breadboard
  • 20kΩ LDR
  • 22kΩ resistor
  • Hot glue gun with glue
  • Soldering iron with solder

Modified Relay

sideview.png
Screen Shot 2021-12-11 at 20.44.40.png

An Omron G5LE-1-DC5 SPDT non-latching relay is used to simulate a finger touch. The outer casing is removed so we have access to the armature. We can exploit the movement of the armature to simulate the touch down action. A strand of silver plated copper wire of length 2.5cm is bent into a hook shape. It is important to note that this hook should not touch the screen when the input voltage is high and should be touching the copper tape when the input voltage is low. Adjust the angle of the hook to achieve this behaviour. This wire was then soldered to the armature.

Relay Base

Screen Shot 2021-12-11 at 21.39.00.png
IMG_1659.JPG
IMG_1657.JPG

A plastic card (5.5cm x 1.8cm) was used as base to secure the component to the touch screen. This card is hot glued to the relay topside mounts.

Circuit Setup

IMG_1641.JPG

For the relay hook to make reliable contact with the screen, the area of the screen touched must be approximately the size of a finger tip. A square of copper tape (1.2cm x 1.2cm) is affixed to the touchscreen to expand the contact area of the hook. An LDR is used to determine whether the screen is dark or light. This test circuit will allow us to perform touch down gestures when a smartphone touchscreen turns from black to white. The LDR must be placed over the portion of the screen where the colour changes.

Arduino Code

Screen Shot 2021-12-11 at 21.45.49.png
int dlay = 500;bool touched = false; void setup() { Serial.begin(9600); pinMode(4,OUTPUT); digitalWrite(4, HIGH);} void loop() { if (analogRead(A0) >= 500) {   if (!touched) {     digitalWrite(4, LOW);     delay(dlay);     digitalWrite(4, HIGH);     touched = true;   } } else {   touched = false;   digitalWrite(4, HIGH); }}


When the screen is displaying light (we use a value of 500, but this will depend on the device and brightness settings), we set the state of the relay to LOW causing the hook to touch the screen. After a delay of 500ms this state returns to HIGH. With a delay that is too short, the touch will be ignored. With a delay that is too long, the touch will be counted as a long press rather than a touch down. We keep the state touched so that the only perform a single touch down gesture when the screen turns bright. Otherwise the relay will keep performing touches until the screen returns to displaying dark.