Go Down

### Topic: Problems to measure pressure on 4-wire resistive touch panel (Read 6318 times)previous topic - next topic

#### amundsen

##### Mar 25, 2012, 05:01 pm
Hello,

I want to measure the pressure on a 4-wire resistive touch panel (8") with an Uno board. I am using A0 to A3 pins which are switched between input and output states to measure x, y, z1 and z2 values

There are two formulas one can found in many datasheets (see picture below) to calculate the pressure (z or Rtouch) but I can't find any real example. I have tried the first formula. However I can't get a pressure value which is not correlated to the xy position.

First I am not sure to have the right figure for the Rx_plate.  I have measured the panel's resistance when left unpowered but maybe it's not how one should do it ? I have also tried some random values for Rx_plate but it doesn't seem to reduce the correlation between the position and the pressure.

I am also wondering whether the actual values I get from the ADC might demand some kind of correction in the formula if those values do not reach  the digital scale's extremes (0 and 1023).

Is the second formula better or should I use another way to measure the pressure ?

Second, I am not sure about the additional components I should use besides the panel and the Arduino. In some circuits people use pull-up resistors, others do use pull-down resistors, other talk about capacitors, ESD diodes. Currently I am using 10k pull-down resistors but is there a better design (to use the whole ADC's range for instance) ?

Third, in some controller's datasheets one can read about differential or ratiometric vs single-ended reference for the ADCs. Does this has any importance when using an Arduino board ?

Any help would be much appreciated.

#### johnwasser

#1
##### Mar 25, 2012, 06:17 pm
I'm surprised that there are pull-down resistors on the input pins.  This tutorial doesn't have that:
http://make.larsi.org/electronics/TouchScreen/
I would expect the pull-down resistors would make everything non-linear and may be what is keeping your pressure equations from working.

http://www.ti.com/lit/an/sbaa155a/sbaa155a.pdf

After you get X and Y readings you'll need to take two samples to calculate pressure:

Set +Y HIGH and -X LOW.  Do analogRead() at +X for Z1 and -Y for Z2. (measure repeatedly and average to reduce noise)

Note: if Z1 = 0 then Pressure = 0
Rz = Rx * X/1024 * (Z2/Z1-1);  // Note: Rx is the resistance across the X plane
Pressure = Poffset - Pscale * Rz;  // Poffset and Pscale are determined experimentally.
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

#### amundsen

#2
##### Mar 25, 2012, 09:38 pm

I'm surprised that there are pull-down resistors on the input pins.  This tutorial doesn't have that:
http://make.larsi.org/electronics/TouchScreen/
I would expect the pull-down resistors would make everything non-linear and may be what is keeping your pressure equations from working.

Mhhh. This tutorial says the resistors are useful:
http://kalshagar.wikispaces.com/Arduino+and+a+Nintendo+DS+touch+screen

I have just tried to remove them and it doesn't improve the situation. Rz is still much correlated to x and y. Strange...

Quote

http://www.ti.com/lit/an/sbaa155a/sbaa155a.pdf

The equation in this document is the same as the (1) in my first message but there is additional information that might be helpful. Thanks.

#### amundsen

#3
##### Mar 25, 2012, 09:46 pm
And I still do not figure out how to measure the resistance across the x plane (not the x position). This data is supposed to be provided by in the panel datasheet but I have only a range, not a specific figure. How should I do it ?

#### johnwasser

#4
##### Mar 25, 2012, 10:10 pm

And I still do not figure out how to measure the resistance across the x plane (not the x position). This data is supposed to be provided by in the panel datasheet but I have only a range, not a specific figure. How should I do it ?

My guess would be that you would disconnect the touch sensor from everything else and use a multimeter to measure resistance between X+ and X-.
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

#### amundsen

#5
##### Mar 25, 2012, 10:18 pm
That's exactly what I have done.

Go Up