Go Down

Topic: increase touchscreen sensitivity? (Read 1 time) previous topic - next topic

brendanmccloskey

Hi
thanks to a recent thread on this forum I have successfuly hooked up a 4-wire resistive touchscreen to MaxMSP via Arduino. Touchscreen 'analogRead' outPins are pulled to ground via 10kOhm resistors to reduce flakiness/jitter. To ensure stable readings I have to press fairly firmly on the surface; any reduction in pressure lets readings fall rapidly to zero. I was wondering (in my naivety) if it is possible to enhance the sensitivity of the screen (preferably in hardware), perhaps by trying different values of resistor in the circuit?
Noob-osity = c. 80%

Brendan

jomac_uk

Have you tried increasing the value of the resistors to somewhere between 50 and a 100K?

Gut feeling from the playings around ive done in the past seem to suggest your values may be a bit low, alternatively, have you tried replacing them with ESD diodes instead?

John

brendanmccloskey

I have tried increasing the resistance to ground of the two analogRead lines in the circuit, without radical improvement; the issue is that the voltage rapidly drops to zero if, even during contiued contact, pressure is relaxed:
Code: [Select]
/* TOUCHSCREEN ELECTRODE PAIRS= X1-X2, Y1-Y2
connect as A0=X1, A1=Y1, A2=X2, A3=Y2;
A0 and A1 alternate readings, so 10k pulldown to gnd on these;
'open circuit' floating values cured via digitalWrite to 0v on
A2 and A3
*/
int xVal = 0;
int yVal = 0;

void setup()
{
Serial.begin(9600);
}

void loop()
{
pinMode(A0, OUTPUT);       //analog 0 = gnd;             
pinMode(A1, INPUT);      //analog 1 = signalRead;       
pinMode(A2, OUTPUT);      //analog 2 = +5v;            
pinMode(A3, INPUT);      //switch3                  

digitalWrite(A0, LOW);      //gnd
digitalWrite(A2, HIGH);      //+5v

delay(10);            //let voltage settle
xVal = analogRead(A1);      //read pin 1
xVal/=4;
digitalWrite(A2, LOW);  //back to gnd

//switch pinModes to read other axis

pinMode(A0, INPUT);      //analog 0 = signalRead
pinMode(A1, OUTPUT);      //analog 1 = gnd
pinMode(A2, INPUT);      //switch2
pinMode(A3, OUTPUT);      //analog 3 = +5v

digitalWrite(A1, LOW);      //gnd
digitalWrite(A3, HIGH);      //+5v
delay(10);
yVal = analogRead(A0);
yVal/=4;
digitalWrite(A3, LOW);  //back to gnd

//send data to Max
Serial.print(xVal, BYTE);
Serial.print(255, BYTE);//punctuation byte
Serial.print(yVal, BYTE);
delay(80);
}


Cheers

Grumpy_Mike

Quote
I have tried increasing the resistance to ground of the two analogRead lines in the circuit,

What values have you tried?
With values over 100K you will run into noise problems, do you see this before the rapid fall off?
The other solution is to use an op amp to improve the input impedance but this is quite high already with the analogue input.

brendanmccloskey

I went from 10k to 22k to 44k, without any noticeable difference; i'm sending the circuit 5v on the powerlines, reading one input, then switching them to zero before reading the second. Using the serial monitor in Arduino I'm getting X/Y 0-1023 across the entire touchpad as expected. I think the problem may be that, without contact, I have an open circuit. The problem remains the rapid descent to zero unless firmly pressing all the time.
Thanks for your contribution

brendanmccloskey

ps

sorry, there's no real noise noticeable at these values, input is fairly stable (+/- <10) if pressing firmly

Grumpy_Mike

Quote
I went from 10k to 22k to 44k, without any noticeable difference;

You won't withe these values try 100K 220K and 470K to see any change.

Quote
think the problem may be that, without contact, I have an open circuit

I am puzzled now, I thought that there resistors were across the input stopping it being an open circuit.

brendanmccloskey

you're right,
the code lines which pull the power lines down to zero, plus the resistors correct the 'open circuit'

(it's national 'forgive-a-noob week!)

Grumpy_Mike

Quote
(it's national 'forgive-a-noob week!)


I's that every week on this forum  :)

Go Up