Open richardstefun opened 1 year ago
I found a temporary workaround, by setting the voltage as such:
touch_pad_set_voltage(TOUCH_HVOLT_2V4, TOUCH_PAD_LOW_VOLTAGE_THRESHOLD, TOUCH_HVOLT_ATTEN_1V5);
Now it does not hang with the sensor size I use.. But if I increase the size, it still hangs
@richardstefun Hi, Please make sure all the enabled touch IO are not configured to other functions, and Do not connect the enabled touch IO to other hardware.
@leeebo I use official example for the library, and the pins are not connected to other hardware
@richardstefun Which development board are you using?
@leeebo custom board with integrated touch pads (exposed pads, direct contact with skin)
Unfortunately, it also hangs with the "touch_pad_interrupt" example
@richardstefun Both example works for me:
As your example enabled T4-T14
, for esp32s3 that means all GPIO4-GPIO14
can only be used for touch, if one of the pins was accidentally connected to another device, the touch sensor will be trapped in this pin, it's causing abnormal readings in other channels also.
Please double check the hardware, or use the dev-kit board to test the code first.
@leeebo
I made this simple setup using a generic devboard, where the abnormality can be tested:
When you run the example and touch all three metal electrodes, the reading hangs..
What is more interesting, if I touch just one metal plate and GND, the reading hangs, until I stop touching the electrode. After few seconds, the readings come back to normal (Some internal capacitor needs to discharge? Just guessing..). When I repeat this with two electrodes, the time it takes to restore the readings is much longer. But the case where I touch three electrodes causes the readings to hang indefinitely..
@richardstefun The coin is equivalent to a large capacitor, which takes longer to charge and discharge, so it may have caused the overflow of some registers in touch.
Here are some solutions, please consider choosing 1 or more:
@leeebo
Thank you for the tips. I currently fixed it by covering the touch plates with a foil, but I'll implement more of your suggestions to be sure
Thank you @richardstefun and @leeebo. I found this issue Googling, as I had a similar coin-sized touch sensor.
My sensor was fine touching lightly or for a second at a time, but one tight squeeze or a few seconds holding and it would max out the sensor input and stay stuck at the high sensor reading value.
Based on @leeebo's suggestions, my solution was to apply a coat of fingernail polish to my brass disc sensor. That lowered the conductivity between the sensor and the finger, and seems to now be highly predictable. I like that I can potentially apply more or less nail polish to adjust how high or low a sensor reading I want. Thank you for the suggestion!
Answers checklist.
IDF version.
v5.1.1
Operating System used.
Windows
How did you build your project?
Command line with Make
If you are using Windows, please specify command line type.
PowerShell
Development Kit.
Custom board
Power Supply used.
External 3.3V
What is the expected behavior?
The library should not hang at any time
What is the actual behavior?
When more firmly touching the capacitive sensor, the library hangs and reports the same values
Steps to reproduce.
Debug Logs.
No response
More Information.
Before touching:
After touching (Observe how the first value starts to rise and then all values hang..):