Pages: [1] 2   Go Down
Author Topic: using a touch screen from a phone  (Read 4462 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

alright gang can it be done, i have my doubts that its possible, has anyone tried it? and are there any alternatives?
Logged

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

yes it can be done:
it's probably a 4-wire resistive touch screen.

I would check out the TSC2004 from Texus Instrument: it uses TWI interface so you should be able to use the arduino TWI library.

Touchscreen chips usually come surface mount so you'll need to get some breakout boards from sparkfun.

Read this pdf:
http://www.circuitcellar.com/library/print/0100/dahlin-114/dahlin114.pdf

it'll have most of the info. you need to get started.
Logged

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

jimmeh,

nima's link is a good one - however, you may be able to drive the touch screen from the Arduino itself.

It'll take 4 pins - 2 digital outs and 2 analog ins.

Simply, you apply 0V and 5V to one axis and read a touch value from the other. Then do the other axis.

I did this with a PIC a few years back.

Regards,

Mike
Logged

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

cheers for the replies, this is basically what i had in mind, i thought it would be as simple as plugging it in would it be able to handle the 5volts?

http://cgi.ebay.co.uk/LCD-TOUCHSCREEN-LENS-FOR-SONY-ERICSSON-W950i-M600i-W950_W0QQitemZ250223172732QQihZ015QQcategoryZ68024QQssPageNameZWDVWQQrdZ1QQcmdZViewItem

Logged

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

It looks like it would be an analogue resistive type of touch screen - there appear to be 4 connections and two of them lead to lines that go up each side. I guess the others lead to lines across the top.

They will handle 5V without trouble.

Here is a wikipedia article for a quick intro on how they work:

http://en.wikipedia.org/wiki/Analog_resistive_touchscreen

and this one gives more info:

http://en.wikipedia.org/wiki/Touchscreens#Resistive

It would be worth reading through the spec sheet of the chip nima mentioned to find out how they do it - then implement it in code in the Arduino (or just use the chip).

They seem to be reasonably priced in that auction. FWIW, I have purchased from that seller recently without problem smiley

Regards,

Mike
« Last Edit: March 12, 2008, 10:16:41 am by BigMike » Logged

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

I've used Wasp's touch screen in the past - here is a nice page about them:

http://waspswitches.co.uk/english/touchscreens_4wire.shtml
Logged

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

got it working! after some very fiddly soldering! cheers gang, i just plugged it straight into the arduino, works pretty well.
Logged

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

I just realized that i have an old defect PDA (Compaq Ipaq) lyíng around. I couldn't resist it when i saw it in the electronics dumpster at the local recycling station a few month back. Lo and behold a nice big 4 wire touchscreen on top of the display.

So let me se if i get this right. i apply 5V  and ground to two of the 4 wires and the others are hooked up to analog inputs on the Arduino board an treated just like any other variable resistor ? each giving me a number for the X and Y position on the screen ?

Is there a standard for the 4 wires, can i somehow meassure which is which ?

Is it really that easy ? (except for what looks lige a nightmarish soldering session)
Logged

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

really is that easy!
Logged

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

Super, that opens up for a series of new projects to pile on top of the others :-)
Logged

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

Quote
So let me se if i get this right. i apply 5V  and ground to two of the 4 wires and the others are hooked up to analog inputs on the Arduino board an treated just like any other variable resistor ? each giving me a number for the X and Y position on the screen ?
 

You have to apply the 5V across one pair then read the analogue value from one of the wires in the other pair, then apply the 5V to the other pair and read the analogue voltage from one of the wires in the first pair.

It is that easy, though in a commercial environment you would have to calibrate the x and y values so top left and bottom right etc are accurate, also to prevent build up from electrolysis you would reverse the voltage on the pairs, you would debounce the touches, you would have a sleep mode with touch detection, some filtering of the values is desireable and if you are using it as an input device to replace a mouse, you need to be able to detect a "click".

None of this is necessary in simple applications, though.

Regards,

Mike

Logged

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

Quote
got it working! after some very fiddly soldering! cheers gang, i just plugged it straight into the arduino, works pretty well.

That's good news, Jim. I was so tempted to get one of those screens, but I have enough projects in line for these Arduinos as it is.

Do you have a project in mind for it?

Mike

Logged

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

Could you post your code Jimmeh ?

Thanx

Logged

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

its all delt with in max, just like a potentiometer have it coming into the serial. im basically going to make a kaoss pad, im also getting trying to get this encoder working with it so i can select what changes.
Logged

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

But you do have Arduino read the touch screen right, i don't quite understand how to read the pair. Are they hooked up like two pots constantly ? like one pot and then anoter pot ? i hope this question makes sense.

A little drawing and a few lines of the Arduino code actually doing the analog read would be greatly apreciated.

Thanx
Logged

Pages: [1] 2   Go Up
Jump to: