2016-04-18 06:18 AM
Hi everyone,
I'm trying to set up 3 capacitive touch keys using HAL touch sensing controller library but I'm facing some problems. I followed the instructions in AN2869 application note for implementing one sensor using Active Shield. The TSC is initialized with CubeMX. I have a 10mm x10mm copper touch key connected to pin PA6 (G2_IO3) and the corresponding sampling capacitor (10nF) on PA7 (G2_IO4). The active shield is connected to PA11 (G4_IO3) and correponding sampling capacitor is on PA12 (G4_IO4). I placed a 2.5mm plastic overlay on the touch key. The problem is that I have too much parasistic capacitance and a touch is always detected. I tried to disconnect the touch key from the mcu but even without the touch key I see the voltage on the sampling capacitor increasing with the counts. What am I doing wrong ? Is the touch sensing controller on STM32L053 nucleo board recommended to detect touch events through 2.5mm plastic overlay ? Thank you, #stm32l053r8-nucleo #touch-sensing #touch-sensing2016-04-19 10:20 PM
Hi,
try to use greater capacitor and series resistor (in my app I used 30nF and 4R7)2017-08-29 04:14 AM
Hello Lucas,
the charge transfer principle useselectrical properties of a capacitor.
In the first step you charge the sensor capacitanceto VDD. Then, part of this charge is transferred to sampling capacitor.
This is repeated several times until voltage on sampling capacitor reaches the VIH level (minimum input voltage to be considered as HIGH).
After that the acquisition is over and the number of cycles needed to charge sampling capacitor to this level represents the sensorcapacitance.
By touching a touch key you increase the sensorcapacitance, thus the sampling capacitor is charged faster and the number of cycles decreases.
You basically connect a small capacitor in parallel.
Even if you disconnect the touch key, there is still the pin capacitance, i.e.the voltage on sampling capacitor will be always increasing during the acquisition.
You are probably facing sensitivity issues. There are severaltechniques to increase sensitivity described in the AN4312Guidelines for designing touch sensing application with surface sensors, but since you are not at the stage of PCB design, it won't help us in this case. Anyway, I would recommend to read this application note thoroughly.
You may find helpful AN4316Tuning a STMTouch-based application.
I am attaching it.
The best what you can do now is to play a little bit with the sampling capacitor value as advised by Lukas.
https://community.st.com/tags#/?tags=touch%20sensing
________________ Attachments : AN4316.pdf : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyTS&d=%2Fa%2F0X0000000b8J%2FYSpk.VavguCBZ3bx9AqE_.Ds5_mcoHcSPsmv.7L6.N4&asPdf=false