- SAMD21 (on an Adafruit Trinket M0)
- Single Self-Capacitance Sensor (basically a penny) with no dielectric between sensor and touch (direct contact w/finger)
- 300mm Single Conductor Shielded Cable to connect sensor to uC, shield is grounded at uC.
- External 10k Resistor @ uC in series with sensor for ESD protection
- Internal Resistance set to 20K
The shielded cable is necessary because the cable runs in a track along with other wires which can cause false detections via crosstalk.
When not using a shielded cable, the 'result' counts for a touch go up. When using the shielded cable, the 'result' counts go down instead of up (AKA "inverted"). I'm assuming the parasitic capacitance of the shielded cable is quite large. Perhaps when I touch the sensor I'm reducing the capacitance of the system, which causes the 'result' counts to drop. If someone understands the physics here, do tell. My guess is that my body acts as a capacitor in series with the electrode, and having a lower capacitance than the cable, the total capacitance drops. I get excellent sensitivity to touch (not proximity). Tests thus far show it to be very robust, performing even better with moisture.
I have tried separately putting a 22pF and 5pF capacitor in series with the electrode on the uC side of the ESD resistor to effectively lower the total electrode capacitance. This makes the touch response positive (counts go up) when touched, however the sensitivity is extremely reduced.
I'll be moving to a legitimate dev board soon (SAMD21 Nano or ATmega328PB XMini). So planning ahead, is operating in "inverse" detection valid for production?
Additionally, wanting to wake on touch, is it possible to detect an "inverted" touch while in sleep or does wake on touch require a positive touch 'result'?