loading

This tutorial shows How to interface 4-wire touch screen using Arduino. This tutorial is useful for all microcontrollers to know how to interface Reisistive Touchscreen

Resistive touchscreen displays are composed of multiple layers that are separated by thin spaces. Pressure applied to the surface of the display by a finger or stylus causes the layers to touch, which completes electrical circuits and tells the device where the user is touching.

Step 1: Components Required and Connections

Components Required:

  1. Touchscreen
  2. Arduino UNO R3
  3. Connecting wires

Tools Required:

  1. Laptop with arduino software
  2. USB cable for arduino

Make Connections:

  1. Connect X1 to A0 of arduino
  2. Connect X2 to A1 of arduino
  3. Connect Y1 to A2 of arduino
  4. Connect Y2 to A3 of arduino

Visit my blog.circuits4you.com for step by step guide and more sensors interfacing with arduino

Step 2: How It Works ? and Programming

It works in 2 steps

Measure X axis Voltage

a. We are going to measure voltage on Y1

pinMode(Y1,INPUT);

b. Make Y2 Tristate

pinMode(Y2,INPUT);

digitalWrite(Y2,LOW);

c. Form a voltage divider in X1(+5V) and X2(GND)

pinMode(X1,OUTPUT); digitalWrite(X1,HIGH);

pinMode(X2,OUTPUT); digitalWrite(X2,LOW);

d. Read the ADC from Y1 pin

X = (analogRead(Y1))/(1024/XYresolution);

Similarly Measure Y axis Voltage

a. We are going to measure voltage on X1

pinMode(X1,INPUT);

b. Make X2 Tristate

pinMode(X2,INPUT);

digitalWrite(X2,LOW);

c. Form a voltage divider in Y1(+5V) and Y2(GND)

pinMode(Y1,OUTPUT);

digitalWrite(Y1,HIGH);

pinMode(Y2,OUTPUT);

digitalWrite(Y2,LOW);

d. Read the ADC from X1 pin

Y = (analogRead(X1))/(1024/Yresolution);

Download Code from here

Step 3: Final Output and Testing

Load the code in arduino and See the results in Serial Monitor

<p>Hey! This is very cool, just one question. When you don't touch the touchscreen, does the value come to 0?</p><p>Sorry if my english is not good, I'm a Belgian ;) </p><p>Thanks to you!</p>
<p>hi, i have 5 wire outlet....what would that mean? multitouch?</p>
<p>i hope you have found your answer, but no usually a 5-wire resistive touch screen is not multi touch. it just is a different way of building the screen. </p><p>here is a link to a very helpfull page on how the two work. </p><p><a href="http://www.dmccoltd.com/english/museum/touchscreens/technologies/5-wire.asp" rel="nofollow">http://www.dmccoltd.com/english/museum/touchscreen...</a></p><p>hope it helps you or someone else who makes it to this page</p>

About This Instructable

24,060views

45favorites

License:

Bio: Electronic store www.circuits4you.com Design Ideas blog.circuits4you.com Industry www.maventech.in Software fun www.360motions.com
More by Komal Manoj Thakur:Simple Wireless Remote for Robot DIY $10 IoT Based Home Automation DIY Electronic Dice 
Add instructable to: