Hi, I wrote some code that uses clue.touch_0. It worked very well for a week or so until it just stopped. I rewrote code to use button_A, and it the code works. Rewrote back to touch_0 again, and it does not work. So I changed to touch_2, simply a rename, and the touch button_2 works as designed, but not button_0.
I tried it again using different code, a simple Adafruit example, and touch_0 does not work. Clearly, the Clue was rebooted numerous times during testing but has the touch_0 circuit been damaged? Pretty surprised if it was because I am very careful with the board. Static?
Thanks much for any Clues!
George
Clue touch failure
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- dastels
- Posts: 15817
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Clue touch failure
All I can think of is maybe you are/were in an especially staticy environment?
Dave
Dave
- Brewingeo
- Posts: 12
- Joined: Tue Feb 18, 2020 1:39 pm
Re: Clue touch failure
Hi Dave and thanks.... I programmed in touch_0 again and took Clue to a different room. The #0 pad is still not responsive to touch (it had excellent responsiveness before). Out of curiosity, I put a screwdriver on the pad and touched the medal shaft. Still no response. I used an eraser on the pad just in case it was tarnished.
I am using #1 for a sensor input, so perhaps I should switch that sensor to #0 to see if that pin works at all!
Thoughts?
Thanks,
George
I am using #1 for a sensor input, so perhaps I should switch that sensor to #0 to see if that pin works at all!
Thoughts?
Thanks,
George
- dastels
- Posts: 15817
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Clue touch failure
Definitely check if works for other uses.
I was more thinking about too much static change damaging it. Did you get a little static shock touching it at some point?But IMO a touch sensor input should be safe-guarded against that. I haven't looked into the hardware level docs on that chip.
Dave
I was more thinking about too much static change damaging it. Did you get a little static shock touching it at some point?But IMO a touch sensor input should be safe-guarded against that. I haven't looked into the hardware level docs on that chip.
Dave
- Brewingeo
- Posts: 12
- Joined: Tue Feb 18, 2020 1:39 pm
Re: Clue touch failure
Thanks again Dave. I do not recall a static release but, hey, it could have happened. Such a tiny board, I guess I wouldn't doubt that safeguards might be a bit tiny for the task.
George
George
- Brewingeo
- Posts: 12
- Joined: Tue Feb 18, 2020 1:39 pm
Re: Clue touch failure
It seems that touch_0 circuitry is faulty, blown. To recap, after numerous tests touch_1 and touch_2 work but under the same conditions, touch_0 does not.
To test the pad, I switched my sensor from D1 (pad #1) to D0 (touch pad 0), and switched touch_0 to touch_1. The program and the sensor work perfectly using touch_1 for my input. This means that circuitry for voltage information from the my sensor is functional, but touch circuitry is not.
Interesting!
George
To test the pad, I switched my sensor from D1 (pad #1) to D0 (touch pad 0), and switched touch_0 to touch_1. The program and the sensor work perfectly using touch_1 for my input. This means that circuitry for voltage information from the my sensor is functional, but touch circuitry is not.
Interesting!
George
- kevinjwalters
- Posts: 1026
- Joined: Sun Oct 01, 2017 3:15 pm
Re: Clue touch failure
The touch i/o implementations tend to have a one-off self-calibration feature when they are first used/instantiated. It would be interesting to see what your values are? Here's mine for a CLUE board held in the air, i.e. nothing near or touching the pads.
Once you have used the clue object's touch_0/etc you can't really re-use the pads as inputs until you re-initialised CircuitPython. If you restart CircuitPython then you could also check the analogue in with something like this. Unconnected it'll show you the floating voltage but it's easy to check its health by connected up the big GND or 3V pad over to pad 0 when it's configured as an input.
The (external) circuitry for touch i/o follows the micro:bit with a simple high value resistor attaching each pad to ground.
Code: Select all
Adafruit CircuitPython 5.0.0 on 2020-03-02; Adafruit CLUE nRF52840 Express with nRF52840
>>> from adafruit_clue import clue
>>> print(clue.touch_0, clue.touch_1, clue.touch_2)
False False False
>>> print([t.threshold for t in clue._touches])
[163, 150, 152]
Code: Select all
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0 on 2020-03-02; Adafruit CLUE nRF52840 Express with nRF52840
>>> import board, analogio
>>> ain = [analogio.AnalogIn(p) for p in (board.D0, board.D1, board.D2)]
>>> print([a.value for a in ain])
[1200, 400, 384]
>>> print([a.value for a in ain])
[704, 384, 304]
>>> print([a.value for a in ain]) # 3V pad connected to 0
[65472, 10208, 896]
- Brewingeo
- Posts: 12
- Joined: Tue Feb 18, 2020 1:39 pm
Re: Clue touch failure
Very interesting kevinjwalters! That's a tad above my pay grade so it will take me a little while to digest. I will send results soon. Cheers!
- Brewingeo
- Posts: 12
- Joined: Tue Feb 18, 2020 1:39 pm
Re: Clue touch failure
kevinjwalters, I executed the commands per your instructions and a result was:
print([t.threshold for t in clue._touches])
[100, 100, 152]
I then executed the additional commands and,
print([a.value for a in ain])
[0, 240, 320] ....... interesting, right?
then I configured 3v to 0 and,
print([a....etc)
[65280, 10080, 1056]
last, I disconnected 3v to 0 and
[112, 352, 384]
I rebooted and repeated the tests a few times and touch_0 always started at 0
print([t.threshold for t in clue._touches])
[100, 100, 152]
I then executed the additional commands and,
print([a.value for a in ain])
[0, 240, 320] ....... interesting, right?
then I configured 3v to 0 and,
print([a....etc)
[65280, 10080, 1056]
last, I disconnected 3v to 0 and
[112, 352, 384]
I rebooted and repeated the tests a few times and touch_0 always started at 0
- kevinjwalters
- Posts: 1026
- Joined: Sun Oct 01, 2017 3:15 pm
Re: Clue touch failure
Something is certainly amiss there but I'm not sure what that indicates without doing some more research. I'm sure you've already checked but it's worth a look down the sides of the gold metal for the wide #0 pad to make sure there's nothing connecting it up to the thin pads either side.
I was looking for something else and found some details on the ESD protection for the nrf52 processor series on Nordic SemiConductor DevZone: ESD protection for external button(human touch activated)?.
I was looking for something else and found some details on the ESD protection for the nrf52 processor series on Nordic SemiConductor DevZone: ESD protection for external button(human touch activated)?.
- kevinjwalters
- Posts: 1026
- Joined: Sun Oct 01, 2017 3:15 pm
Re: Clue touch failure
This isn't relevant to the CLUE issue but to correct my statement on micro:bit, it's similar but a bit different in how it does touch inputs, it has 10M pull-ups. From https://github.com/bbcmicrobit/hardware ... t_V1.5.PDF
Please be positive and constructive with your questions and comments.