janelia-arduino / AT42QT

Arduino library for the Microchip AT42QT series capacitive touch sensors.
Other
6 stars 2 forks source link

Touching Key 0 triggers a recalibration on Key 1-11 (AT42QT2120) #2

Open Henne1693 opened 7 months ago

Henne1693 commented 7 months ago

Hi everyone,

I would like to operate the AT42QT2120 chip with 12 keys in comms mode without auto-recalibration. So I have set the following parameters: Wheel/slider disabled; Touch Recal Delay = 0 (≙ infinite recalibration time); Acquisition/Low Power Mode = 4 (interval count); Key Threshold = 100; Charge Duration = 255; TTD, ATD, DI, DHT = default values (see datasheet: https://www.mouser.de/datasheet/2/268/doc9634-1369146.pdf)

My test setup initially consists of 9 touch keys, which are connected to the respective pins 0 to 8 via a 4.7 kOhm resistor. Pins 9-11 are unused, which is why I set bit 0 in the respective key control register to 1. To check this, I displayed the register entries for each key. image Error description: If only a single touch key is touched, the touch detection functions correctly. As soon as the key signal of a pin exceeds the respective reference signal by the set threshold value, the key status changes from 0 to 1. As long as key 0 remains untouched, the touch detection also works as expected with several touch keys. image However, if one of the keys 1-8 is pressed in combination with key 0, the reference signal of the other touch key is set to a different value. Accordingly, no touch is detected on the respective pin. The following output shows the behavior using key 8 as an example. Key 0 and key 8 are both pressed at this time. image After releasing both touch keys, key 8 incorrectly signals that it is being touched, as the reference signal has been reduced to the value 300. image The same behavior occurs when key 0 is pressed in combination with one of the touch keys 2-7. However, if key 0 is pressed in combination with key 1, both keys are recalibrated. Consequently, no detection takes place. image After releasing, both status bits are set afterwards. image I have now tested the code on three different AT42QT2120 chips, but the behavior is identical. Is anyone aware of this problem or has an explanation for this phenomenon?

Thank you very much :)