STM8 Microcontrollers – the Final Chapters

Hardware

Capacitive Touch Overview

Electronics and embedded-systems advancing fast. Designers and users are moving toward electronic solutions over mechanical ones. Touch screens, touchpads and touch switches are getting popular like never before and are replacing traditional mechanical switches, knobs, etc. ST like many other microcontroller manufacturers have provided resources for implementing capacitive touch buttons. However, the algorithm for implementing reliable capacitive touch sensors is a bit complicated especially when it comes to an 8-bit microcontroller. For this reason, ST has provided capacitive touch libraries for its STM8 and STM32 product line. These libraries along with SPL enable us to quickly and effectively add capacitive touch functionality in our designs.

Capacitive Touch

In STM8s, RC acquisition principle is used to implement capacitive touch sensors. No special hardware is required for implementing RC-based capacitive touch buttons/sliders/wheels. Just timers and GPIOs are all that are needed to get the job done. RC acquisition method detects a human touch on a capacitive touch sensor (acquisition pin/pins) by measuring small variations of the touch electrode’s capacitance. Capacitance exists between acquisition electrodes and ground. The touch electrode capacitance is periodically charged and discharged through a fixed resistor called load resistor by altering the logic state of the load I/O. A touch electrode’s capacitance depends on its area, relative dielectric constant of the insulator in-between, the relative permittivity of air and the distance between the two electrodes. Additionally, an active shield is used to get rid of parasitic capacitance between touch electrode(s) and ground. Parasitic capacitances originate due to environmental effects and other foreign objects. An active shield surrounds touch electrode(s) and maintain same in-phase potential. This leads to zero potential difference between the electrode(s) and shield, and thereby no parasitic capacitance builds up.

ST’s application note AN2927 details capacitive touch sensing.

Continue Reading ...

Related Posts

2 comments

Leave a Reply

Your email address will not be published. Required fields are marked *