Pages: [1]   Go Down
 Author Topic: Problems to measure pressure on 4-wire resistive touch panel  (Read 2659 times) 0 Members and 1 Guest are viewing this topic.
unprobable country named Belgium
Offline
Sr. Member
Karma: 4
Posts: 264
Ga bu zo
 « on: March 25, 2012, 10:01:14 am » Bigger Smaller Reset

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.

 pressure_calculation.png (15.55 KB, 1101x226 - viewed 59 times.)  4wire+uno.png (55.99 KB, 752x815 - viewed 82 times.) Logged

Massachusetts, USA
Offline
Tesla Member
Karma: 203
Posts: 8720
 « Reply #1 on: March 25, 2012, 11:17:52 am » Bigger Smaller Reset

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.
 Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

unprobable country named Belgium
Offline
Sr. Member
Karma: 4
Posts: 264
Ga bu zo
 « Reply #2 on: March 25, 2012, 02:38:32 pm » Bigger Smaller Reset

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.

 Logged

unprobable country named Belgium
Offline
Sr. Member
Karma: 4
Posts: 264
Ga bu zo
 « Reply #3 on: March 25, 2012, 02:46:08 pm » Bigger Smaller Reset

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 ?
 Logged

Massachusetts, USA
Offline
Tesla Member
Karma: 203
Posts: 8720
 « Reply #4 on: March 25, 2012, 03:10:49 pm » Bigger Smaller Reset

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-.
 Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

unprobable country named Belgium
Offline
Sr. Member
Karma: 4
Posts: 264
Ga bu zo
 « Reply #5 on: March 25, 2012, 03:18:02 pm » Bigger Smaller Reset

That's exactly what I have done.
 Logged

 Pages: [1]   Go Up