Hardware Design For Capacitive Touch: AN0040 - Application Note
Hardware Design For Capacitive Touch: AN0040 - Application Note
Hardware Design For Capacitive Touch: AN0040 - Application Note
Introduction
This application note covers the basics of hardware design for capacitive touch
sensing with the EFM32 microcontrollers. Both simple touch buttons and more
advanced sliders and touch matrices are described, along with key pointers of how
to achieve the best possible capacitive touch performance with the EFM32. For
the lowest energy consumption and "wake on touch" functionality, an EFM32 with
LESENSE should be used.
This application note focuses on how to design hardware for capacitive touch with
the EFM32 microcontroller. For code examples, please refer to the capacitive touch
software application note (AN0028).
1 Introduction
Capacitive sensing is a technology now widespread across different industries. High performance
capacitive sensors are capable of high resolution measurements of proximity, position, humidity, fluid
levels or acceleration of a conductive target. Lower cost capacitive touch sensors are less advanced are
and mostly used for human-device interfaces by measuring the capacitance change when a user's finger
is nearby. These kind of sensors are increasingly common in devices with a human interface of all sorts.
This application note will focus on sensors used to interface with human users in applications focused on
very low power. Low power capacitive touch with the EFM32 can be implemented at low cost and bring
many advantages over mechanical switches. They have no moving parts which gives less degradation
over time, with usage and with environmental changes. The EFM32 capacitive touch feature is primarily
made for implementing capacitive touch buttons and sliders with very low energy consumption, but it
can also be adapted to other capacitive sensing applications.
All EFM32's with analog comparator(s) are capable of capacitive touch. For the absolute lowest energy
consumption, EFM32's with LESENSE (Low Energy Sensor Interface) can use this peripheral to scan
several touch pads continuously and only wake the CPU when a touch is detected.
Regardless of which EFM32 is used for capacitive touch sensing, the design of printed circuit boards or
similar hardware for capacitive touch sensing follows the same guidelines which are explained further
in this document.
C touch
Virtual ground
Copper
Overlay
Ground Gound
C base
When implementing a capacitive touch sensor there are a few possible configurations which can be
categorized in two different types; self- and mutual-capacitance. The difference is between which two
nodes the capacitance is measured. It can either be between the touch pad and another electrode with
different potential than ground, which is the mutual-capacitance type of setup. Or it can be between the
touch pad and ground, which is the self-capacitance type of setup. The EFM32 is designed for self-
capacitance measurements where the change in capacitance between a touch-pad and ground is the
measured entity.
The EFM32s way of measuring changes in capacitance is by using the analog comparator to set up
an RC relaxation oscillator. The oscillating circuit includes the capacitance between the touch-pad and
ground as the capacitive element. The implementation can be seen in Figure 2.2 (p. 4). By counting
the number of oscillations during a fixed time interval, an indication of the capacitance in the RC circuit
is acquired. This count value can be compared against a threshold value to determine if a sensor is
touched or not because a change in count value indicates a change in capacitance.
Buttons
POSSEL
VDD_SCALED
VDD/ 4
The quality of a touch measurement is correlated with how much the capacitance between the pad and
ground changes upon human touch. This can be directly translated to how large the observed change
in count value is when a human finger touches the pad compared to the non-touched count value. The
goal of hardware design for capacitive touch is to maximize this change when a human finger touches
a pad as well as minimize sources of noise.
Figure 2.1 (p. 3) illustrates a typical capacitive touch button with a finger approaching. The term
"virtual ground" refers to the fact that a finger placed close to the capacitive touch pad acts as an electrical
body which has a finite impedance to the capacitive touch circuit's own ground.
The typical parameters of the RC oscillator and the capacitance of a pad is listed below.
The SNR definition used in this application note is the same as for the capacitive touch software
application note (AN0028). Any definition of SNR could in principle be used to compare different
hardware designs. The one chosen here is based on the measurement principle that is used by the
EFM32.
A given capacitance between the pad and ground is represented by a count value as described in
Section 2.1 (p. 3) . The "signal" refers to the difference between the average count for touch and
no touch. The ratio between this difference and the noise for an untouched button is the SNR. See
Figure 2.3 (p. 5) for an example of SNR. As illustrated the target is to keep the SNR higher than 5.
The term "noise" as used in this document refers to the absolute peak to peak difference observed in
the count values for otherwise static conditions. This is a useful definition since the statistical distribution
is unknown and less frequently occurring peak values should be taken into account because they can
look like false touches.
Note
As a rule of thumb, the SNR should be above 5.
When developing a capacitive touch application one should check that the SNR criterion is fulfilled for
the actual PCB with the final overlay (same material and thickness that will be used). For evaluation of
the SNR the reader is referred to the capacitive touch software application note (AN0028).
Signal = 5*e
Touch Values
• Radiated and conducted noise from other components, traces and power supply. (Hardware)
• Changes or noise in supply voltage. (Software/Hardware)
• Changes in temperature. (Software)
• Changes in humidity. (Software)
• Jitter in the low frequency (LF) oscillator frequency. (Hardware)
This document focuses on minimizing the hardware related disturbances. The ones marked software is
discussed in the capacitive touch software application note (AN0028).
3 Sensor Design
How the actual touch pads and printed circuit board are designed has a significant impact on the
performance of the capacitive touch solution. Parameters such as size and shape of the pads and
how the signals are routed affects the signal integrity. The following section discusses what affects
performance and best design practices.
Prim ary
Layer Hatched Ground
GND Clearance
S
D
Touch Pad
3.1.3 Spacing
It is important that the touch pads are spaced far enough apart so that a touch does not also trigger
neighboring pads. This can be handled by software as well, because almost always, one of the pads
will have the strongest signal.
The spacing is also dependent on the thickness of the overlay. For thin overlays the signal will in general
be much stronger on the touched pad than the neighboring pads compared to thicker overlays. As a
general rule, the spacing between the border of two pads should be equal to or greater than the overlay
thickness.
3.2 Sliders
For sliders, the most significant difference from buttons is that two or more pads will be affected by a
single touching finger at the same time. In practice this means that the pads are placed closer together
and software interprets the finger's position by interpolating measurements from several pads.
EFM32
Touching finger
1 2 3 4 2 4 1 3
Signal levels
1 2
8 3
7 4
6 5
Row 1 1 2 3
Row 2 4 5 6
Row 3 7 8 9
Row 4
* 0 #
Colum n 1 Colum n 2 Colum n 3
If other traces must be placed through the touch area they should be kept as far away from the touch
pad and touch traces as possible. They should cross perpendicular to the touch traces and not routed
alongside, parallel to any touch traces.
The touch traces should be taken down to the secondary side of the PCB at the edge of the touch pad
to get them as far away as possible from the touch surface. This will ensure that a touching finger only
affects the actual pads and not the traces.
The traces should be kept thin, 0.2 mm for example, and not placed too close together in order to avoid
that they affect each other. The EFM32 senses capacitance on different channels sequentially, so the
chance of the touch traces affecting each other should be minimal. A spacing of 0.5 mm is sufficient, the
most important thing is to keep the traces short and away from noise sources.
4.1.2 Ground
How much and how close the touch pads are to the ground pour affects the nominal capacitance. A
large nominal capacitance gives high resistance against noise but the change in capacitance introduced
by a finger nearby is also reduced. To keep the nominal capacitance relatively low, the ground pour
should be hatched. A fill percentage of 10-40% is fine when overlay thickness is less than 4 mm. For
thicker overlays, a less dense ground layer will result in less nominal capacitance and better response
upon touch (3-15% fill).
The ground pour should be on the same side as the pads with a few millimeters clearance to the pads
(1.5 mm - 4 mm). See Figure 3.1 (p. 6) for an illustration of simple buttons with ground pour.
If protection against touches from the secondary side is needed, the secondary side should be filled
with ground pour which acts as shielding. This added shield will increase the nominal capacitance which
decreases sensitivity and SNR, again the fill ratio of the shield can be reduced to affect the nominal
capacitance less, but this will also reduce the effectiveness of the shield. For a 10 mm button, the
achievable overlay thickness is decreased with approximately 3 millimeters with the secondary side
shielded by a 100% filled ground layer. See Figure 4.1 (p. 11) for a comparison of SNR between
ground shield and no ground shield on the secondary side.
SNR
1000
100
10
4.2 Overlay
Since a capacitive touch button is actually a capacitor where a human finger acts as one of the plates,
the distance and dielectric constant of the material between the touch pad and the human finger
determines the capacitance. The shorter the distance and the higher the dielectric constant, the higher
the capacitance. To reduce noise and possibly false touches on neighboring pads, it is important that
the overlay does not flex when a finger touches the surface. The overlay should be glued or clamped to
the PCB so that they do not move relative to each other upon touch or other external forces.
SNR
1000
100
10
For fixing the overlay in place on top of the touch PCB a proper adhesive or clamping solution should
be implemented. An example of an acrylic bonding product is the 200MP series from 3M. Many other
products exists for different overlay materials. The important thing is to minimize the air-gap and distance
as much as possible.
Air 1
Paper 3.8
Glass 3.7 - 10
Water 80
Polyimide 3.4
Polyethylene 2.2
4.3.1 Flex-PCB
The capacitive touch pads can be implemented on a flexible PCB. The connection between the main
PCB and the flex-pcb with the buttons will also be touch sensitive. The construction should be kept stable
and away from noise sources. This solution is illustrated in Figure 4.3 (p. 13) .
Overlay
GND Pad GND
Flex PCB
Connector
PCB
Overlay
Gound
C base
to implement a low frequency crystal oscillator (LFXO) when implementing capacitive touch with the
EFM32. The SNR achievable with a crystal oscillator is around 30 times better than the SNR achieved
with the internal low frequency RC oscillator clock source.
Vdd
100R
MCU- pin
Touch pad
5 Summary
Hardware design for capacitive touch can involve a range of conflicting design requirements. This
document includes some guidelines and ideas which should be considered when deciding between
the many trade-offs during product development. The most important tips regarding PCB layout for
capacitive touch is listed in the following table.
The included zip file with a pcb-design for a tiny gecko device demonstrates how these rules can
successfully be followed in a two-layer design.
Note
Remember that proper software calibration is required regardless of the PCB layout and
product design.
6 Revision History
6.1 Revision 1.02
2013-09-03
Initial revision.
B Contact Information
Silicon Laboratories Inc.
400 West Cesar Chavez
Austin, TX 78701
Table of Contents
1. Introduction .............................................................................................................................................. 2
2. Capacitive Sensing Basics .......................................................................................................................... 3
2.1. Working Principle ............................................................................................................................ 3
2.2. Signal-to-Noise Ratio ....................................................................................................................... 4
2.3. External Disturbances ...................................................................................................................... 5
3. Sensor Design .......................................................................................................................................... 6
3.1. Touch Buttons ................................................................................................................................ 6
3.2. Sliders .......................................................................................................................................... 7
3.3. Two Dimensional Touch Arrays ......................................................................................................... 8
3.4. Proximity Sensing ........................................................................................................................... 9
4. Capacitive Touch Product Design ............................................................................................................... 10
4.1. PCB Design ................................................................................................................................. 10
4.2. Overlay ....................................................................................................................................... 11
4.3. Curved Touch Surface ................................................................................................................... 12
4.4. Other Considerations ..................................................................................................................... 13
5. Summary ............................................................................................................................................... 15
6. Revision History ...................................................................................................................................... 16
6.1. Revision 1.02 ............................................................................................................................... 16
6.2. Revision 1.01 ............................................................................................................................... 16
6.3. Revision 1.00 ............................................................................................................................... 16
A. Disclaimer and Trademarks ....................................................................................................................... 17
A.1. Disclaimer ................................................................................................................................... 17
A.2. Trademark Information ................................................................................................................... 17
B. Contact Information ................................................................................................................................. 18
B.1. ................................................................................................................................................. 18
List of Figures
2.1. Capacitive Sense Overview ...................................................................................................................... 3
2.2. Analog comparator RC relaxation oscillator .................................................................................................. 4
2.3. Signal to noise ratio ................................................................................................................................ 5
3.1. Simple Button Design .............................................................................................................................. 6
3.2. Simple Slider Design ............................................................................................................................... 7
3.3. Duplexed Slider Design ........................................................................................................................... 8
3.4. Radial Slider Design ................................................................................................................................ 8
3.5. Two Dimensional Matrix Keypad ................................................................................................................ 9
3.6. Proximity Sensing Pad ............................................................................................................................. 9
4.1. SNR affected by ground shield ................................................................................................................ 11
4.2. SNR affected by button pad size ............................................................................................................. 11
4.3. Flexible PCB for Curved Surfaces ............................................................................................................ 13
4.4. Spring to Surface Solution ...................................................................................................................... 13
4.5. Optional Electrostatic Discharge Protection ................................................................................................ 14
List of Tables
4.1. Dielectric constants of typical materials used in front panels .......................................................................... 12