Introduction: 4-Wire Touch Screen Interfacing With Arduino

Picture of 4-Wire Touch Screen Interfacing With Arduino

For more stuff visit my web site

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

Picture of 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 for step by step guide and more sensors interfacing with arduino

Step 2: How It Works ? and Programming

Picture of How It Works ? and Programming

It works in 2 steps

Measure X axis Voltage

a. We are going to measure voltage on Y1


b. Make Y2 Tristate



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


b. Make X2 Tristate



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





d. Read the ADC from X1 pin

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

Download Code from here

Step 3: Final Output and Testing

Picture of Final Output and Testing

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


techy06 (author)2017-09-02

how can i sense a letter if drawn.for ex if i draw the letter h,how am i suppose to code to find those coordinates wherever i touhed

Thanks in advance

Orngrimm (author)techy062017-10-24

The 'ible shows you how to find your position:

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

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

Now it is your code to programm to detect (?) what letter it represents. Quite hard to do. Thats OCR (Optical Character recognition) and may be beyond the capabilities of a normal coder... and calc-power of an arduino (?)

FreelanceCody (author)2017-10-15

Where is this touchscreen from? Please link the item here...

Orngrimm (author)FreelanceCody2017-10-24

I sourced dirt cheap from

Also, Aliexpress has cheap ones in all possible sizes...

rshouker (author)2017-09-19

Thanks for the tutorial,

What does the second line do:


digitalWrite(Y2,LOW); // ???

According to the documentation it disable the internal pullup resistor, but it is disabled by default in INPUT mode, isn't it?

Orngrimm (author)rshouker2017-10-24

Setting it as input and setting it afterwards to LOW results in a completely open pin --> TRI-State.

Yes, It is possible that the pull-R's are disabled by default. But as it is quite fast to do, better be safe than sorry ;)

LucianoL26 (author)2017-09-11

Thats amazing! could it be used like a drawing tablet?

PrisNaboo (author)2016-12-14

Hey! This is very cool, just one question. When you don't touch the touchscreen, does the value come to 0?

Sorry if my english is not good, I'm a Belgian ;)

Thanks to you!

stephenplace17 (author)PrisNaboo2017-07-26

No, you have a floating results and can't get anything solve this problem is enough to put pulldown resistors (10Kohm) in every output (one terminal of the resistor to GND and the other to the touch contact).

Bladder777 (author)2016-03-26

hi, i have 5 wire outlet....what would that mean? multitouch?

chanses (author)Bladder7772016-09-11

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.

here is a link to a very helpfull page on how the two work.

hope it helps you or someone else who makes it to this page

About This Instructable




Bio: Electronic store Design Ideas Industry Software fun
More by Komal Manoj Thakur:Simple Wireless Remote for RobotDIY $10 IoT Based Home AutomationDIY Electronic Dice
Add instructable to: