(so many of my posts begin like this): "I recently hacked a resistive touchscreen"....
The underlying method requires a loop which sets one axis to 5v (digitalWrite, HIGH) and gnd (digitalWrite, LOW), while the other axis is read. The axes are then inverted. this gives me continuous X-Y axis readings and works really well.
I am now attempting to implement a DIY solution, using a similar method: rows of copper fabric strips, a sheet of Velostat, and columns of copper fabric strips. My question is one of feasability: should I expect similar functionality using the same method? I'm hoping to set columns to 5v, rows to read, then invert and set columns to read and rows to 5v and then loop. Would this allow me access to continuous X-Y data? Someone suggested a 'new' method of: fixing rows to gnd/read and cycling through each of the 5v columns one by one (not too sure how to realise this in code), but would the above method work too?
This question was referred to in a different but related post; I'm sure this doesn't infringe double-posting rules.
Hi Norn Iron Arduinoids, County Down-based Arduino/MaxMSP geek here, would love to hear from/meet/share with other Arduinoids. You can see some of my work here (i'm completing a PhD in digital musical instrument design):
Hi thanks for replying. Maybe cos it's quite late at night, but i'm not sure I understand; I included the top diagram to demonstrate my intial thoughts. The proposed setup in that diagram might be powered thus:
set the bottom layer of columns to read (input); set the top layer of rows to 5v; (let voltage settle, c. 5ms); set the top layer of rows to read; set the bottom layer of columns to 5v;
and the second diagram is a simplified version of this (using only 2 columns and rows).
Do you mean that I might read continuously from the bottom layer of columns, if I alternate or cycle through the 5v rows? Sorry, I appreciate you assuming I might not be a n00b, but, derpa derpa, I am. Could you clarify what you mean, perhaps in pseudo-code?
Hi this question is a little long-winded, so please bear with me....
I recently hacked a cheap resistive touchpanel; the implementation was unsuccessful but I was intrigued by the practicalities of pulsing each axis to get continuous X-Y location data - each axis is rapidly switched between a read function and a 5v function. In the end the noisy data prevented further use.
I am currently working on a 5x3 grid of DIY force sensors, which works well, giving me 15 discrete touch locations and Z-axis force data:
Following an idea by Randy Jones, who successfully implemented a multitouch FSR matrix:
I am considering extending the grid into an 8x8 matrix, which will give me 64 discrete locations, Z-axis force and greater opportunity for interpolation across the entire matrix.
My question is: can I 'hijack' the rapid switching idea from the resistive touchpanel (power the X axis, read the Y, then power the Y axis and read the X?) in my DIY FSR matrix.
My initial concept was for 8 strips of copper fabric (all connected to 5v) laid out in rows, then a layer of velostat, then 8 columns of copper fabric connected to the read inputs via pulldown resistors. It occured to me that I could only get ONE axis reading for this circuit (as depicted in the first diagram above); but would it be possible to get discrete X-Y touch location by rapidly alternating reading and powering to the circuit? I could easily build and code for this, but what I don't know is, how would I interpolate between reading X axis and Y axis to give me one reading (for each of the 4 points in the second diagram above)?
Ok now I understand, my OP was a little misleading (suggesting only one 220R); correct, I am using 15x220R, but my readings changed and I assumed there was a error in my circuit. My other error was assuming that sensor1 would get 5v (being physically closest to the 5v pin) and sensor 15 would get something less than 5v, being furthest away.
Hi I really need discrete input from each sensor (I'm building an accessible digital musical instrument). A single version of this circuit (ie, 1x220R pulldown) gives me a serial monitor reading of approx 0 - 620, when I start to duplicate and add sensors, the readings for each sensor become c. 300 - 900. My question really is, can I use 15 resistors, a single 5v pin and a common ground (to allow discrete readings from each sensor) and if so what resistor value? Forgive the n00bosity,
many thanks Brendan ps perhaps you might suggest a more robust solution
You suggest the 220R is too low when using multiple FSRs; what value can you suggest? I only have one 5v output pin (Mega2560) - the reason I suggested 15x5v from the digPins was, if one circuit works, then duplicate it 15 times to ensure success?? Here's a sketch of my current circuit:
I have built 15 DIY force sensors: copper fabric/velostat/copper fabric sandwich, one side to 5v, the other to pin via pulldown 220R. If I connect them all in series, ie 15 x 220R (common ground) running off a single 5v pin, should I expect the same response off each sensor? Or will the current vary (reduce) from sensor 1 to sensor 15. Should I use 15 digital pins (OUTPUT, HIGH) to power each sensor with its own 5v?
This may well be the wrong sub-forum; but I wish to maximize exposure and this appears to be the most popular venue, so......
My new blog covers all aspects of my journey through sensor-hacking, coding/patching and interaction design, focusing exclusively on Arduino and MaxMSP. Please feel free to visit and comment, ridicule, disagree etc.
I have a fair idea of what this is doing, but as it isn't functioning as expected, could someone review it to identify any flaws or improvements please? what currently happens is that when the pot isn't moved I get zero, when the pot is moved slowly I get low delta; when moved quickly I get high values BUT the delta value is relative to the pot value itself, so in the low pot range, low delta is low - when the pot is in the high range, low delta is actually high!
Hallo board I have a simple coding question, but first here's my hardware set up -
I have hacked a 4-wire resistive touch panel, as follows: panel pins 1-4 = X+, Y+, X-, Y-; X+ =(5V or read) X- =(gnd or open); Y+ =(5v or read) Y- =(gnd or open); the read lines are pulled down to ground
The circuit has been optimized for clean voltages, and the data is also fairly clean when using a stylus or pen etc. When using a fingertip, however, the voltages ramp up to the XY location, representing fingertip flesh expansion and contraction during contact and release; such jitter is not present when using a stylus etc.
Here's my code:
/* TOUCHSCREEN ELECTRODE PAIRS= X1-X2, Y1-Y2 connect as A0=X1, A1=Y1, A2=X2, A3=Y2; A0 and A1 alternate readings, so 1kR pulldown to gnd on these; 'open circuit' floating values cured via digitalWrite to 0v on A2 and A3 */ int xVal = 0; int yVal = 0;