Capacitive linear slider -- Delta values make sense, but position readout does not
- December 11, 2022
- 4 replies
- 2757 views
I am trying to get a linear slider (capacitive touch) to work on the STM32F373. The Delta values for the individual electrodes make sense, but the position calculated by the TSL library does not. Please see the details and attached chart.
Using a three-segment linear slider, full electrodes (no half ends); I have chosen the M1 Basic type. I am using HAL, TSL, and the STM32CubeIDE code generator. Normalization of the Delta values is turned on, and I have determined suitable correction factors.
(a) The Delta values for the three electrodes look plausible when I scan my finger over the sensor -- see the three thin lines in the attached plot. But are they expected to be in the 1000s of counts? (Why can I only specify a detection threshold from 0..255 in the TSL parameters?!)
(b) The Position which TSL calclulates from these is total nonsense -- see the fat orange line in the plot. Note how the "position" flips just at the crossover points where another segment signal becomes the strongest one. What is up with this readout?! Am I reading the wrong variable? Is some critical parameter missing?
Thank you for you help!
