Basically I am trying to stimulate a touch screen with an arduino board. I know this has been asked several times and Ive spent a long time looking at solutions, namely some kind of foil stuck to a touch screen being pulled to phones ground, or USB shield, or arduino earth, or a fruit or your body etc. I have tried all of this and more, using a transistor, MOSFET, optocoupler, and even a relay. All while holding the phone, or on the table or on top of a foil sheet or a grounded foil sheet etc… I have had varying success with all of them but nothing reliable and repeatable long term.
The relay has been the most successful, connecting foil via the armeture switch to the phones ground. If I set the arduino to pulse the relay closed for 100ms every 2000ms in this case, Interestingly I find a consistent result: when I place the foil a touch occurs and isn't released, the foil and wire are enough to do it. After between 30 seconds to a minute, the touch is released and touch events start pulsing with the arduinos input via the relay, and after 30 seconds to a minute or so longer, the screen stops responding all together, even to finger touches on the back of the foil – where this produced a touch event beforehand.
So I figure the screen is adapting to the environment. Just as it would need to if you were using your phone standing on a flag pole vs leaning against the steel wall of a truck. For some reason it decides the foil is environmental noise and 'numbs' that area of the screen to it.
So my question is, is there a way to reset the capacitive field image between each touch, or is there a different method to achieve touch events using the arduino?
Attached is a basic schematic of the circuit. Pin 2 is switching from LOW to HIGH for 100ms, then to LOW, for 2 seconds, and the relay clicks closed accordingly. The wire labeled 'Wire A' has been tried a variety of ways. To iPhone Gnd like it is, to Arduino Gnd, to my fingers, to a piece of foil laid under the iPhone. Additionally I have tried all these combinations with a 1000k resistor in series, and capacitors varying from 100pf to 100nf, separately and together with the resistor.
The underlying problem is the piece of foil stuck to the screen. The iPhone sensor seems to be able to determine its proximity is not changing, even if its electrical characteristics are.