Touch screen overlay with (eventualy) led matrix.

Okay, so im basically trying to make a monome clone using an arduino, a touch screen overlay and an 8x8 led matrix.

http://www.sparkfun.com/commerce/product_info.php?products_id=8977
That's the screen i want to use (or the PSP one)
And i think i need a controller, like this one

First question is how i connect this kind of controller to an arduino?
I've seen other posts similar but they seem to be quite specific.
The next problem will be making the touch screen talk to the leds and then to monome serial...hmmmm.

Thanks a lot :slight_smile:

....anyone with any experience using touchscreens with arduinos please post your experience.
I pretty sure that i can look at other peoples code and work out what to do but there's couple of pins on the example (http://post.monome.org/?PostBackAction=Download&AttachmentID=956) which just don't get,'pen interrupt' and 'converter status'. Also what would be the need for DATA IN?

The Pen interrupt is an output that, if enabled, will go low when ever something is touching the screen. This saves you time in that you don't have to pole the A/D converters just to see if it is being touched.
DATA IN is needed in order for you to tell the chip what to do, like "measure the Y" or "measure the x" or "use ratiometric conversion"

Converter status shows you if the A/D has finished measuring yet. It's all in the data sheet, have a good read.

Best of luck on your application, it was an idea I wanted to try but I can't get hold of the touch screens in the UK. My only concern would be if the resolution of the touch screen would be good enough or would my fingers be too fat.

Haha, yeah the ds screen is tiny. Im in the UK too, just got mine off ebay.
Thanks a lot for the reply, i was about starting to give up!
So i should be able to connect the screen to the chip and then to the arduino.
Could you give me a couple of snippets of code that i would need to read data from the chip?
Also what do i connect to what, or do i just use any old digital pin?
I'll have another look at the datasheet adn try not to let it al go over my head!
Cheers :slight_smile:

I have a theory that you don't need the maxim chip, you can read the touch sensor direct from the Arduino.

Connect the four lines from the touch sensor to Analogue inputs 0 to 3.
Then make 0 and 1 into digital output and put one high and the other low. The measure the voltages on inputs 2 and 3 and subtract them. That is the position in one direction.
Then to do the other make 0 and 1 into analogue inputs and 2 & 3 into digital outputs, put one high and the other low and measure inputs 0 & 1 and subtract them.
That way you should get the x and Y value of the press. Then it's just software to translate this into a LED position. It should be liner so you probably won't have to resort to look up tables.

Okay, well i got the maxim chip on the way as a sample so that's good. And the touchscreen should be here in a couple of days so i'll do some tests then. I thought about that idea but i couldn't think of away of switching from input to output.
Cheers.

I couldn't think of away of switching from input to output.

pinMode(14, OUTPUT);
digitalWrite(14, HIGH);

Makes it an output

pinMode(14, INPUT);
digitalWrite(14, LOW);

Makes it an input again (and turns off the pull up resistor)

Wow, I wanted to build a similar device (DS touchscreen + underlying matrix) a long time ago, but using it as a monome clone... brilliant ! Think of the same with an RGB matrix... I never ordered a touchscreen though, so i can't help you, but as far as i know, the DS touchscreen is resistive, so ther should be no problem with interfacing it. Keep us informed, im pretty curious about dealing with the moment when your finger is no more on the touchscreen :stuck_out_tongue:

Duh, brilliant thanks Mike!
@dwan - yep it is resisitive. I think the hardest bit will trying to make it talk to the monome serial application. I'll keep you posted, probably via a blog or something. Once i've got it up and running i'll post all of the code and schematics up.

I've just realised that i really only need to map areas of the touchpad to buttons presses and send them to monome serial, once that's done the led feedback should be easy.
Im not sure whether to use arduinome or monome serial, probably arduinome.
I'm gonna do a lot of reading up on arduino code tonight :slight_smile:

OK dovemose,
Thanks for pointing me to eBay for the touch screen, I have ordered two myself for a couple of projects, one of which would not be too far away from a monome.

Have you seen my mini monome in the exhibition postings, I just put up the web page today? I used AduinomeSerial for that and my code is a lot simpler than the arduinome basically because I didn't have to do anything in the way of debouncing because the switch scanning is tied to the LED multiplexing and so is naturally debounced.

Yeah, i saw that. I'm just going to check out the firmware you've written now. Let me know when you get your screens and we can give each other pointers on how to get it working with an arduino :slight_smile:
Cheers.

I think the trick to interface these resistive touchpads to Arduino, is to realize that Arduinos analog inputs also can work as digital outputs.

I think it is possible to use 4 analog pins in pairs of 2.

First one pair is used as digital outs to put 5V across the top and bottom wires on the pad, and the other pair is used as analog inputs to do ADC conversion on the two side wires on the pad.

Then you reveres the whole process.

You wont get any "Pen touch" interrupt that way, so some kind of constant polling or function you can call when needed is required.

There wil probably also be some calibration issues to deal with, just as there is with many of the handheld "palm devices" where you sometimes have to tap the screen in the upper left and lower right corners to calibrate the digitizer.

Yeah calibration is something i've been thinking about i think there's a tutorial on something like that on the arduino site so i'll have a read of it.
Cheers for the input.

And by the way :

A cheap source for resistive touchpads is to find a broken / tossed out palm device.

OR

http://www.dealextreme.com/details.dx/sku.14919

(5$ US - free shipping)

Dealextreme have other ones as well

Broken palms are a good idea.
Me and xndr from machinecollective.org are trying to put together a kit to make your own hopefully using a 7" touch screen for modding an eee pc.

then this might be interesting:

http://www.dealextreme.com/details.dx/sku.12561

Hi all,

I have managed to get ADC on one axis of a 4 wire resistive pad using arduino.
I connected the "x axis" wires across 5v and analogRead on both "y axis" wires and added them together. This gives good readings for the x axis.
Now to get readings for the y axis i'll need to switch the analogRead pins with digitalWrite, and visa versa. BUT the analogRead pins need pull down resistors (i've used 220ohm to ground).
I would need to keep the resistors to ground on all 4 pins (as all 4 will be connected to analogRead at some point in the loop) but I think this will cause problems for the pin assigned digitalWrite HIGH!

Any thoughts on this would be much appreciated! Are there internal pull down resistors for analogRead on arduino?

Cheers

Gareth