Some of STM32 MCUs are equipped with TSC (Touch Sensing Controller), whose hardware performance is not bad compared to ASIC solutions. It is a self-sufficient module supporting multi-touch. And you can lower the power consumption down to few tens of micro amps.
Setting up the TSC requires to select one port for sampling for each group. One group consists of one sampling channel, where a sampling capacitor is connected, with one or more measurement channel, where a sensor pad is connected.
Charge transfer happens from a measurement channel to the sampling channel. This is done independently from other groups. Thus channels belongs to each group are measured at the same time. In the same group, however measurement should be done sequentially among channels.
A PCB touch panel (on the right) is connected to a STM32L052 MCU.
The MCU is programmed to measure the touch sensor value at every 100 msec. It transfers the measurement to a PC via UART connection. On the PC side, a python utility is prepared to collect data.
It also show real-time plots as well as simple set of statistical data. From this data, you can easily check some characteristics of the touch pad such as SNR, long-term drift, as well as the effect of the front cover structure on the sensitivity of the sensor.
Depending on the situation, minimum SNR of around 4 is desired for the reliable operation. If the SNR is smaller than 3 then, additional post processing is required. If the noise is random, simple averaging can enhance the SNR effectively. In more complicated cases, you may need to activate the spread spectrum (clock jittering) feature of the controller.
<<source code>>
Setting up the TSC requires to select one port for sampling for each group. One group consists of one sampling channel, where a sampling capacitor is connected, with one or more measurement channel, where a sensor pad is connected.
A PCB touch panel (on the right) is connected to a STM32L052 MCU.
The MCU is programmed to measure the touch sensor value at every 100 msec. It transfers the measurement to a PC via UART connection. On the PC side, a python utility is prepared to collect data.
It also show real-time plots as well as simple set of statistical data. From this data, you can easily check some characteristics of the touch pad such as SNR, long-term drift, as well as the effect of the front cover structure on the sensitivity of the sensor.
Depending on the situation, minimum SNR of around 4 is desired for the reliable operation. If the SNR is smaller than 3 then, additional post processing is required. If the noise is random, simple averaging can enhance the SNR effectively. In more complicated cases, you may need to activate the spread spectrum (clock jittering) feature of the controller.
<<source code>>
Comments
Post a Comment