Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

touch screen interface circuit problems

Status
Not open for further replies.

bouvett

New Member
hi,

i have been working on a project to interface a touch screen with a micrcontroller and a character lcd. now when i connect the touch screen as shown in the attached diagram, the voltage from one of the microcontroller pins falls from 4.9 to 4.3 volts. one other thing is that the voltage read from the output pin varies between 0 to 1 approximately whereas when i connect the touch screen without the pull down resistors the voltage varies between 0 and 5V as required. (VDD = 5V)..

so probably the nuisance are the pull down resistrs, the latter still cannot be avoided since if the touch screen is not pressed the output pin would be floating without the pull down resistors.

what can i do? does anybody have some touch screen interface circuit please?

thanks a lot for your help..
regards
 
i have done some other tests and noticed how quickly one can operate a touch screen, i mean when i don't connect it to a supply and read the voltage with a multimeter everything works well... when i connect the touch screen to the micro controller the voltage will vary only from 0 to 1V max even if the supply voltage is 4.3V( originally it is 5v but falls to 4.3V due to the current sinked by the touch screen)

i'm really confused at the moment, i can try using a buffer but surely it won't effect since internal to every pin of the micro is a buffer just the same.

any help please?
10x a lot
 
What microcontroller are you using? Have you properly configured the microcontroller's pins as inputs for the touch screen's outputs? What kind of output does the touch screen have? An analog response to a touch or a digital response? Happen to have the touch screen model number? Datasheet? Supplier? Outputs don't "float", inputs do. I suspect your pull-down resistors aren't needed.
 
sorry for the delay, i wrote the reply twice and for twice the reply was not submitted i eventually got .... off...

now that i have regained some patience i will write the post again..

the microcontroller is a pic16f887, the touch screen is a nintendo ds touch screen.

i have found many websites which describe how they connect this tousch screen to their micros, such as **broken link removed**

the problem is that they are identical to mine and still my code doesn't work properly. if one looks at the link i gave, they use 4 pull down resistors, but for what? at least two of the pins of the touch screen can be kept low all the time. unfortunately though i am pretty sure of what i am saying, my circuit doesn't work properly... (i have tested the algorithm thoroughly and i am sure that the latter works properly)... the problem is with the electronics of the interface circuit i believe...

first of all when i connect the touch screen such that the VDD is supplied by the micro, the touch screen sinks to much current and the voltage on the pin drops from 5V to 4.2V, so not only i may damage the micro, but also i will never get the maximum value from my adc( i.e 255 for 8 bit mode)..

secondly, the circuit only works if half of the circuit is connected, i mean if i connect the other pull down resistor, the circuit will start giving values instead of between 0-255, to 0-128 approximately...

this is my algorithm, with respect to the following link: touchpanel.jpg picture by bouvett - Photobucket

first i power x+, and read from y+, then i power y+ and read from x+... when i read i set the pin as an analogue input and when i power i set it as a digital output...
the algorithm must be right as else it wouldn't give me good results.. the problem is when i connect the x- or y- to ground through the resistors as shown.. when i run the algorithm with only one pull down resistor, everything works well, when i connect the other one, the analogue voltage output falls by half, so it must be an analogue electronics problem for sure..


so i would like to ask whether there's anyone who has tried such a circuit so that he/she can give some feedback on the topic.. thanks
 
From what I've been reading while researching, you can hook the Nintendo DS touch screen directly to your microcontroller. Apply power and ground to the Y+ and Y- pins respectively and read the result from X+. Then apply power to X+ and ground to X- to read the Y+ result. Combine the two readings to pinpoint touch location. Nothing else is required.
 
yes that's exactly my impression, but i'm starting to change it gradually unfortunately....

i have checked the resistances between the nodes in the circuit and everything makes a lot of sense when one considers that teh pull down resistors are much greater than the resistance of the touch screen... still, when i add the second pull down transistor everything becomes messed up grr
 
Read Y+:
X+=5+=Pin Driven High
X-=GND=Pin Driven Low
Y+=ADC Input=High Impedance Input
Y-=Unused=High Impedance Input

Read X+:
X+=ADC Input=High Impedance Input
X-=Unused=High Impedance Input
Y+=5+=Pin Driven High
Y-=GND=Pin Driven Low

No pull downs are needed. Don't use them. Four wires from the touch panel go straight to the micro pins, no other connections are needed.
 
no i think pull downs are needed, when the touch panel is not being touched upon, the voltage at the point of reading becomes floating..

i shall try it today, results to be posted soon,
thanks
 
HI i tried the setup presented in the link i provided earlier but with only two pull down resistors from the analogue read inputs to ground...

results: yes it worked better than the previous setup somewhat, probably there is some hidden fact in the composition of the touch screen i suppose...

results not ideal, i had to tune the value of the pull down resistors and the rate i sampled the touch screen such that i get the best range possible, still the range
doesn't vary between 0 to 255 grr, it goes in steps, so calibration is absolutely indispensable unless the usage is quite crude. by crude i mean, that the touch screen
is used say as a switch rather than to draw things for example...

this is quite problematic for me as i will have to introduce calibration which involves a lot of work for the poor micro.. ( loss of time rather :/)


if anyone has anything to comment such as that i am wrong and there's a way to get the full range without calibration it would be absolutely fabulous..

regards guys
10x
 
Ok I got my hands on an authentic Nintendo DS touchscreen and tested it. I applied 5 volts to one connection, ground to the opposing connection and one of the remaining connections went to my scope. The voltage when read on my scope went from 0-5v as my finger moved up the screen, it was a nice clean signal. Just connect the screen as described above and it will work. If it does not work check your code.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top