touch screen click emulation

Adafruit's tiny microcontroller platform. Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
plodozhor
 
Posts: 12
Joined: Tue Feb 02, 2021 10:11 am

touch screen click emulation

Post by plodozhor »

Hello,

I finally received the STEMMA relay and linked it to Trinket M0 in order to emulate clicks on a capacitive touch screen, in a manner very similar to this picture:
Image

The problem is that it works only let's say 10% of time. Let's say, 1 minute or 2. Then it stops and comes back to work after certain period. The Trinket itself functions fine - I had set up indicator LEDs. I initially had the following relay configuration: 5 seconds timer on NC then 0.9 sec NO (i.e. during 0.9 sec the GND signal was conducted to the touchscreen). But I found that applying NC to the touch screen works better than NO (strange!).
I tried all combinations and ended up having 0.2 sec NC / 0.2 sec NO works the best. Yet, anyway, the process gets stuck sometimes and then automatically comes back after 5 minutes or so. First I tried to scotch-tape the tin foil to the screen, then soldered a wire to a metal bolt and put it to the screen - but it worked even worse. The Trinket's GPIO works fine, the LEDs are flashing. However, the best results in terms of stability were achieved when I disconnected the LEDs - the process lasted around 5 minutes and then got stuck.

My theory something is wrong within the link between Trinket's GND and capacitive screen. Maybe some capacity gets 'collected' inside of the wire and it takes some time for it to 'dissipate'. I am totally illiterate in physics so maybe someone could suggest how to improve the scheme?

p.s. what I found interesting - when connecting LEDs to both NC and NO outs of the STEMMA relay, the pulse going from NO is way more shorter than from NC. For example when both outs are configured to be 0.5s/0.5s, NC LED flashes full 0.5s and NO LED only 0.1s or so

User avatar
plodozhor
 
Posts: 12
Joined: Tue Feb 02, 2021 10:11 am

Re: touch screen click emulation

Post by plodozhor »

OK problem solved. I changed the tin foil configuration and the clicks work just fine now.

Locked
Please be positive and constructive with your questions and comments.

Return to “Trinket ATTiny, Trinket M0”