I am a high school student, with a basic understanding of physics.I am trying to learn how a resistive touchscreen works.

I found this link from Texas Instrument to be the best source. But the information there is still to general.


On page 2, it explains how a touscreen detects a touch before determining the coordinates. A positive voltage is applied at Y+. Current will therefore flow from Y+, the point of high voltage, to Y-, the point of low voltage.

I am not sure:

  • Where the pullup resistor is in the picture.
  • Why they have to have significantly higher resistance than the total resistance of the touchscreen.
  • (referring to the previous bullet) What is meant by the "total resistance of the touchscreen". Which part of the circuit shown is the touchscreen.
  • What do "high" and "low" mean in the picture.
  • (See paragraph below)What is pin.& What is a "pin-change interrupt".

Here is the exact paragraph that explains this: enter image description here

  • \$\begingroup\$ Starting from pull up is not a great idea. Just remember that in resistive touch screen electrical resistance between several points changes allowing detection of touch and it's coordinates. \$\endgroup\$ – Gregory Kornblum May 28 '16 at 20:02
  • \$\begingroup\$ @GregoryKornblum, that is not specific enough to satisfy me \$\endgroup\$ – most venerable sir May 28 '16 at 20:04
  • \$\begingroup\$ The screen generates an equation with 5 knowns and 2 unknowns. There is sufficient information to calculate the 2 unknowns and hence to determine the point of contact. \$\endgroup\$ – Ignacio Vazquez-Abrams May 28 '16 at 20:05
  • 1
    \$\begingroup\$ I suspect the idea is that the pullup is first used to detect that there is a touch. Once there is, then either a drive injected at a point which bypasses it, or an ADC referenced to factor it out is then used to determine where the touch is. \$\endgroup\$ – Chris Stratton May 28 '16 at 20:06
  • 1
    \$\begingroup\$ To answer the question, the pullup is between VCC and Y+. Let us say it is around 10k. One side of X is grounded or driven low by an IO pin. The resistance all the way across the screen on X is much less than 10k. So when you touch, and X is shorted to Y somewhere in the screen, X pulls down the Y+ voltage close to GND. This allows you to detect a touch. \$\endgroup\$ – mkeith May 28 '16 at 20:09
  1. The pullup resistor is the one at the very top of the circuit. Between Vcc and Y+. (As explained in your quoted paragraph!)
  2. They use a "significantly higher resistance" in order to make the measurement more sensitive = more reliable. So that there is a very clear, unambiguous detection of a touch.
  3. I believe by "total resistance of the touchscreen" they mean the "Y+ resistor" in series with the "X- resistor" since that is the total path to ground.
  4. "High" means that point in the circuit is very nearly equal to Vcc. And "Low" means that the point is much lower because the "Y+ resistor" in series with the "X- resistor" have pulled it down against the pull-up resistor.
  • \$\begingroup\$ But I don't see how that point can ever be "high". The current is going though the pull-up resistor which has huge resistance. \$\endgroup\$ – most venerable sir May 28 '16 at 20:41
  • \$\begingroup\$ How "pull up" "pull down" happen? \$\endgroup\$ – most venerable sir May 28 '16 at 20:43
  • \$\begingroup\$ @Doeser. The software is scanning the entire screen many times per second. When you press a spot with your finger, it detects which x and which y part of the grid changed resistance. The grid is mapped out in memory to match where 'button' and 'icons' are, so it knows if you pressed one of them. \$\endgroup\$ – Sparky256 May 28 '16 at 21:23
  • 2
    \$\begingroup\$ Y+, Y-, X+ and X- are all connected to GPIO pins of the processor. The pullup on Y+ is internal to the processor. The processor can connect and disconnect the pullup, and it can drive any pin high or low. Furthermore, when it is not driving X or Y pins, it can sense the voltage at the pin by re-configuring the GPIO pins as ADC inputs. In order to detect touch, the processor enables the pullup on Y+, and drives X- low. Then it senses the voltage on Y+. If Y+ is high, no touch. If Y+ is low, that means someone touched. \$\endgroup\$ – mkeith May 28 '16 at 21:49
  • 2
    \$\begingroup\$ Once touch is detected, it disables the pullup. Then it drives Y+ high, and Y- low, then configures X+ as an ADC input, and lets X- float (no drive applied). The voltage on X+ tells you the Y position of the touch. Then the processor re-configures so that Y+ is an ADC input, Y- is floating, and it drives X+ high and X- low, and measures the voltage at Y+. This tells you the X position of the touch. Let me know if you still don't get it. But think about it and try to understand for a few minutes first. Draw some pictures. \$\endgroup\$ – mkeith May 28 '16 at 21:53

A resistive touch panel is essentially two transparent thin film resistors laid on top of each other. One of them has electrodes on the left and right (this is the X part of the touch panel) and one of them has the electrodes on the top and bottom (this is the y part of the touch panel).

If you put an ohm meter on the two X electrodes, you will see a resistance of perhaps a few hundred ohms. Let's call it 500 Ohms for our purposes now. If you put an Ohm meter on the Y electrodes, you will see a resistance of perhaps half of the X resistance (the film is wider and shorter). So we will call it 250 Ohms for our purposes.

Before being touched, there is no connection between X electrodes and Y electrodes. If you measure from X to Y you will get a high impedance. But when you TOUCH the panel, it creates a short circuit under your finger between the X resistor and Y resistor. During this condition, if you measure from an X electrode to a Y electrode, you will see that the resistance is somewhere between 0 Ohms and (500 + 250) Ohms, depending on where you touched.

Hopefully you are with me so far. If not, re-read it. The key point right now is that touching the touch panel creates a connection between the X and Y electrodes.

So how is position detected? Let's say I apply 5V across the X electrodes. +5 at X+ and GND at X-. Now I put a volt meter from either Y electrode to GND. What does the volt meter say? Who knows, because it is floating. But if I touch the panel, Y will be shorted to the thin film of X, and it will show a voltage of somewhere between 0 and 5V. And in fact, the voltage will be a linear function of X position. Basically, if you touch close to the X- electrode, you will see close to 0 volts. If you touch close to the X+ electrode, you will see 5V. This is how touch panels work. Because only a very small current flows into the voltmeter, we will not worry about any voltage loss occurring in the Y resistor. Yes, theoretically there is some voltage drop, but it is not much so we will ignore it.

OK, now forget about that setup. Let's configure it differently. Let's put +5V at the Y+ electrode, and GND at the Y- electrode. We will monitor either one of the X electrodes with the volt meter. Now, when we touch, we will see a Voltage that scales linearly from 0 when we touch close to Y- to 5V when we touch close to Y+. So that is how Y position detection is done.

Now, back to the processor. The processor connects 4 I/O pins to the 4 touchpanel pins. At least one of the X and one of the Y pins must also be configureable as an ADC input for voltage sensing (or, the connection to the ADC could be in addition to the IO connection). Then the processor can configure the pins to approximate what we just went through. FIRST it configures the pins to detect touch by enabling the pullup and grounding X-. In this configuration, any touch will cause Y to go low. With no touch, Y will be high, because of the pullup.

But that configuration is no good for position detection. So AFTER it detects the touch, it reconfigures itself for Y position detection, then X position detection. It does this quickly, faster than a normal person can remove their finger. (The order between X and Y doesn't really matter, it could be X first then Y).

Many processors have internal pullup resistors which can be internally connected or disconnected. But if the processor doesn't have an internal pullup, it doesn't really matter. A weak external pullup such as 10k or 100k can be used, and this will not have much effect on the ADC reading.

Note that without the pullup, the detection input may be high or low or anywhere in between. So the pullup is definitely needed to detect touch.

The picture in your question is from a TI application report. I recommend you re-read that a few times and see if everything eventually sinks in. The application report number is slaa384a.

At the moment it can be found here: http://www.ti.com/lit/an/slaa384a/slaa384a.pdf


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.