Pages: 1 [2]   Go Down
Author Topic: using a touch screen from a phone  (Read 4082 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 37
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 5v             --
 gnd           -- touch screen
 analog 1    --
 analog 2    --

i have max dealing with all the calculations it just reads analog 1 and 2 ins from the arduino
Logged

Copenhagen / Denmark
Offline Offline
Edison Member
*
Karma: 6
Posts: 2360
Do it !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, i will gie it a try one of these days.
Logged

Copenhagen / Denmark
Offline Offline
Edison Member
*
Karma: 6
Posts: 2360
Do it !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry to sound like a complete idiot. But i don't really get it.

My touch screen have 4 wires,

1 going up the left side
2 along the bottom
3 going up the right side
4 along the top

I can understand that i put 5v Across one of the pairs (1 and 3 or 2 and 4)of they act like the two outside pins on a pot and when i pres the screen one of the wires in the other layer becomes the wiper and i can read one of the coordinates from that.

But how do i read the other coordinate without changing the way it is hooked up to the Arduino pins ?

I seems to me that i would have to put 5v across the other two wires,  how do i physically do that with out changing
the way it is hoohed up to the Arduino pins ?

Jimmeh are your 4 wires configured like i describe above ?

Thanks
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 207
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I can understand that i put 5v Across one of the pairs (1 and 3 or 2 and 4)of they act like the two outside pins on a pot and when i pres the screen one of the wires in the other layer becomes the wiper and i can read one of the coordinates from that.

But how do i read the other coordinate without changing the way it is hooked up to the Arduino pins ?

You energize one pair using output pins from the arduino, not a 5V supply. Then you set those two port pins to inputs and power the other pair from other output pins.

Does that make sense?

Mike
Logged

Copenhagen / Denmark
Offline Offline
Edison Member
*
Karma: 6
Posts: 2360
Do it !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I kind of understand it :-)

But doesen't that require that i hook up the pairs of wires to both digital (out) pins for powering and Analog pins for reading ?
Logged

Copenhagen / Denmark
Offline Offline
Edison Member
*
Karma: 6
Posts: 2360
Do it !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Ohhh maybee....

I use the fact that the analog pins can also be digital outs ??
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 207
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That's it.

You certainly need to set the outputs that drive one pair to input when you drive the other pair, and vice versa.

Sorry if i'm not explaining it too well.
Logged

Copenhagen / Denmark
Offline Offline
Edison Member
*
Karma: 6
Posts: 2360
Do it !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm getting it - slowly :-)

Thanks
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 40
I love YaBB 1G - SP1!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've used arduino to process touch events from a 5-wire touchscreen interface.  Basically, you have the same 4 driving pins but then an extra pin that gives you the reading.

It's really easy to get going in Arduino but the resolution is not as high as SPI chips which are 12 bit ADC.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I know this topic is old, but I could use some help, and it didn't make sense to start a new topic. I pulled the touchscreen out of a Palm m500, I think it was, and it seems to be a 4 wire analog resistive, but the readings i get from it make no sense. I get about 900 with no touch. no matter where i touch, the readings seem to simply measure the pressure of the touch. if i barely touch it it goes to about 1000, and if i completely touch it, i get 1023. I have the same input. Its a small flexible flat cable. The top lead goes up the left side of the screen, across the top, and down the left. The second one down drops to an unseen layer, the 3rd one down goes up the left side, and the fourth one down also drops. I am pretty sure the screen worked before I took it out, but I may have damaged it. Any clues?

I have tried hooking it up with the following input/outputs
1 - + - X - +
2 - X - + - +
3 - + - Y - X
4 - Y - + - Y
« Last Edit: June 09, 2009, 11:07:30 pm by bman22 » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You need to think of it as 2 plates.  Charge the one plate (vertical plate we'll say) with 5 volts and then take a horizontal reading on the other plate.  Then charge the horizontal plate and take a vertical reading.

You must have 5 volts over one whole plate so when the 2 plates touch you can read the 5 volts (which is every where on the one plate) minus the voltage drop due to the length of resistance in the other plate.


{------------------------5v-----------------------}    ->  top plate charged to 5V
                         X                                              ->   contact point
{-------3V-------}{---------------2V------------}     -> possible readings

Now if i was to read the one line i would get 2V and if i was to read the other i would get 3V.  Do not read both lines, you want the current to flow in ONE PATH because you are are interested in the voltage drop caused by the length of resistance from the 5V contact point to the line you are reading.

The two readings if taken separately then added would not actually equal the 5V I just picked those numbers to better illustrate the point.
« Last Edit: March 19, 2010, 02:11:40 am by arturspm » Logged

Nowhere
Offline Offline
God Member
*****
Karma: 3
Posts: 852
|-\ |\|\
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I found a touchscreen inside a palm pilot too.
It's transparent, so I ordered some led matrices.  I'll probably be trying to make a midi sequencer.

Couple questions about them:

how can I tell if the screen is being touched?
And, related to that question, woudn't there be a floating input when it is not being touched?
Logged

Soundcloud page: http://soundcloud.com/beefinator-2
Youtube channel: http://www.youtube.com/user/beefinator14
Old soundcloud page (ran out o

Seattle, USA
Offline Offline
Full Member
***
Karma: 0
Posts: 248
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There is a really great explanation of how to use resistive touch screens with Arduino in Jon Oxer and Hugh Blennings' book Practical Arduino.

Chapter 8 is a project called Touch Control Panel. It has detailed explanations, sample code, and a library you can use for reading a touch screen in your Arduino sketch.

.andy
Logged

.andy

Pages: 1 [2]   Go Up
Jump to: