Logo
CapTIvate™ Technology Guide  v1.10.00.00

Purchase the kit now
Go to ti.com/CapTIvate

Design Guide

Introduction

Capacitive touch detection is sometimes considered more art than science. This often results in multiple design iterations before the optimum performance is achieved. There are, however, good design practices for circuit layout and principles of materials that need to be understood to keep the number of iterations to a minimum.

Good sensor design is the foundation for a successful touch product.

design_products.png

The purpose of this design guide is to provide guidance for the design and layout of capacitive touch sensors so that they can achieve maximum performance. By achieving maximum performance in the hardware, the CapTIvate™ capacitive touch software library can perform the capacitive touch measurements consuming the lowest power. Tuning guides, along with the CapTIvate™ Design Center are used to help tune the performance of the capacitive touch application.


Starting a New Design

Starting any new capacitive touch design can be a challenging task. This section will guide you through this process and help determine what is important for your design and end application.

Identify Sensors

First we want to identify the types of sensors that you are considering for your application and provide some basic design guidelines.

Identify Care Abouts

Next it is important to identify any special requirements for the end application, such as low-power, noise immunity, moisture, etc.


Design Process

Creating a reliable capacitive touch design can be a time consuming process that starts with designing sensors, laying out a PCB, writing lots of code and finally performing an iterative sensor tuning process to achieve the desired performance. The CapTIvate™ Technology sensor design process accelerates the capacitive touch development cycle through automation, helping get your product to market faster.

Creating a new sensor design
We begin the process by creating a new capacitive touch design using the CapTIvate™ Design Center. With a few simple drag-n-drop inputs and configuration selections, the CapTIvate™ Design Center will automatically determine the optimal pin assignments between the target MCU and the sensors (CapTIvate™ Technology peripheral can measure four channels in parallel). Alternatively, connections can be manually assigned or reserved for those applications with specific routing requirements.

design_process_step1.png



Layout PCB
Once the pin assignments have been made, the MCU pin to sensor electrode connection information is exported to a .csv file and can be used during the PCB layout and design.

design_process_step2.png



Generate configuration and starter project files
Now we are ready to create a custom starter code project based on our sensor design. The CapTIvate™ Design Center creates a fully working capacitive touch application that can be imported into Texas Instruments Code Composer Studio (CCS) or IAR Embedded Workbench. In addition to the application, the CapTIvate™ Software Library and MSP430 driver-lib are automatically included with the project, as portions of the libraries are needed during the development cycle.

design_process_step3.png



Program target MCU
Import the generated CapTIvate™ project into Code Composer Studio or IAR IDE, compile and program the target MCU. The specific steps to perform the programming operation depend on the IDE, however, once the target MCU is programed, you are ready to start running your first capacitive touch application without having to write a single line of code!

Didn't get it right the first time? Changes to a sensor design is simple. We use the CapTIvate™ Design Center to modify our sensor design project, then generate an updated configuration file. Simply copy the new configuration file and replace the existing one in the CCS or IAR application project and rebuild the application. That's it!

Tune Sensors Our PCB is ready to go so we can now begin the process of tuning the sensors for the desired touch and feel. With the MCU programmed with our application and running, the sensors are scanned and real-time data is transmitted to the CapTIvate™ Design Center using the high-speed HID serial bridge MCU on the CAPTIVATE-PGMR PCB. The CapTIvate™ Design Center has several different views to display and monitor the sensor response and allow quick modifications in real-time to the sensor's parameters, providing instant feedback.

design_process_step4.png

Generate final configuration Once our desired touch and feel is achieved, the final sensor configuration can be generated, then programmed into the target MCU. That's it! Using the steps outlined above, capacitive sensor design time can be dramatically reduced.

Congratulations! You are done with your design and ready to go to market.


Best Practices

In this section we will cover both mechanical as well as common layout practices.

Capacitive touch detection is a type of analog-to-digital converter (ADC), specifically a capacitance-to- digital converter. As with most ADCs, the terms of interest are resolution, signal-to-noise ratio (SNR), and linearity, in the specific cases of wheels and sliders. Throughout this document, the design guidance helps to maximize signal, minimize noise, and address when these two goals are at odds.

As mentioned above, the basis of capacitive touch detection is the ability to measure a change in capacitance. This change in capacitance is the signal that the capacitive touch solution identifies. The term sensitivity is often used to describe the signal strength a more sensitive solution has a stronger signal.

Sensitivity is measured in capacitance per counts. In the context of capacitive touch detection, the magnitude of change introduced by a touch is on the order of picofarads or hundreds of femtofarads. It is not uncommon for a solution to see a touch introduce 1 pF of change and be measured as 300 counts. And while the sensitivity might be 3.3 fF/count, this should not be considered until the noise is factored in. Refer to the section on Noise below.

Sensitivity can be controlled within firmware, but the goal is to provide good sensitivity with the hardware, so that the lowest sensitivity settings can be used in firmware, which provides the lowest-power solution. Referring to the Equivalent circuit for a self capacitive sensor, C_touch must be maximized, while the other four capacitances must be minimized. The capacitances of the trace and electrode are approximated as parallel plate capacitances. The following equation serves as the basis for layout recommendations.

C = Er x E0 x A/d (1)

The dielectric constant (Er), area (A), and distance (d) are described throughout this document with the intent of positively influencing the capacitance for a touch system.

Although parasitic capacitance is presented separately, it is a part of the sensitivity and signal. As already mentioned, the capacitance of interest is the relative change in capacitance. The change in capacitance is based upon the touch interaction, but this change is perceived relative to the parasitic capacitance of the system. The parasitic capacitance is also called the steady-state capacitance or baseline capacitance. If the introduced change is 100 fF, then the sensitivity, which is the relative change in capacitance, can be increased by decreasing the parasitic capacitance.

The capacitances C_trace, C_electrode, and C_parasitics are generically referred to as parasitic capacitance.

Mechanicals

The mechanicals are the mechanical characteristics of the design. The mechanicals include the overlay material, ink on top of the overlay, any adhesives used to bond the electrode to the overlay or enclosure, and any transition materials used to remove air gaps between the electrode and the overlay. Mechanicals also include the types of materials used for the electrodes. The mechanicals affect both the signal and the parasitic capacitance.

The goal of this section is threefold:

  1. To understand the benefits in terms of both aesthetics and robustness
  2. To understand how the materials on top of the electrode and the electrode material itself influence the layout of the electrodes
  3. To avoid mistakes in the mechanicals that are detrimental to the electrical performance

Typical Stackup

The following figure shows a typical stackup for a capacitive touch solution. One of the main goals of this stackup is to reduce (or eliminate, if possible) any low-dielectric (air) gaps between the electrode and the area where the touch takes place. The capacitance associated with the stackup has a very strong effect on the signal (change in capacitance from a touch). The signal is directly proportional to the dielectric of the materials. If possible, high-dielectric materials should be used, but at a minimum the stackup should eliminate any air gaps.

  • Air gaps can also contain moisture, which can influence performance or even damage the stackup as temperatures vary and the contents of the gap expand and contract.
design_material_stackup.png
Typical Material Stackup

Another critical attribute of the stackup is that it should be non-conductive. This is not usually a problem with the overlay material but can be overlooked when choosing adhesives, labels, or inks. Popular adhesives for capacitive touch solutions include 200MP products from 3M™ such as 467MP and 468MP.

Overlay

The capacitance of the stackup is a superposition of all of the material, but the overlay is often the dominant material. The type and dimension of the overlay material that is used is determined by the desired aesthetic and from the required amount of protection. A common requirement is rugged (scratch or puncture resistant) and yet lightweight.

The following figure shows the relationship between the thickness of the overlay and the sensitivity of the circuit. From the parallel plate capacitance equation, the capacitance in inversely proportional to the material thickness (C ~ 1/d).

design_plot.png
Sensitivity vs Thickness

The thickness and dielectric of the material influence the electrode design. The electrode area is a function of the area of interaction (a fingertip or the palm of the hand) while the spacing (to adjacent electrodes or ground fill) is related to the thickness of the overlay. For example, with a 2-mm overlay that has a dielectric of 3, the spacing should be approximately 1 mm (half of the thickness). Using a higher dielectric material (for example, Er = 6) the thickness could be doubled while maintaining the same level of performance. The following table shows dielectric values for various materials used as overlays.

Table: Material Dielectric and Breakdown Voltage

MaterialDielectric Constant (Er) (1)Breakdown Voltage (V/mm)
Air1.03300 (STP)
FR-44.820000
Glass7.6 to 8.07900
Gorilla&reg Glass7.2 to 7.6See Manufacturer (2)
Polycarbonate2.9 to 3.016000
Acrylic2.813000
ABS2.4 to 4.116000

(1) Relative permittivity

(2) http://www.corninggorillaglass.com

The table above also includes the breakdown voltage for different overlay materials. This should be considered when designed for ESD protection. ESD solutions should be system solutions, and any additional components should complement the protection provided by the overlay.

Electrode and Trace Materials

The performance is affected by the conductive materials that are used for the electrode and for the trace between the electrode and the microcontroller. Most applications use copper on a PCB, and copper has a resistivity of 1.7x10-6 Ohm-cm (3). As the resistivity of the conductor increases, the ability to move charge to and from the electrode decreases. This has the same effect as an increase in parasitic capacitance. This increase in resistivity, like an increase in parasitic capacitance, reduces the system sensitivity. The table below shows the resistivity for materials that are commonly used in touch applications.

(3) Resistivity is given in Ohm-cm so that resistance is equal to the resistivity times the length divided by the cross-sectional area : R = p x L / A.

Table: Resistivity of Materials

MaterialResistivity, p (Ohm-cm)
Copper1.68x10-6
Silver1.59x10-6
Tin1.09x10-5
Indium Tin Oxide1.05x10-3 (1)

(1) This resistivity is for a film thickness of 270 nm. Typically, vendors provide sheet resistance instead of resistivity for ITO, which is on the order of 10 to 100 Ohms per square.

When using high-resistivity materials, generally the recommendation is to increase the area of traces to reduce the resistance (at the cost of capacitance). ITO solutions provide lower sensitivity, which must be compensated for in the capacitance measurement algorithm by longer measurement times.

Other Situations

Not all applications fit into the typical category, and this section describes two special cases. The first is intentional air gaps that are greater than 2 mm between the electrode and the overlay material, and the second is the use of gloves.

Gaps

In some applications, components are on the same layer as the electrode. This prevents the overlay from being directly applied to the electrode. A common example of this is when an LCD is mounted near the electrode (see diagram below). Another scenario is when the overlay material is not a uniform surface and, therefore, the electrode cannot make direct contact with the overlay.

design_gaps.png
Intentional Gaps Between Electrode and Overlay

In either case, the gap must be filled or bridged with a non-conductive filler (typically adhesive) or a conductive extension. When the gap is in excess of 2 mm, then a conductive extension, either foam or metal, should be used. The metal or foam must be malleable to conform to the shape of the surfaces and prevent the formation of gaps. As shown in the Figure above, the area created by the foam or metal in contact with the overlay is now the area that influences the capacitance.

Gloves

Gloves are simply another layer of medium between the electrode and the finger, and the same principles of thickness and dielectric apply. The challenges with glove applications include the ability to support both gloved and ungloved hands as well as the variation in the types of gloves the application might require. Typical leather or plastic gloves have a dielectric constant in the range of 2 to 4, and fabric gloves and gloves with insulation can have a dielectric constant less than 2.


Common Layout Considerations

After the mechanicals are understood, the electrodes can be sized and designed to provide the most signal. Independent of the mechanicals, the layout design is affected by the distance between the microcontroller and the electrodes, the PCB stackup (for example, one layer, two layer, or four layer), and other electrical circuits on the PCB.

The first item to consider relates to the schematic and the placement of any external components that are associated with the capacitive touch solution. A typical example is ESD protection components such as a series current limiting resistor. In all cases, the components should be kept as close as possible to the microcontroller. As the components move farther away from the microcontroller, the increased area correlates to an increased risk of noise or ESD conducting into the device.

Routing

The parasitic capacitance of the trace comprises several major and minor capacitance contributors. For simplicity, C_trace represents the major capacitances formed between the trace line and the ground pour on the bottom side and surrounding it. The top and cross-sectional views of a typical two layer PCB are shown in Figure 6. The capacitance, C_trace, is determined by the trace line width (W), dielectric thickness (H), trace thickness (T), and the relative permittivity of the PCB material (Er).

design_routing.png
Top and Cross-Sectional Views of Trace Line in PCB

The capacitance per unit length of the trace is an important concept to emphasize the need for short traces. Increasing the distance of the trace increases the parasitic capacitance associated with the trace. Increasing the trace length can also increase susceptibility to noise. Therefore, the trace routing between the microcontroller and the electrode should be kept as short as possible. This is not always possible, so it is important to understand the increase in parasitic capacitance associated with the trace routing.

Capacitance per Unit Length

The capacitance per unit length should be kept as small as possible to minimize the parasitic capacitance (C_trace) and ultimately maximize sensitivity. As previously mentioned, the dominant capacitance in C_trace is the parallel plate capacitance between the trace and the surrounding ground pour. The ability to reduce this capacitance is a direct function of the PCB manufacturing capabilities. Tighter tolerances and smaller minimum dimensions (trace width and separation) allow for thinner traces and larger separation, which result in lower capacitance per unit length. These manufacturing capabilities typically come at a higher cost.

The table below shows how the capacitance per unit length changes with the variation of different dimensions. These values are taken from Reference Section in the Coplanar Waveguide Analysis/Synthesis Calculators.

Table: Calculating Results of Capacitance per Unit Length

W (mm) S (mm) T (mm) H (mm) Er C (pF/cm)
0.1520.1520.0361.64.60.633
0.1520.2540.0361.64.60.555
0.1520.3810.0361.64.60.496
0.2030.1520.0361.64.60.692
0.2030.2540.0361.64.60.602
0.2030.3810.0361.64.60.543
0.2540.1520.0361.64.60.740
0.2540.2540.0361.64.60.641
0.2540.3810.0361.64.60.578
0.2540.1520.0362.544.60.736
0.2540.2540.0362.544.60.637
0.2540.3810.0362.544.60.566

The table above shows that increasing the space, S, between the trace line and the ground is an effective way to reduce the parasitic capacitance. However, increasing the separation can have negative effects that need to be understood. One effect is simply increased board space. Increasing the dimensions can lead to larger PCBs and higher cost. Another effect is related to noise. The larger separation makes traces more sensitive to touch events (touching the trace instead of the electrode) and more susceptible to radiated emissions.

In practice, the designer should choose a balanced S value, and a value of 1/8 of the overlay thickness is typically acceptable. Additionally, a hatched ground is commonly used instead of solid fill near the trace lines to reduce the area and consequently the parasitic capacitance.

The table above also shows that as H gets smaller, the parasitic capacitance increases, which results in a decrease in sensitivity. In most applications, a two-layer PCB is used, and a standard FR4 PCB with the thickness of 1 mm to 1.6 mm is recommended. If a multilayer board is used, it is recommended to keep the H as large as possible. With complex multilayer boards (more than six layers), it is important to recognize that the absence of copper in the internal layers can cause issues and the height, H, between the top layer and the bottom may be smaller than predicted.

The figure below shows an example of a four-layer PCB, which may be desired in applications with limited board space. To reduce parasitic capacitance, the ground pour is usually placed on the lowest layer underneath the trace to provide the largest H. If it is difficult to achieve the maximum height, then a narrower W, a larger S, or even a hatched ground fill are alternatives to reducing the parasitic capacitance.

design_multilayer_pcb.png
Trace Without Copper Pouring Underneath in Multilayer PCB

To determine the maximum trace length from the capacitance per unit length, some additional information is needed. The following example is used to calculate the maximum distance for a trace with a capacitance per unit length of 0.58 pF/cm. The capacitance introduced by a touch, C_touch, is assumed to be approximately 1 pF. To make sure that the capacitance induced by a finger is large relative to the parasitic capacitance, the total parasitic capacitance (C_parasitics, C_trace, and C_electrode) should be in the range of 10 pF to 20 pF (the change is at least a 5% change). Assuming that the C_electrode is approximately 3 pF, the C_parasitics is 5 pF, and the capacitance per unit length is 0.58 pF/cm, so the trace line length L should be no longer than 210 mm. If the electrode is larger (for a proximity application), the capacitance itself is larger (assume approximately 8 pF for this example), so the maximum trace line length L is reduced to 120 mm.

Generally speaking, the trace width W should be as thin as the PCB technology allows, because a short and narrow trace line is preferred. The trace thickness T and the relative permittivity of the material Er also have significant influence on capacitance per unit length, but they are determined by PCB manufacture process and are usually difficult to change.

Connectors

Some designs require the electrode to be off-board, and consequently a connector is used to transition the trace from the PCB to a cable or to another PCB. Connectors are generally not desired because like any component there is an associated parasitic capacitance with connector PCB footprint and structure.

In terms of parasitic capacitance and sensitivity, the connector is treated as a parasitic capacitance reducing the sensitivity of the solution. Because the connector is treated as a lumped capacitance, the placement is irrelevant to the sensitivity. However, the placement is important with respect to noise.

The figure below shows that if the aggressor (noise source, N1) is located on the PCB, then the preferred placement of the connector is near the MSP430 microcontroller. The parasitic capacitance associated with the connector shunts high-frequency noise (Z 1/jwC) and increases the noise immunity of the circuit. Conversely, if the aggressor is located off-board (noise source, N2), then the connector should be placed farther from the microcontroller and closer to the electrode. This arrangement minimizes the off-board trace and cable length (which acts like an antenna). When multiple aggressors exist as is shown in the figure below, it is recommended to reduce the effect of the radiators that most closely match the operating frequency of the touch detection circuit.

design_connectors.png
Top View of Connector and Noise Source

When deciding the position of the connector, the designer must balance the length of the trace and the cable while considering parameters like the background noise.

Routing Material

The routing is typically done with copper, but other materials like silver and ITO can be used. Silver is similar to copper and similar performance can be expected (if the thickness of the materials are also equivalent). ITO is very different from copper, and the difference in resistivity degrades the sensitivity of the solution. Lowering the impedance of the trace (by increasing the width) should be a high priority in the design, even though this comes at the cost of increased parasitic capacitance and reduced noise immunity. Ultimately, the use of materials like ITO requires more processing by the MSP430 microcontroller to adjust to lower sensitivity and increased noise.

Electrode Material

As discussed in the Routing section, conductivity becomes an issue in more resistive materials like ITO. Although the transparency of ITO is very good, the resistivity is high when compared to materials like silver and copper. Typically the physical dimensions prohibit increasing the area of the ITO electrodes, and therefore any degradation in sensitivity must be compensated for in the firmware. This typically results in slightly longer measurement times and consequently increased power consumption.

Electrode Design

The electrode design must accomplish two goals. First, the design must provide sufficient signal (change in capacitance with interaction). The design must project the e-field up and out so that the appropriate level of sensitivity is achieved at the desired distance. Understanding the stackup, thickness and dielectric, the electrode can be sized and shaped to provide the maximum signal. Second, the electrode design needs to have a minimal parasitic capacitance.

In the following sections the shape and area of the electrode are discussed with the intent of maximizing the signal for different implementations (buttons, sliders, and wheels). The basis for controlling the parasitic capacitance is common to different sensor implementations and is discussed here.

The figure below shows an example PCB cross-section and the important parameters that influence the parasitic capacitance. The height, width, and separation have a direct effect on the parasitic capacitance of the electrode, C_electrode. The fundamental parameter area is not shown in the figure below because this has a direct effect on both the touch capacitance (C_touch) and the parasitic capacitance (C_electrode). This section describes how changes to the height and separation can minimize the parasitic capacitance. The following sections describe how changes to the area can maximize C_touch.

design_electrode_capacitance.png
Capacitance of the Electrode

The separation (S_electrode) is directly related to the height of the overlay as described in the Mechanical section. The height is a function of the PCB and is not a parameter that can be easily controlled. The separation is typically the parameter with the most flexibility.

Table: Baseline Electrode Capacitance

Area(mm2)Height(mm)DescriptionSeparation(mm)Capacitance(pF)
10x10, FR-4 (Er = 4.4)1.5722 Layer PCB, L20.5083.3
10x10, FR-4 (Er = 4.4)1.5722 Layer PCB, L21.023.2
10x10, FR-4 (Er = 4.4)1.5722 Layer PCB, L21.523.1
10x10, FR-4 (Er = 4.4)1.304 Layer PCB, L20.5083.8
10x10, FR-4 (Er = 4.4)1.574 Layer PCB, L30.5083.3

The table above shows that increasing the height (the distance between the electrode and the reference plane) decreases the capacitance. By decreasing the parasitic capacitance, the relative change in capacitance caused by a touch event is increased. For example, if the change in capacitance associated with a touch is 0.5 pF, the relative change is greater when the base capacitance is 11 pF instead of 12 pF, (5.5% instead of 4.2%).

Spacing Between Electrodes

By default, the CapTIvate™ Software Library drives non-actively scanned electrodes to ground allowing neighboring electrodes to be treated as an extension of the ground pour. Therefore, the spacing between the electrodes follows the same rules for spacing from ground. The goal is provide enough spacing so that the e-field propagates up and through the overlay material. A minimum spacing of one-half the laminate thickness has been found to provide sufficient signal (sensitivity).

Shapes

The capacitance of the electrode is a function of area, but the shape is important to consider, because the shape can influence the area. An important detail of designing the electrode shape is not to design shapes that have low surface area. The area of each electrode must provide the maximum C_touch, which in turn produces the most signal (the change in capacitance) when a touch event occurs.

Crosstalk

In the Connectors section above, the aggressor is assumed to be a point source of noise. In this section, the aggressors are different signals that are routed in close proximity to the capacitive touch sensor trace. These aggressors can be another capacitance sensor trace or non-capacitance sensor lines. Examples of non-capacitance sensor lines include digital signals, analog signals, and high-current signals used to drive LEDs.

Adjacent Capacitive Touch Signals

Capacitive sensor traces influence neighboring capacitive touch sensor traces. The space between capacitance sensor trace lines, Scs, should be kept as a safe distance (see figure below).

design_traces_spacing.png
Top View of Different Traces



Digital Signals

Digital signals are typically PWM signals or communications like I2C or SPI. Unlike the capacitive traces, these signals can act as aggressors and can be active during a capacitance measurement. It is recommended to keep these types of signals at least 4 mm away from the capacitive touch trace. If the digital signal and the capacitive touch trace must cross, then it is recommended to keep the crossing at a 90 degree angle.

design_traces_digital.png
Top View of Different Traces



LEDs/LED Backlighting

Signals used to drive LEDs (unless the LEDs require high-strength drivers) are similar to other digital signals. Therefore, as with digital signals, a distance of at least 4 mm is strongly recommended for S_LED, as shown in the figure below.

design_traces_leds.png
Top View of Different Traces



As a general rule, LEDs should be driven and the use of high-impedance states should not be used to control the LED. The use of a high impedance to prevent an LED from conducting can result in a significant difference between the on-state and off-state capacitances. This change in capacitance may be detected by the touch solution and treated as a change in the system capacitance, or even worse as a false detection. If the use of high-impedance control of the LED is unavoidable, a discrete capacitor (typically 1 nF is acceptable) in parallel with the LED is recommended.

  • Avoid tri-stating the LED as the LED capacitance will change when turned on and off
  • If LED must be tri-stated, add small bypass capacitor to control change in LED capacitance
  • Capacitor does not have to be physically near LED, just in the circuit
design_backlighting2.png
Recommended methods to drive LEDs

LED BackLighting can be done easily using a back lighting LED on the opposite side of the PCB

  • Keep hole as small as possible to eliminate possible dead spots in sensor
  • LEDs may require bypass capacitor (see above)
design_backlighting1.png
Backlighting LEDs



As an example of an LED backlighting technique, the following wheel design has an LED mounted on the backside of the PCB and illuminates through a small hole. In parallel to the LED, a small 1nF capacitor is used to reject changes in capacitance when the LED is switched between ground and high-Z. Also note the hatched ground on both the top and bottom layers to help with noise immunity.

design_mutual_led_backlight.png
LED BackLight Example



Ground Planes

Surrounding ground planes affect the sensitivity of the electrode. This is seen primarily as an increase in base capacitance as the separation from the ground decreases and the area of the ground pour increases. This section looks at the placement of surrounding ground pours and the fill (percent hatch) of those pours.

Planes and pours near the electrode and trace must be connected to a potential and cannot be left floating or in a high impedance state. Such structures serve as a mechanism for noise coupling and are strongly discouraged.

Separation

Ground planes, both coplanar and on neighboring PCB layers, reduce noise. This is the same principle discussed in the Routing section. The ground or guard structures are placed as close as possible to reduce noise but also kept far enough away to minimize parasitic capacitance. This separation is a function of the thickness of the materials (overlay, adhesive, etc.) on top of the trace. As mentioned in the Routing section, a good rule is one-eighth the thickness for separation between traces and ground. The separation between electrodes and ground should be at least one-half the thickness.

design_ground_separation.png
Ground Separation



As shown in the figure above, the separation between the electrode and the coplanar ground pour should be at least one half the thickness of the overlay material. Any unused electrode should be held at a logic low level (Vss potential) and not allowed to float. In this way the spacing between electrodes is the same as the ground and electrode distance.

Pour

The use of a hatched pour instead of a solid ground pour is a good design practice. This reduces the area and consequently the parasitic capacitance associated with both C_trace and C_electrode. Typically, a 25% fill hatch is sufficient, but this percentage can be increased or decreased to improve noise immunity or sensitivity, respectively.

design_hatched_gnd_fill.png
Example Hatched Ground Fill



Using Poly Cut Out to control Ground Pour around Sensors

When designing a button, slider or wheel of any size or shape, a flexible method to control the distance between any sensor and the ground pour is to provide a poly cut-out region around the sensor as shown below.

design_mutual_buttons_poly_cut.png
Define Poly Cut Out Region



design_mutual_buttons_poly_cut_plane.png
Ground Pour Spacing Controlled



Mutual Capacitance Traces

Routing mutual capacitive traces has special considerations compared to self capacitive traces. Specifically, the TX and RX signals on the same layer should be close only in those areas where coupling through a finger touch is expected by design, such as the case with button, slider or wheel elements (electrodes). Anywhere else that TX and RX traces on the same layer are routed close can be susceptible to a "ghost" touch should a finger touch in that area.

Traces

  • Avoid routing TX lines near RX lines when possible
    • Within a finger spacing, they will create a button
    • If unable to avoid on same layer, put ground trace in between (adds parasitic capacitance)
    • If TX needs to cross RX, make crossing perpendicular (minimize surface area intersection)
    • Avoid running TX on one layer of PCB parallel to RX on other layer of PCB
  • Route TX lines next to other TX lines
  • Route RX lines next to other RX lines
  • Keep nearby ground away from TX and RX traces by 1/2 panel thickness (reduces parasitic capacitance)

The diagram below shows an 8-button keypad using (2) TX and (4) RX traces. In this layout the TX and RX traces are on the same layer. The TX traces are routed close to each other as are the RX traces. The TX traces are routed away from the RX traces. In this example there is one RX that must be routed near a TX trace. A ground trace/fill is used to separate the RX an TX traces.

design_mutual_mcu.png
Routing mutual capacitance sensors



Electrodes

  • For noise suppression, use 25% hatched ground on:
    • Bottom layer of PCB and/or
    • On top layer of PCB keeping ground 1/2 panel thickness away from electrode

Buttons

Self Capacitive Buttons

A self capacitive button sensor is a single electrode. Self capacitive buttons are simple to layout and each button is assigned to only one pin on the MCU. Self capacitive buttons will provide greater sensitivity as compared to a mutual capacitive button, but are more influenced by parasitic capacitances to ground.

ParameterGuidance
Radiation PatternBetween Electrode and Ground
SizeEquivalent to interation
ShapeVarious: typically round or square
Spacing0.5 x Overlay minimum thickness
design_self_buttons_finger.png
Example Self Capacitive Button Designs



Self Capacitive Button Shapes

The electrode shape is typically rectangular or round with common sizes of 10mm and 12mm. Ultimately, the size will depend on the required touch area. A good design practice is to keep the size of the button as small as possible, which minimizes the capacitance and will help with the following:

  • Reduce susceptibility to noise
  • Improve sensitivity
  • Lower power operation due to smaller capacitance and reduced electrode scan time

In the diagram below, an example silkscreen button outline pattern is shown.

design_self_buttons.png
Example Self Capacitive Button Designs



The goal of the button area is to provide sufficient signal when the user touches the overlay above the button electrode. Typically a nonconductive decal or ink is used to identify the touch area above the electrode. The relationship between the decal and the electrode can be varied so that contact with the outer edge of the decal registers a touch. Conversely, the electrode could be small to ensure that the button is activated only when the center of the decal is touched. The two figures below show how the effective touch area is a function of the electrode size and the size of the finger.

design_larger_than_decal.png
Effective Area Example for Electrodes Larger Than Decal



design_smaller_than_decal.png
Effective Area Example for Electrode Smaller Than Decal



One common mistake is to make the electrode the same shape as the icons printed (in nonconductive ink) on the overlay. As shown in the figure below, this can lead to electrodes with odd shapes that create discontinuities and reduce surface area.

design_buttons.png
Button Shape Examples, Dos and Don'ts



As the distance of the overlay increases, the effective area decreases. Therefore, it is important to keep the button electrode diameter at least three times the laminate thickness.




Mutual Capacitive Buttons

A mutual or "projected" capacitive button sensor requires two electrodes, one as a TX and the other for RX. Mutual capacitive buttons are not as sensitive as self capacitive buttons, however, it is possible to pack the electrodes closer together with a low risk of cross talk between neighboring electrodes. With mutual capacitive electrodes, multi-touch is possible by multiplexing the channels. Multiplexing creates up to 64 electrode pairs or "buttons" that can be scanned using only 16 CapTIvate™ I/O pins.

ParameterGuidance
Radiation PatternBetween TX and RX and ground
SizeEquivalent to interation
ShapeVarious: recommend square or shape with corners
Spacing0.5 x Overlay minimum
design_mutual_buttons_finger.png
Example Mutual Capacitive Button Designs



Mutual Capacitive Button Shapes

The electrode shape is typically rectangular with common sizes being 10mm and smaller. Ultimately, the size will depend on the required touch area. In the diagram below, the TX and RX electrodes are identified and a suggested silkscreen button outline pattern is shown. The position of the vias on the TX and RX electrodes provide flexible signal connection points when routing traces.

  • Simple Square Electrode
    • Easiest to layout
    • Highest sensitivity
    • TX on outside, RX on inside
    • For single layer designs, can open TX on one side and feed RX trace through (preferably not in a corner)
    • Better sensitivity if traces on two layers
design_mutual_buttons.png
Example 10mm Mutual Capacitive Button Design)



A good design practice is to keep the size of the button as small as possible, which minimizes the capacitance and will help with the following:

  • Reduce susceptibility to noise
  • Improve sensitivity
  • Lower power operation due to smaller capacitance and reduced electrode scan time

The dimensions shown on a 10mm x 10mm example button are suitable for overlay thickness up to 2mm.

design_mutual_buttons_dimensions.png
10mm Mutual Capacitive Button Dimensions



An alternative button design, which can provide better sensitivity and is slightly more difficult to create, forces the e-field lines to be concentrated in the four RX corners.

design_mutual_buttons_boost.png
Alternative Mutual Capacitive Button Design



The dimensions shown for this 10mm x 10mm example button are suitable for overlay thickness up to 2mm.

design_mutual_buttons_dimensions_boost.png
10mm Mutual Capacitive Button Dimensions



To accommodate the individual RX connections in this design, vias on each RX electrode allow the four electrodes to be connected on the bottom PCB layer as shown. The four vias provide convenient connection points when sharing an RX channel with neighboring button sensors or to simplify overall trace routing.

design_mutual_buttons_boost_connections.png
RX Electrodes Bottom Layer Connections



Mutual Capacitive TX / RX Electrode Spacing Considerations

For thicker overlays, the spacing between the TX and RX is related to the thickness of the overlay and should be maintained at 0.5 x overlay thickness. The reason is the coupling that occurs between the outer TX electrode and the inner RX electrode is affected by the separation distance between these electrodes. In the diagram below, TX and RX traces that have larger spacing between them will build a field that extends further out compared to TX and RX traces that are closer together. With TX and RX traces close together, it may not be possible to work reliably with a thick overlay. So to accommodate a thicker overlay, the design requires the TX and RX traces to be moved further apart. There may be some design limitations that restrict the overall button size, so experimentation maybe required to meet the TX and RX spacing recommendations.

design_mutual_button_flux_spacing.png
Example Mutual Capacitive Button Designs



As mentioned earlier, mutual capacitive electrodes can be multiplexed with other mutual capacitive electrodes. This means that more than one button can share a common signal. In the 8-button example below, the design of the button and placement of vias allow for easy routing to the neighboring buttons. Depending on the orientation of the routing signals, the buttons could be rotated if needed. Taking advantage of CapTIvate™ Technology hardware feature allowing up to four channels to be scanned in parallel, the top four RX channels are measured while TX_0 is driven. The sequence is then repeated for the bottom row. Scanning four channels in parallel reduces the device's overall power by reducing the scan time by 4x and it should become apparent that the eight buttons were measured with only six CapTIvate™ I/O pins.

design_mutual_buttons_multiplexed.png
8-Button Multiplexed Mutual Capacitive Example Design




Sliders and Wheels

Sliders and wheels are multi-electrode sensors. Sliders and wheels with as few as three or four electrodes can provide excellent performance. The CapTIvate™ Software Library supports both sliders and wheels, ranging from 3 to 12 electrodes. While it is certainly possible to use as many electrodes, the layout becomes more difficult, requires more MCU RX pins and generally does not improve the sensor's performance. A powerful feature of CapTIvate™ Technology is the ability to scan 4 electrodes in parallel. Optimizing a sensor to take advantage of this hardware feature for a slider or wheel provides the best power and measurement time efficiency.

For both sliders and wheels, the area of the electrode is not as critical as the percentage of coverage across multiple electrodes. As shown in the examples below, interdigitated slider and wheel designs provide the most efficient and optimal coupling, but can be complicated to create. Simpler designs are possible, but require experimentation.

For reference, several self and mutual capacitive slider and wheel sensors examples are illustrated throughout this section and are the same sensors used on the CAPTIVATE-BSWP and CAPTIVATE-PHONE demo PCBs.

Slider and Wheel Resolution

CapTIvate™ Technology's increased sensitivity combined with the CapTIvate™ Software Library provide exceptional linearity and accuracy for slider and wheel resolutions well beyond 10-bit of resolution. By following the design guidelines and examples that follow in this section, designing a slider or wheel with great performance is easy.

A Note About Resolution vs. Number of Positions

For sliders and wheels, the number of discrete positions = the resolution, but because 0 is included as a position, the reported range of positions covers from 0 to (resolution - 1). As an example, if a slider or wheel has a resolution of 1000, the sensor will report 1000 positions, from 0 to 999.

Self Capacitive Sensor Shapes

In general, self capacitive sensors are also easy to design and route on a PCB. Due to the nature of self-capacitance, self capacitive sliders and wheels have higher sensitivity compared to mutual capacitive sliders and wheels. For that reason they should be considered as a first choice when designing an application. However, self capacitive sensors require one CapTIvate™ I/O pin for each electrode.

Self Capacitive Slider

As mentioned above, a self capacitive slider with great performance can be designed with only three or four electrodes depending the size of the sensor. In fact, a 30cm slider using only four electrodes has been successfully demonstrated with superior linearity and resolution. A basic slider design below uses four RX electrodes. Each electrode is interdigitated and the two end electrodes are electrically connected.

design_self_slider.png
Example 4-Element Slider Design



Self Capacitive Wheel

A wheel is basically a slider design with both ends wrapped around and connected together. With CapTIvate™ Technology, a self capacitive wheel only needs three elements to provide execptional linearity and resolution. A basic wheel design below uses three RX channels. Each electrode is interdigitated.

design_self_wheel.png
Example 3-Element Wheel Design



Mutual Capacitive Sensor Shapes

Mutual capacitance has a unique feature that allows sensors to multiplexed. Mutual capacitive sliders and wheels can take advantage of this feature by sharing several RX channels with one or more sensors. Because of this, it is possible to have up to 64 electrodes using 16 CapTIvate™ I/O pins. As mentioned earlier, mutual capacitive sensor doesn't have the same sensitivity as a self capacitive slider or wheel. However, with CapTIvate™ Technology, mutual capacitive sliders and wheels will provide the same performance as self capacitive sensors.

Mutual Capacitive Slider

The following diagram illustrates a four element slider. The outer TX electrode traces surround the interdigitaged RX electrodes and are connected together at both ends of the slider. This simple slider design uses four RX and one TX channels.

design_mutual_slider.png
4 Element Slider Design
  • TX on outside (track on top and bottom)
  • RX on inside as triangles
  • Spacing from TX to RX is 1/2 the overlay thickness
  • 1st and last RX triangle connected to each other
  • Spacing between TX and RX ~0.5mm

Mutual Capacitive Wheel

The diagram below illustrates a basic 3 element wheel design. The wheel has two TX circle electrodes surrounding the interdigitated RX electrodes. The wheel is basically a slider design with both ends wrapped around and connected together. This wheel design uses three RX and one TX channels.

design_mutual_wheel.png
3 Element Wheel Design
  • TX Circles on outside and inside of wheel (Need to connect inside and outside together on backside of board)
  • RX as interdigitated patterns (similar to Self Capacitance Wheel)
  • Spacing between TX and RX ~1/2 overlay thickness
  • Ground hatch added inside wheel to provide noise stability. Also ok to have hatching on backside of board. (be careful of total ground loading
  • Possible to include LED/LED backlight in the center
  • Difficult to draw

As a variation to the design above, the open portion of the wheel on the top PCB layer can be filled with either a solid or hatched ground to improve noise immunity. Providing a additional hatched ground on the bottom layer of the PCB will also help with noise. Using a solid ground on the bottom layer may present too much capacitive loading, so be careful.

design_mutual_wheel_center_ground.png
3 Element Wheel Design with Center Grounded



Mutual Capacitive Wheel with Center Button

A great feature to add is a separate "button" sensor inside the wheel sensor, if size permits. The design is the same as the basic wheel but a ground separation trace is added between the wheel electrodes and button electrodes. This helps prevent cross talk between the two sensors, should a finger wander slightly off the wheel sensor. This wheel design with center button uses three RX channels and one TX channel for the wheel, one RX and TX channel for the button.

design_mutual_wheel_button.png
3 Element Wheel Design with Center Button Sensor



Mutual Capacitive Wheel with Center LEDs

Similar to the wheel design with a button in the center, it is simple to add a backlighted LED as illustrated in the next diagram. This wheel design with center LED uses three RX channels and one TX channel for the wheel. The LED is driven separately. For additional information about LEDs, refer to LEDs and Backlighting.

design_mutual_wheel_led.png
3 Element Wheel Design with Center LED




Proximity

Proximity sensors are electrodes designed to detect a hand or other conductive object at some distance using greater sensitivity compared to buttons, sliders or wheels. For this reason, proximity sensors are self capacitive and can have one or more electrodes.

Proximity Shapes

Proximity electrodes can be any shape and for most applications the electrode size is limited by the end product dimensions. As an example, the CAPTIVATE-BSWP Demo PCB with its proximity sensor highlighted in RED is shown below. As mentioned above, proximity sensors require a higher degree of sensitivity than buttons, and this higher sensitivity can be achieved by:

  • Increasing the area
  • Separation from other conductors.
design_proximity_bswp.png
CAPTIVATE-BSWP Demo PCB Proximity Sensor



Proximity sensors typically have a larger area in order to detect large surfaces (palm of the hand) at larger distances. When considering the size of the proximity electrode, keep in mind that as size increases, so does parasitic capacitance. And with an increase in capacitance, there is in increase in measurement times which can directly translate into higher power consumption. So there needs to be a careful balance between size, sensitivity and power.

Proximity Ground and Shielding

In a perfect design, without any parasitic capacitances, a proximity sensor's e-field can extend a great distance, providing incredible sensitivity. The field lines will flow from the electrode to any nearby ground potential and can include a nearby hand or earth ground.

design_proximity_no_parasitic.png
PCB with Minimal Parasitic Capacitances



Unfortunately, it is almost impossible to avoid having some ground potential on a PCB, so some charge is stolen away from the proximity sensor, reducing the sensor's sensitivity and detection distance.

design_proximity_small_parasitic.png
PCB with Typical Parasitic Capacitances



One must be careful to avoid designs with excessive ground potentials. In some applications, where electrical noise is an issue, ground planes on top and bottom layers are in place to help shield circuits from potential noise sources. However, these very same ground planes that protect against noise now provide a very easy path to steal even more charge away from the proximity sensor, making proximity detection very difficult or even impossible.

design_proximity_large_parasitic.png
PCB with Large Parasitic Capacitances



One method to control the amount of parasitic capacitance to nearby ground is through the use of a driven shield. By replacing the dedicated ground plane with a plane driven by an additional CapTIvate™ I/O pin, the plane can be grounded through the I/O pin when the proximity sensor is not active. When driving the proximity sensor, the shield is also driven at the same potential. Any remaining parasitic capacitance to other ground potentials will steal charge from the shield and with minimal impact to proximity sensor's sensitivity. This minimizes the parasitic capacitance and restores the proximity sensor's sensitivity.

design_proximity_driven_shield.png
PCB with Large Parasitic Capacitances




Ultra Low Power

The MSP430 CapTIvate™ peripheral is capable of enabling user interface designs with extremely low power consumption. This is possible because the CapTIvate™ peripheral includes a processing state machine that is capable of performing the following functions from LPM3 without any CPU interaction whatsoever:

  1. Wake up the CapTIvate measurement blocks from deep sleep (LPM3) at a periodic interval
  2. Start a conversion automatically (1 electrode per measurement block, or 4 electrodes on the MSP430FR2633)
  3. Finish the conversion
  4. Perform IIR noise filtering (adjustable strength)
  5. Perform a threshold crossing detection (adjustable window comparator)
  6. If a threshold was crossed, wake up the CPU
  7. Otherwise, perform environmental drift compensation (adjustable strength)
  8. Shut down the CapTIvate measurement blocks and wait until the next interval, then go back to #1

This capability combined with the MSP430 FRAM low power architecture enables designs with average current in the single digit microamps.

Introduction

Designing for low power consumption involves optimizing the hardware and the tuning to achieve 5 basic things:

  1. The lowest base LPM3 current possible
  2. The slowest UI refresh rate possible (software design)
  3. The smallest parasitic capacitance possible (hardware design)
  4. The shortest measurement time possible (hardware and software design)
  5. The most effective use of the wake-on-proximity state machine

In short, achieving the lowest possible power consumption is all about optimizing the duty cycle of the application - minimizing the amount of time that the CPU and high performance analog are awake, and maximizing the amount of time spent in deep sleep.

Expectations

Below are several test cases that have been bench verified with the MSP430FR2633 on the CAPTIVATE-FR2633 processor module.

Sensor ConfigurationModeMethodScan RateBase Scan TimeLF ClockI-avgI-avg / ElectrodeYears on AAAsYears on a CR2032
1 Proximity SensorWake-on-ProximitySelf8 Hz420usCrystal5uA5uA163.6
1 Proximity SensorActive (CPU)Self8 Hz420usCrystal7.3uA7.3uA10.92.5
1 ButtonWake-on-ProximitySelf8 Hz145usCrystal3.4uA3.4uA23.55.3
1 ButtonActive (CPU)Self8 Hz145usCrystal6.0uA6.0uA13.33.0
4 ButtonsWake-on-ProximitySelf8 Hz120usCrystal3.0uA750nA266.0
4 ButtonsWake-on-ProximitySelf8 Hz145usCrystal3.8uA0.9uA214.7
4 ButtonsWake-on-ProximitySelf30 Hz145usCrystal9.4uA2.4uA8.51.9
4 ButtonsActive (CPU)Self8 Hz145usCrystal8.7uA2.2uA9.22.1
8 ButtonsActive (CPU)Self8 Hz145usCrystal14.5uA1.8uA5.51.2
8 ButtonsActive (CPU)Self15 Hz145usCrystal25.9uA3.2uA3.00.7
8 ButtonsActive (CPU)Self30 Hz145usCrystal50.1uA6.3uA1.50.3
64 ButtonsActive (CPU)Mutual8 Hz145usCrystal109.2uA1.7uA0.70.2
64 ButtonsActive (CPU)Mutual15 Hz145usCrystal203.5uA3.0uA0.350.08

Note: These measurements were captured using a high resolution source-meter with UART/I2C communications disabled. Battery life was approximated assuming 1000mAh AAA's and 225mAh CR2032 cells with 70% effective usable life.

design_poweranalyzer.png
Power Characterization Bench

Note how the wake-on-proximity state machine is able to increase the battery life by over a year on a CR2032 coin cell for the proximity sensor, and over 2 years for a basic button.

Optimization Steps

The following sections discuss how to optimize the design to achieve the 5 goals introduced above.

Selecting a Low Frequency Clock

The lowest power consumption achievable is limited by the deep sleep current consumption of the MCU. From there, power consumption will rise with the complexity of the panel and rate at which the panel is scanned. In deep sleep (low power mode 3), since it is not possible to achieve a lower average current than the LPM3 current, the low frequency clock that is selected for the application must be considered. Below are the available low frequency clock options for the MSP430FR2633 MCU.

LF Clock SourceTypical LPM3 Base CurrentTypical FrequencyTypical Relative AccuracyTypical Relative Cost
Crystal1.2uA32768 HzBestExternal Component (Highest)
REFO16uA32768 HzGoodInternal (Lowest)
VLO1uA10000 HzPoorInternal (Lowest)
  • If budget and PCB space constraints allow for it, an external 32 kHz crystal provides the best combination of accuracy and low power.
  • If accuracy is still required but an external crystal cannot be used, then the REFO will provide a decent 32 kHz time base at the expense of higher power consumption.
  • If an external crystal cannot be used and accuracy is not application critical, than the VLO provides the lowest possible power.

Optimizing the Application Scan Period

The application scan period is the amount of time between each sampling of the user interface. For example, if the period is set to 100ms, then the user interface is sampled every 100ms, or at a rate of 10Hz. If the period is set to 10ms, then the user interface is sampled at a rate of 100Hz. The scan period has a direct effect on the power consumption, as it controls the duty cycle of the application. When a lower period (higher rate) is selected, the CapTIvate analog and possibly the CPU are waking up much more frequently- consuming more power. The design tradeoff here is response time versus power consumption. Scanning less often reduces the power consumption, but also increases the response time of the user interface. The CapTIvate™ starter project implements an active mode scan rate and a wake-on-proximity scan rate. This allows for a longer response time to be used when no one is touching the panel, and a shorter response time to be used when someone is touching the panel. The CAPTIVATE-BSWP demo panel runs at 10 Hz (100ms response time) when in wake-on-proximity mode, and at 30 Hz (33ms response time) when in active mode.

Optimizing for the Smallest Parasitic Capacitance

When a sensor has a low parasitic capacitance, it is more sensitive to touch (all else being equal). This means that the sensor may be scanned at a lower resolution to obtain the same resolution and SNR. A lower resolution conversion means a lower measurement time. Battery powered applications typically do not have the same noise immunity requirements as line powered applications, so solid ground fills that limit sensitivity are generally not required. In addition, when sensors have low parasitic capacitance the conversion frequency may be increased while still ensuring good charge transfer.

Optimizing for the Shortest Measurement Time

The measurement time for each sensor should be optimized to be as small as possible. When the CapTIvate™ analog IP is operational, it draws several 100uA of current. The goal should be to minimize the measurement time so that the analog is only enabled for a brief period of time.

In the CapTIvate™ Design Center, the measurement time is a function of the following factors:

  1. Frequency Divider (Conversion clock frequency selection)
  2. Phase Lengths
  3. Conversion Count (Base number of charge transfers without a touch)

The measurement time may be calculated manually per the following formula. It is also calculated automatically in the CapTIvate™ Design Center.

design_scantime_formula.png
Scan Time Calculation

Constants

  • STABLETIME=320
  • CAPOSC[0]=16000000
  • CAPOSC[1]=14700000
  • CAPOSC[2]=13100000
  • CAPOSC[3]=11200000

If the sensors have fairly low parasitic capacitance, a conversion frequency of 2MHz for self capacitance and 4MHz for mutual capacitance is a reasonable setting. With phase lengths of 1, this is achieved by setting the frequency divider to /4 and /2, respectively.

The conversion count controls the resolution of the measurement. Decreasing this value decreases the overall resolution of the measurement (in terms of counts per picofarad). To optimize the resolution, decrease this value until the minimum acceptable delta due to a touch is reached.

Using the Wake-on-Proximity State Machine Effectively

The wake-on-proximity state machine allows for CPU-less measurement and processing for 1 element per measurement block (4 elements total with the MSP430FR2633). Most sensing panels are actually touched <1% of the total time that they are running. 99% or more of the time, they are waiting for a user. The state machine provides a mechanism to handle the latter 99% without the need to involve the CPU, reducing the average current. A sensor may be selected as a wake-on-proximity sensor in the CapTIvate™ Design Center. When a sensor is selected, the starter project that is generated by the CapTIvate™ Design Center will transition into a wake-on-proximity mode whenever the inactivity timeout counter expires. In wake-on-proximity mode, the first cycle of the sensor that was selected for wake-on-proximity will be automatically measured by the state machine, and the CPU will not receive an interrupt until one of the following occurs:

  1. A proximity or negative touch threshold crossing occurs
  2. A conversion counter interrupt occurs

The wake-on-proximity feature is best used with longer-range proximity sensors, such as the one on the CAPTIVATE-BSWP demo panel. However, if an MSP430FR2633 design has 4 buttons or less, it is possible to use the wake-on-proximity state machine functionality to wake up on any of the four buttons!

Walking Through the Optimization Process

In this example, the CAPTIVATE-BSWP panel will be used as a piece of test hardware to look at how to optimize an imaginary application that has 4 buttons. From start to finish, going through this exercise will transform the average current of the solution from 100's of microamps to single digit microamps. To run the completed example, check out the UltraLowPower_4Button example project.

Step 1: Creating a New Project

To start, a new CapTIvate™ Design Center project will be created that has a button group sensor with 4 buttons. The buttons will be on CAP0.0, CAP1.0, CAP2.0, and CAP3.0. This mapping allows for parallel scanning, which is important for power optimization. All of the default tuning parameters will be kept initially:

ParameterValueOptimized?
COMM PeripheralUARTNo
Active Scan Rate33No
Wake-on-Proximity Scan RateN/ANo
Conversion Count500No
Frequency Dividerf/4Yes
design_lowpowerbuttons_canvas.png
Design Center Configuration

Out of all the default configuration values, only the frequency divider is optimized (f/4 with phase lengths of 1 for a conversion frequency of 2 MHz). This yields a starting, un-optimized current of approximately 310 uA-avg. We can do better than this! Note that LED1 and LED2 of the CAPTIVATE-FR2633 processor module must be disconnected, or the measured power will be higher.

Step 2: Switch from UART to I2C

UART requires that SMCLK be active for the baud rate generator to work. By switching to I2C for data transfer, we are able to go to LPM3 instead. This is possible because as a slave, the MSP does not need to provide a clock for I2C to operate.

ParameterValueOptimized?
COMM PeripheralBulk-I2C (Slave)Yes
Active Scan Rate33No
Wake-on-Proximity Scan RateN/ANo
Conversion Count500No
Frequency Dividerf/4Yes

Making this change has lowered the current to 68 uA-avg. We can still do better! Note that the Design Center must be connected to see these power numbers, otherwise the I2C requests will time out, using more power.

Step 3: Optimize the Conversion Count

The project came with a default conversion count of 500. This provides a delta due to touch of about 80 on the 4 buttons. This is more resolution than is needed. Lowering the conversion count to 200 and the conversion gain to 100 (to boost sensitivity) will cut the measurement time more than in half, and still provide a delta of about 30 counts. 30 counts is significantly less, but for button detection in a battery powered application, it is adequate. The default touch thresholds still work as well.

ParameterValueOptimized?
COMM PeripheralBulk-I2C (Slave)Yes
Active Scan Rate33No
Wake-on-Proximity Scan RateN/ANo
Conversion Count200Yes
Frequency Dividerf/4Yes

These changes lower the current to 38 uA-avg. We are getting there.

Step 4: Adjusting the Active Mode Scan Period

The default scan period of 33ms provides good response time, but it uses power. Adjusting this down to 83ms (12 Hz) will reduce the power, but not so much that it compromises the ability to pick up a press.

ParameterValueOptimized?
COMM PeripheralBulk-I2C (Slave)Yes
Active Scan Rate83Yes
Wake-on-Proximity Scan RateN/ANo
Conversion Count200Yes
Frequency Dividerf/4Yes

This change lowered the current to 26 uA-avg.

Step 5: Enabling and Adjusting the Wake-on-Proximity Mode

Now to add the final touches, let's enable the wake-on-proximity state machine functionality to manage states. We only have 4 buttons, with one from each measurement block, so we can measure all 4 buttons and test for proximity without any CPU involvement.

ParameterValueOptimized?
COMM PeripheralBulk-I2C (Slave)Yes
Active Scan Rate83Yes
Wake-on-Proximity Scan Rate125Yes
Conversion Count200Yes
Frequency Dividerf/4Yes

The capture below shows the conversion control tab of the controller customizer, which contains most of the settings that we have been adjusting to optimize for low power.

design_lowpower_settings.png
Design Center Configuration

This change lowered the current to 3 uA-avg, or about 750nA per button when no one is touching the panel. As soon as a user touches a button, the power consumption goes up to 23-26uA-avg with I2C reporting. Once the touch is removed, the UI goes back into wake-on-proximity mode after 32 samples and is back to the 3 uA-avg.

A Note about Mutual Capacitance and Bias Current

Mutual capacitance sensors have an extra tuning parameter: the bias current. During a mutual capacitance measurement, a sample-and-hold amplifier cancels out the effects of the parasitic / stray self capacitance on the receive electrode. This sample-and-hold amplifier has an adjustable bias current capability, which allows for the drive strength of the amplifier to be adjusted to suite the application.

For information on bias current settings how to adjust the bias current, see the bias current guide. Note that the bias current control is only available in advanced mode.

A larger bias current setting should be used when the parasitic capacitance to ground of the Rx electrode is large. The default value is the highest possible bias current, which works for the most applications but requires the highest power consumption. During low power optimization, it is desirable to lower the bias current if the layout allows for it. Most button designs with minimal parasitic capacitance work very well with the lowest bias current setting.

Bias Current Optimization Procedure

To optimize the bias current setting for a low power application, begin by setting the bias current to the lowest available setting. Test each electrode in the sensor for sensitivity to touch. One effect of setting the bias current too low is that a touch on a sensor will cause a decrease in counts rather than an increase, because the system cannot accurately compensate for the parasitic self capacitance of the receive (Rx) electrode. If this occurs, continue increasing the bias current until the behaviour goes away. Note that the bias current performance also varies with the conversion frequency. Higher conversion frequencies will require higher bias current settings for designs with more parasitic capacitance to ground.


Moisture

This section discusses special considerations for designing products that will come into contact with moisture.

Introduction

The performance of a capacitive touch panel can be effected by moisture spray and build-up, as well as liquid spills. In addition, self capacitance and mutual capacitance exhibit different phenomena depending on the nature of the moisture. For example, small water droplets on a self capacitance electrode may have little effect, but a water droplet on a mutual capacitance electrode may have the effect of improving the mutual coupling and creating a change in the measurement counts that goes the opposite direction of a touch. Interestingly still, a water droplet or spill on a self or a mutual capacitance electrode could cause a change in measurement counts in the direction of (rather than against) a touch, if the droplet or spill is also in contact with a nearby ground plane, power plane, or grounded electrode that is not being measured. This section will introduce the physics behind the effects of moisture, as well as some basic best practices to add a level of moisture resistance and detection to an application.

Expectations

With careful attention to detail, it is possible to create designs that can reject small amounts of moisture. Through the use of guard channels, it is also possible to create designs that can detect spills and lock out the rest of the interface when a spill is detected.

Moisture Physics

Moisture build-ups and liquid spills that occur on panels in the real world affect capacitive sensing electrodes because the liquid on the panel exhibits electrical conductivity. Water is a polarized molecule, and in addition to its polarization, it is rarely pure and typically contains ions in solution. The amount of ions dissolved directly effects the conductivity of the moisture. Distilled water will appear to have much less of an effect than salt water or sweat, for example.

This conductive property means that moisture can appear to have a similar effect as placing a conductor (such as a piece of metal) on a panel. It's easy to understand how that will cause problems! Making things worse is the fact that moisture is unpredictable in multiple aspects:

  1. Its actual conductivity is extremely variable
  2. The shape and size of droplets and spills are unknown and constantly changing
  3. Changes tend to be fast- making them look more like a touch and less like an environmental change

Moisture Problems

At best, build-up of moisture occurs slowly over time and is tracked via environmental filtering. At worst, it happens unpredictably and quickly and triggers a false detection.

Moisture Mitigation Techniques

Because of the unpredictable nature of moisture, it is necessary to divide mitigation techniques into two types of applications: moisture tolerance and spill rejection.

Application TypeFull Touch DetectionSpill DetectionGuard Channel RequiredTypical Mechanical Mounting
Moisture ToleranceYes, typicallyNoNoVertical
Spill DetectionNo, sensors are masked during a spillYesTypically requiredHorizontal

Moisture Tolerance Applications

Moisture tolerant applications include those which are able to operate with touch detection in the presence of steam, mist, and spray. Common applications include exterior/interior security panels, E-locks, thermostats, and car access keypads. Whether or not moisture tolerance is feasible for an application depends on the mechanical design and environment. Typically, the following must be true:

  1. The touch sensing panel is installed perpendicular to the earth (vertically or at some angle) such that any moisture that accumulates on the panel will drip away on its own due to gravity
  2. There is no opportunity for moisture/fluids to "pool" or "flood" the sensing panel

Design Tips for Moisture Tolerance

When designing a moisture tolerant application:

  1. Provide as much spacing as possible between buttons
  2. Provide significant spacing between buttons and nearby ground planes
  3. Route all electrode connection traces on the PCB layer furthest from the surface
  4. Set sensor idle states to High-Z (floating) so that nearby sensors don't provide coupling points that can cause false detections
  5. If possible, use a non-conductive enclosure for the product

Spill Rejection Applications

Spill rejection applications include those which are able to detect when a fluid spill has occurred on the sensing panel. Common applications are white goods such as a cooking surface control panel. The goal of spill rejection is not to enable full touch detection (which is extremely difficult when moisture or fluids cover multiple keys and/or ground), but simply to detect the presence of a spill and lock out the keypad until the spill is cleared by a user. This is most commonly achieved with the use of a guard channel, whose purpose is to detect large objects as well as spills.

Design Tips for Spill Detection

When designing a spill detection application:

  1. Implement a guard channel to detect when a large unknown object or some kind of spill comes into contact with the sensing panel
  2. In software, utilize the guard channel to mask reporting of touches on other keys when a spill is detected.

The CAPTIVATE-PHONE demonstration panel has a guard channel that is used for proximity sensing, palm rejection, and basic moisture rejection.


Noise Immunity

This section discusses how to design for electromagnetic compatibility.

Introduction

Capacitive touch sensing involves the measurement of very small changes in capacitance of a sensing electrode. These changes are often on the order of a picofarad or less. Because the quantity being measured is so small, capacitive touch circuits that are going to be used in noisy environments must be designed with noise immunity in mind from the start. Often, potential noise sources may not even be known at the time of design. This chapter is dedicated to providing the necessary guidance to enable immunity to various types of noise. It introduces the most common noise threats to a capacitive touch system. For each threat, it discusses how to reduce the susceptibility of a capacitive touch circuit to that threat when using MSP CapTIvate™ MCUs.

How to Use This Section

If you are designing a system that will exist in a high noise environment, it is best to read and understand this guide before going through the process of schematic capture and layout design. It is strongly recommended that the Capacitive Sensing Basics chapter be read before reading this chapter.

The introduction section of the noise immunity guide establishes a knowledge base that will be used as a backdrop for the rest of the discussion. After the introduction, the following section will discuss several different noise problems (RF susceptibility, for example). Each problem will be introduced so that the phenomenon is understood. Finally, the last section will discuss the noise mitigation steps to apply to your design to provide robustness to all of the noise types discussed. The noise mitigation steps will be presented in the context of the Three Sided Approach. The noise mitigation steps section is the most important section, as it provides a check list of considerations to apply when designing for noise immunity. If you don't read the entire noise immunity guide, be sure to read the noise mitigation steps.

Aggressor-Victim Philosophy

An aggressor-victim approach is taken to understand noise in a system. The diagram below illustrates this concept.

design_aggressor_victim_diagram.png
Aggressor-Victim Diagram

The aggressor is the noise source, which generates interference that affects the victim through the coupling medium. Generally speaking, for noise to couple from the aggressor to affect the victim, the following must be true:

  • The noise must be at a frequency at which the victim is vulnerable
  • The noise must have enough amplitude to affect the victim
  • The noise must be present at a time when the victim is vulnerable to the noise

Aggressor

The aggressor varies with every application. Common aggressors are poorly designed power supplies with high common-mode and differential-mode emissions, long cables and/or traces that act as antennas to radio frequency (RF) signals, and high-current switched inductive loads that share their power source with the victim at some level. In some cases, the viewpoint is such that the capacitive touch circuit is the aggressor.

Coupling Medium

The medium through which the noise travels from the aggressor to the victim is often misunderstood. Common mediums include the VCC rail, the VSS rail, the capacitive coupling between traces (in the case of crosstalk), and even users of the capacitive sensing interface themselves.

Victim

During most of the discussion in this chapter, the capacitive touch circuit is the victim. However, there are times where the capacitive touch circuit becomes the aggressor, at which time a neighboring subsystem may become the victim.

The Three Sided Approach

Based on this understanding, it becomes clear that to reduce the effects of the aggressor on the victim, it is necessary to fulfil one or more of the following objectives:

  • Change the characteristics of the noise emitted by the aggressor to either change its frequency or reduce its amplitude to a level that does not affect the victim
  • Reduce the ability of the noise to couple from the aggressor to the victim by modifying the coupling medium
  • Reduce the susceptibility of the victim to the noise emitted by the aggressor

In some cases, it is possible to reduce the noise emitted by the aggressor (per the first bullet above). This is always the best course of action. Reducing the noise simplifies PCB layout and software considerations, and reduces the potential for other issues in the system. This is typically accomplished by designing robust power supplies and IO interfaces that do not generate their own noise nor pass on noise from the outside world. However, many times this is not possible because the aggressor may be outside the control of the system being designed. In that case, a solution must be obtained by reducing the coupling medium and reducing the victim's susceptibility.

Along these lines, to achieve a high level of noise immunity in a capacitive touch design it is necessary to apply the relevant CapTIvate™ peripheral features, hardware design principles, and signal processing tools. The basic tools available are listed below.

  1. CapTIvate™ Peripheral EMC Features
    • Integrator-based charge transfer method
    • Offset subtraction signal chain block
    • Frequency hopping
    • Spread-spectrum clocking
    • Synchronization input pin to align conversions with AC mains zero-crossing events
  2. Hardware Design Principles
    • Grounding techniques
    • Filtering techniques
    • Protection passives
    • Noise sensing channel
  3. Signal Processing Tools
    • Multi-frequency processing (MFP) algorithm
    • Dynamic threshold adjustment (DTA) algorithm
    • IIR noise filtering
    • De-bounce

The general theme of this chapter is how these three main toolboxes (the CapTIvate™ peripheral, hardware design principles, and signal processing) may be applied together to solve several noise problems at the same time.

Introduction to Electromagnetic Compatibility (EMC) Standards

International standards exist to allow for consistent, repeatable electromagnetic compatibility testing to be applied to different products. The primary international standard concerning system level robustness in the area of EMC is the IEC 61000-4 family. The tests most relevant to capacitive touch circuits are introduced below, and will be addressed in detail later in this chapter.

  1. IEC 61000-4-2 Electrostatic Discharge (ESD) describes testing for electrostatic discharge immunity.
  2. IEC 61000-4-3 Radiated RF Noise describes testing for immunity to radiated RF noise between 80 MHz and 1 GHz.
  3. IEC 61000-4-4 Electrical Fast Transient/Burst (EFT/B) describes testing for immunity to high voltage fast transients.
  4. IEC 61000-4-5 Surge Describes immunity to power surge energy levels. This is not discussed here as it is considered a system-level problem that is the responsibility of the power supply.
  5. IEC 61000-4-6 Conducted RF Noise describes testing for immunity to conducted RF noise between 150kHz and 80 MHz.
  6. IEC 61000-4-16 LF Conducted Noise describes testing for immunity to conducted disturbances in the frequency range of 0 Hz to 150 kHz.

Signal-to-Noise Ratio

The signal is the change in capacitance that results in a meaningful change in counts. Noise, on the other hand, is any disturbance that does not change the capacitance but does change the counts. Most often these disturbances are the result of power supply switching noise, electrostatic discharges (ESD), electrical fast transients (EFT), radiated RF noise, or some other type of electrical noise that couples into the system.

SNR is a system-level specification and needs to be tested at the system level. In achieving an acceptable level of SNR, the competing requirements for noise and signal must be addressed. The most common example of competing requirements is seen with ground shields. Ground shields help reduce susceptibility to radiated and conducted interference, and the closer these structures are to the circuit being protected, the more effective they are. However, moving these structures closer to the capacitive touch circuit has an unwanted effect of increasing the parasitic capacitance and consequently lowering the sensitivity.

In addition to managing the competing goals of sensitivity and noise immunity, these goals need to be managed within the overall requirements of the end product. This can mean trying to achieve a solution in a limited space, under a large aesthetic housing, or in the presence of other electrical activity (noise).

Types of Noise

This section introduces the major types of noise that a capacitive sensing system may encounter. For each topic, the problem, MCU solution, and required design actions are discussed.

Differential Mode Supply Rail Noise

Differential-mode supply rail noise is any noise seen at the DVCC supply rail of the capacitive touch MCU with respect to the DVSS (circuit common) supply rail. Some touch solutions on the market require a dedicated LDO just for the capacitive touch circuit to reduce these issues.

Problem

Some of the problems associated with a direct reference to DVCC include:

  1. Changes in sensitivity as DVCC drifts down as a battery supply discharges
  2. Vulnerability to false detects from ripple voltage on the DVCC supply rail
  3. Increased vulnerability to EFT spikes on the DVCC supply rail

CapTIvate™ MCU Solution

To address these issues, the CapTIvate™ peripheral has low drop-out regulator that is dedicated to the capacitive sensing analog circuitry. This regulator provides decoupling from the supply rail (DVCC) as well as digital noise on-chip. Issue 1 above is resolved immediately, as the capacitive touch analog circuitry will always run at a constant, internally regulated voltage that does not drift with DVCC. The regulator is functional across the DVCC supply voltage range of the MCU (see the device datasheet for details). Issues 2 and 3 above are dramatically reduced as a result of the power supply rejection ratio of the dedicated regulator. While a dedicated regulator is not required, it does provide a compounded PSRR in very noisy systems and is still recommended.

Design Actions Required

In general, no specific action is required- the on-chip regulator provides the benefits described above.

  1. CapTIvate™ Peripheral EMC Features
    • Dedicated CapTIvate™ LDO provides a constant voltage across the DVCC input range, and provides a level of PSRR against ripple voltages
  2. Hardware Design Principles
    • Follow all recommendations for DVCC decoupling capacitance (per the device-specific datasheet).
    • Follow all recommendations for the dedicated voltage regulator (VREG) tank capacitor (per the device specific datasheet).
    • Place capacitors as close to the IC as possible.
  3. Signal Processing Tools
    • De-bounce may be applied as necessary if noise spikes are of significant amplitude to be seen in the measurement.

Electrostatic Discharge (ESD)

Electrostatic discharge, if not properly managed, can disrupt a sample or even damage the MCU permanently. Fortunately, many tools exist to prevent this.

Problem

An electrostatic discharge involves a sudden flow of current between two charged objects. The flow of current may be caused by the breakdown of a dielectric material (such as plastic or even air), or direct contact. The voltage differential in a discharge may be on the order of several kilovolts (kV) or more. An electrostatic discharge applied to a device pin can permanently damage the device. Since capacitive touch panels by definition are interacted with by users or other objects that may be electrically charged, ESD deserves consideration during the design process.

CapTIvate™ MCU Solution

The primary line of defense against ESD is always the touch panel overlay material. The overlay provides electrical isolation between the conductive electrode and any user or outside object that might interact with it. The ability of the overlay material to defend against ESD damage is dependent upon two main factors- the thickness of the material and its breakdown voltage, which is usually specified in terms of breakdown per unit of thickness. It is important to note that even if a discharge breaks down the dielectric material, the stress observed at the electrode (and possibly the device IO) will be less than the original stress on the overlay itself (since the breakdown accounts for some of the energy). Different materials will have different breakdown specifications. Generally speaking, plastics such as acrylic or polycarbonate have a higher breakdown voltage than materials such as glass. However, glass has a higher dielectric constant, which allows for better sensitivity through thicker overlays, allowing for both materials to be used easily.

Care should be taken to account for all places in a system that a discharge could slip through (say around the bezel of a product or through a ventilation gap). This is generally of more concern with products that have plastic enclosures than with those that have metallic enclosures that can be tied to an ESD ground or safety ground.

If it is not possible to obtain the needed protection mechanically, the next best alternative is to employ the use of series resistors on electrode pins, followed by low-capacitance TVS diode clamps if needed.

Design Actions Required

  1. CapTIvate™ Peripheral EMC Features
    • Internal protection ESD clamps on the IO provide some chip-level protection during device handling and product assembly, but this should not be solely relied on for system level ESD protection.
  2. Hardware Design Principles
    • Populate a 470-1k ohm resistor in series with the electrode to provide ESD protection, with a protection clamp such as a TVS diode placed between the electrode and ground (return) on the electrode side of the resistor.
    • Follow recommended hardware best practices for noise immunity
  3. Signal Processing Tools
    • De-bounce of at least one sample is recommended to reduce the possibility of a false detection due to a discharge on an IO during a conversion. ESD transients are fast, and in theory do not effect multiple samples in a periodic way (like RF interference, for example).

Electrical Fast Transient (EFT)

Electrical fast transients are common in industrial environments as well as within commercial products that contain switching inductive loads. These transients are similar in nature to ESD, but exhibit a lower magnitude and longer event length. When high-current inductive loads are switched on and off, high voltage transients may appear on power supply lines. Transients may also appear on signal lines if a system is connected to another system that is generating noise. The transients are a result of the inductance in the load that attempts to maintain the flow of current, and in so doing generates large voltages.

The IEC test simulates these threats by injecting bursts repetitively into the supply or signal lines of a system, in differential or common mode (though common mode is the most typical).

Expectations

High voltage transients are one of the issues that must be considered ahead of time when designing the system. They can wreak havoc on simple analog circuits like the MCU reset circuit. However, with proper design techniques it is possible to realize designs with immunity to 4kV per the IEC 61000-4-4 test specification.

Problem

Fast transients can create effects similar to that of conducted noise, but generally only for brief periods of time as the duration of a transient is often quite short (on the order of 50 nanoseconds). This short burst time often means that not every capacitive touch sample will be affected by a burst. The figure below is data captured from a self capacitance button exposed to 1.5kV EFT bursts that were 50ns each. The 50ns transients were repeated at a 5kHz burst rate for 15ms. That pattern was then repeated every 300ms, per the IEC test specification. The different effects observed on the electrode can be attributed to the amount of time a sample may have overlapped with a 15ms burst window. There is about a 5% chance of a sample overlapping with a burst, due to the 300ms test period. It is important to note, however, that real world threats will likely not follow this pattern! The IEC test should be used as a tool to understand the implications of EFT on a system- but real world testing in-application is just as if not more valuable.

design_SelfCap_EFTSpike.png
Self Capacitance Button 1.5kV EFT Test

CapTIvate™ MCU Solution

The primary line of defense against EFT must be hardware design. The best place to stop transients is at the power supply before they have a chance to effect different components of a product. Chances are good that the capacitive sensing MCU will not be the only component that is vulnerable to fast transients. Supplementing a good power supply, software should be EMC hardened. This includes de-bouncing the device reset pin, as well as implementing a watchdog timer. If EFT is a concern in a safety application, memory integrity self-tests should also be applied periodically for robustness. Heavy de-bounce of the capacitive touch sensor is also extremely valuable- almost more so than IIR filtering in an EFT environment. Take the figure below as an example. The EFT burst only affected a single sample- something a basic de-bounce can easily handle. However, the magnitude of the pulse was significant enough to pull down the IIR filter for more than one sample, overwhelming a de-bounce level of 1 and requiring a de-bounce level of 2+ or a weaker filter coefficient.

design_SelfCap_EFTFilterError.png
Self Capacitance Button 1.5kV EFT Test - Filter Ineffectiveness

Design Actions Required

  1. CapTIvate™ Peripheral EMC Features
    • Integrator-based charge transfer sensing technology
  2. Hardware Design Principles
    • If possible, design a robust power supply for the system that blocks high frequency transients
    • Follow the same layout techniques as presented in the RF immunity section
  3. Signal Processing Tools
    • De-bounce
    • Re-purpose the reset pin as a non-maskable interrupt (NMI) to de-bounce potential IC reset conditions.

RF Susceptibility (Conducted and Radiated)

Capacitive touch circuits are inherently vulnerable to RF interference, since it can lead to injected noise currents into transmit (Tx) and receive (Rx) sensing IOs. By applying a combination of peripheral features, hardware techniques, and signal processing, it is possible to realize capacitive touch designs that are robust in the presence of RF interference.

RF interference will be broken down into two categories (conducted and radiated) based upon the frequency of the interference. The distinction between the two is important, as it defines the nature of the coupling medium between the aggressor and the victim. The breakdown is as follows:

  • Conducted RF Interference
    • 10's of kHz to 10's of MHz
    • Long wavelengths
    • PCB traces are not efficient antennas
    • Noise is generally assumed to be coupled into the system via the power supply or through IO cables
    • Cables are of sufficient length to be efficient antennas
    • Generally of the most concern for capacitive touch circuits since the frequency range overlaps with the charge transfer frequency range
  • Radiated RF Interference
    • 100's of MHz to GHz
    • Short wavelengths
    • PCB traces can be efficient antennas
    • Generally of less concern for capacitive touch circuits

Expectations

In general, self capacitance sensors will allow for a higher level of noise immunity to be achieved than mutual capacitance sensors. This is a result of the fact that self-capacitance measurements are looking for larger changes (a few pF), whereas mutual capacitance measurements are looking for small changes (less than 1pF). In addition, to realize a mutual capacitance measurement the self-capacitance effect of the Rx must be eliminated from the measurement. This is achieved through the use of a sample-and-hold amplifier which compensates for the receiver (Rx) to ground capacitance to remove it from the measurement. If strong enough noise currents exist, this sample and hold amplifier can become overwhelmed to the point where it is not able to stabilize the Rx. When this happens, a self-capacitance effect (an overall decrease in counts) is observed. For this reason, self capacitance is the recommended method for high levels of immunity above 3Vrms. At or below 3 Vrms (the commercial product test level), mutual capacitance is a very viable sensing method with many advantages, such as higher key density.

The following table breaks down what kind of immunity can be expected when testing a system to the IEC 61000-4-6 specification.

Class A Immunity Table (Fully Functional in Presence of Noise)

Sensing MethodSensor TypeAchievable IEC 61000-4-6(Conducted) Level
SelfButtonsLevel 3 (10V RMS)
SelfSliders/WheelsLevel 3 (10V RMS)
SelfProximityLevel 1 (1V RMS)
MutualButtonsLevel 2 (3V RMS)
MutualSliders/WheelsLevel 1 (1V RMS)
MutualProximityNot Recommended

Conducted RF Noise Test System

Conducted noise immunity is most reliably tested with the coupling/decoupling network method as specified in IEC 61000-4-6. A block diagram of the test configuration is shown below.

design_IEC6100046_TestBench_BlockDiagram.png
Conducted RF Test System

The frequency range tested is typically 150 kHz to 80 MHz, amplitude modulated at 80% depth on a 1 kHz carrier frequency to simulate real threats.

Problem

The problem with RF interference is that it leads to injected currents that can couple into receive (Rx) electrodes. Typically, the currents are common mode in nature with respect to some reference (usually earth ground). The adverse effects observed on capacitive touch circuits are different for self capacitance than for mutual capacitance, so the two will be treated separately in the following section.

Self Capacitance

Self capacitance sensors experience several different effects in the presence of noise depending upon the following factors:

  1. Frequency of the noise.
    • If the noise is centered directly on the conversion frequency or its lower harmonics (+/- 50kHz), the measurement data will be corrupted positively and negatively, as shown below. This occurs whether or not a touch is present, although the effect is amplified when a touch is present (as shown).
      design_SelfCap_WithAndWithoutNoise_NoAlg.png
      Self Capacitance Button with No Noise and 3Vrms Conducted Noise at Conversion Frequency
    • If the noise is nearby the conversion frequency, but not directly aligned with it or a low harmonic, the measurement will not be corrupted but it will experience an increase in sensitivity to touch with a time-varying noise component.
      design_SelfCap_WithAndWithoutNoise_NoAlg_Near.png
      Self Capacitance Button with No Noise and 3Vrms Conducted Noise at Conversion Frequency
      Note that the measurement is stable, and the noise only occurs in one direction. Self capacitance sensors will exhibit susceptibility in this way beginning just below their charge transfer frequency and going out past it with diminishing noise farther out in frequency.
  2. Amplitude of the noise. As the noise amplitude increases, the average delta due to a touch increases. This is a result of injected current into the Rx. This effect shows up as an increase in sensitivity to touch. For example, a button may trigger with a few mm of proximity rather than a full touch.
Mutual Capacitance

Mutual capacitance sensors exhibit corruption of data if noise is present at the conversion frequency or its lower harmonics. The susceptibility band is typically 100kHz around the conversion frequency. The effect can be seen in the diagram below.

design_MutualCap_WithAndWithoutNoise_NoAlg.png
Mutual Capacitance Button with No Noise and 3Vrms Conducted Noise

Notice how the data captured is completely unusable at this point. If the recommended layout practices are not followed, the result will be a widening of the susceptibility band in frequency beyond the typical value of ~100kHz. This will limit the performance of the frequency hopping solution described next.

CapTIvate™ MCU Solution

Several methods are employed to improve immunity to conducted and radiated RF interference:

  • Liberal use of ground structures in the PCB layout to reduce the fringe free-space coupling of the electrode and its trace back to earth ground and the user.
  • Frequency hopping is applied to prevent noise in a given frequency band from corrupting the measurement by aggregating the data from 4 different conversion frequencies with the multi frequency processing (MFP) algorithm
  • In mutual mode, filter capacitors are placed between Rx lines and circuit common to narrow the susceptibility band in frequency, improving the benefit of frequency hopping
  • In self mode, spread spectrum clock modulation and the dynamic threshold adjustment (DTA) algorithm are applied to compensate for the increased sensitivity to touch
  • IIR filtering and de-bounce may be used to add additional robustness
Self Capacitance

To achieve self-capacitance immunity, it is imperative that dense grounding structures be applied to limit fringing E-field lines. This has the effect of stabilizing the electrode. Then the use of frequency hopping and spread-spectrum clocking improves the data to a level where it may be processed by an algorithm, as shown below. In the plot below, noise is being injected at F3. Notice how F3 looks the same as the plot shown above in the problem section- it has positive and negative noise. However, F0-F2 are clean when no touch is present, and only exhibit the additional sensitivity in the negative direction when the button is touched. Applying spread-spectrum clock modulation reduces the effect of the noise at F3 to the point where it looks similar to F0-F2.

design_SelfCap_3Vrms_Modulation.png
Self Capacitance Button with 3Vrms Conducted Noise, 4 Frequency Raw Data Without and With Modulation

Taking that data set and applying the multi-frequency processing algorithm results in a fairly clean signal that may be filtered via the addition of the IIR count filter, as shown below. Notice that the signal still has an increased delta due to the injected noise current.

design_SelfCap_3Vrms_Modulation_MFP_IIR.png
Self Capacitance Button with 3Vrms Conducted Noise, MFP Data Without and With IIR Filtering

Now that a clean signal has been obtained, the noise level that was measured in the original raw data is used to compute a threshold adjustment factor via the dynamic threshold adjustment algorithm (DTA). This provides compensation for the slight gain in sensitivity due to noise in the system. The noise level is also reported, should it be of interest to the application. Below is a comparison of a no-noise touch and a touch in the presence of 3Vrms conducted noise at the base conversion frequency.

design_SelfCap_3Vrms_Modulation_MFP_IIR_DTA.png
Self Capacitance Button with No Noise and 3Vrms Conducted Noise, with MFP, IIR, and DTA

The application of all these design principles results in a button that dynamically responds to changes in the environment, compensating for noise. These techniques also work quite well on slider and wheel sensors.

Mutual Capacitance

As shown below, the application of frequency hopping and filter capacitors in mutual mode produces usable measurements at the auxiliary frequencies (left plot). The multi-frequency processing (MFP) algorithm may then resolve the data set into a usable count value that is fed into the standard element and sensor processing algorithms.

design_MutualCap_3Vrms_4Freq_WithAndWithoutAlg_NoiseAt1.png
Mutual Capacitance Button with 3Vrms Conducted Noise, Raw Data and Processed Data

If the solution is looked at across a frequency sweep, the benefit of the frequency hopping approach becomes evident. This data set corresponds to a button that was not touched during the test.

design_MutualCap_NoiseSweep_Untouched.png
Mutual Capacitance Button with 3Vrms Conducted Noise, No-Touch Noise Sweep

Note how the noise bands are very narrow, and are easily overcome by the frequency hopping algorithm. When touched, the susceptibility band increases and the amplitude of the noise increases. However, usable data is still obtained.

design_MutualCap_NoiseSweep_Touched.png
Mutual Capacitance Button with 3Vrms Conducted Noise, Touched Noise Sweep

In both the untouched and touched diagrams, it is easy to pick out the fundamental frequencies at the left, and their corresponding harmonics. It may become obvious from reviewing the above diagrams that noise may affect more than one frequency at a time. In the event that this occurs, the frequency hopping approach is still able to handle most situations. The diagram below shows noise affecting two frequencies at the same time.

design_MutualCap_3Vrms_4Freq_WithAndWithoutAlg_NoiseAt2.png
Mutual Capacitance Button 3Vrms Conducted Noise

In the event that the noise become too great for the algorithm to determine what is happening, it is possible to use the noise threshold and noise status bits of the elements to alert the application and lock out a safety critical function.

Design Actions Required

Designing for immunity to RF interference does require hardware and software considerations. Be sure to review the final section of this guide, Noise Mitigation Steps, for implementation details.

  1. CapTIvate™ Peripheral EMC Features
    • Integrator-based charge transfer method
    • Offset subtraction signal chain block
    • Frequency hopping
    • Spread-spectrum clocking
  2. Hardware Design Principles
    • Implement conducted noise immunity layout best practices, taking into account the thickness and dielectric of the overlay material
    • Eliminate or limit use of off-board connectors that carry capacitive sensing lines
  3. Signal Processing Tools

Noise Mitigation Steps

One of the nice things about designing for EMC is that many of the techniques used to improve a design for one type of noise also tend to improve the design for other types of noise as well. This section steps through noise mitigation steps that should be applied to all designs that require noise immunity. It is best to think of this section as a design check list. All of the items discussed here should be applied when designing a product to have robust noise immunity.

  1. Determine whether the design will be using self or mutual capacitance (or both).
  2. Before beginning a PCB layout, review the hardware checklist.
  3. When configuring a project in the CapTIvate™ Design Center, review the tuning checklist.

Self Versus Mutual Capacitance for Noise Immunity

Self capacitance is the recommended measurement method for designs that require sliders and wheels, as well as designs that need more than the commercial product level of 3Vrms conducted noise immunity. Mutual capacitance is recommended for designs that have higher key densities (16-32 buttons) and only require the commercial product immunity levels.

Noise Immunity Hardware Check List

Review this check list before starting a PCB layout.

  1. Follow electrode design best practices for noise immunity.
  2. Utilize dense return (ground) plane structures to limit fringe E-field lines.
  3. For mutual (projected) capacitance sensors, populate a 68pF ceramic capacitor between each Rx and circuit return (ground). This capacitor should be placed close to the MCU. It is also a good idea to allow a provision to populate a capacitor between each Tx and circuit return, should it be needed during qualification. The TI noise immunity reference designs do not require the Tx capacitor.
  4. Avoid routing capacitive sensing lines (Rx's or Tx's) through board-to-board connectors or cables. Connectors can be significant noise receptors.
  5. Optimize the overlay thickness as much as possible. The thicker the overlay material, the higher the chance of a touch on one key affecting a nearby key. With thinner overlays, electrodes will be more susceptible to ESD. The sweet spot is 1.5mm to 4mm for a typical PC/ABS/acrylic overlay.
  6. Use good power supply design principles to limit noise at the entry point. If possible, implement a common mode choke coil with a high impedance to common-mode noise in the range of 100 kHz to 100 MHz.

Noise Immunity Electrode Design Best Practices

When designing for noise immunity, there are several best practices to apply to electrode geometry. Self capacitance and mutual capacitance will be discussed separately.

Self Capacitance

In the case of self capacitance, 3Vrms immunity is usually attainable without significant overhaul to the electrode design principles discussed in the button design section.

The following principles should be applied:

  1. Limit the size of the electrodes where possible. Do not oversize electrodes beyond what is needed to achieve the desired sensitivity with the overlay that will be used with the product.
  2. Avoid air gaps in the overlay stackup
  3. Keep traces from the MCU to the electrode as short as possible
  4. If possible, do not place electrodes on the edges of the PCB, as this limits the effectiveness of ground shielding
  5. If the design has a thin overlay stackup (<3mm), a special electrode design may be used which has a ground plane in the center of the button. Placing a ground plane in the center of a button has two effects: additional stability for the electrode, and a path for noise currents into the ground plane and not into the electrode during a touch

Below is a comparison of a standard button layout with the special button layout discussed in principle #5. The special button layout is really only suitable for designs with overlay stackups less than 3mm. Above 3mm, the sensitivity trade-off becomes too great.

design_noise_button_self.png
Self Buttons (Grid = 0.5mm)
Mutual Capacitance

Mutual capacitance requires a specific geometry to achieve immunity. The layout below depicts the recommended geometry. The goals are as follows:

  1. Limit the size of the Rx
  2. Overlay stackup air gaps are not permitted for mutual capacitance
  3. Use cutouts in the Rx as shown to improve sensitivity
  4. Place a small ground fill in the center of the electrode to add a path for noise currents into the ground plane and not into the electrode during a touch
  5. Route all Rx signals on the bottom layer if possible to limit their exposure to a touch
  6. Keep the number of Tx lines per Rx as low as possible. This limits the vulnerability of the receiver to noise.
design_noise_button_mutual.png
Mutual Buttons (Grid = 0.5mm)

The geometry is as follows:

ParameterValue
Overall Geometry10mm x 10mm
Plane Keepout0.5mm from overall geometry on top layer, flooded on bottom layer
Tx Thickness1mm
Rx Thickness0.5mm
Inner Ground Fill3mm x 3mm
Tx to Rx Spacing1mm
Rx Wing Length2mm

This electrode geometry has been proven with overlays between 1mm and 3mm of thickness.

Noise Immunity Electrode Shielding Best Practices

Proper ground shielding of electrodes is required to achieve noise immunity. This applies to both self and mutual capacitance designs.

Self Capacitance Shielding

For self capacitance designs, utilize a solid ground or power plane on the top layer of the PCB, and a medium-density hatched power or ground plane on the bottom layer of the PCB. As an example, if the CAPTIVATE-BSWP panel (which was designed for low power battery operation) was modified to attain noise immunity, the following changes would be made:

  1. Removal of the proximity sensor
  2. Addition of a solid ground/power plane on the top layer
  3. Expansion of the hatched ground/power plane on the bottom layer to the size of the PCB

Below are before and after images of the top and bottom layers, applying the principles described above:

design_noise_bswp_mod_top.png
CAPTIVATE-BSWP Modified for Noise Immunity (Top Layer)
design_noise_bswp_mod_bottom.png
CAPTIVATE-BSWP Modified for Noise Immunity (Bottom Layer)

The addition of these dense ground structures serves to limit fringing E-field lines as much as possible, stabilizing the electrodes. Normally the addition of this much parasitic capacitance is considered bad practice, but in the case of noise immunity the trade-off is extremely beneficial. In addition, the gain and offset subtraction capability of the CapTIvate™ technology makes it possible to maintain decent sensitivity even with the ground shield structures.

Mutual Capacitance Shielding

For mutual capacitance designs, utilize solid ground or power planes on the top and bottom layer of the PCB. Mutual receive electrodes (Rx's) are extremely sensitive (on the order of <1mV). As a result, they are very vulnerable to noise currents. It is necessary to keep the Rx tracks as short as possible and as well-shielded as possible.

The design below illustrates these concepts for a 4x2 8-button mutual capacitance matrix:

design_noise_mutual_board.png
TIDM-CAPTIVATE-THERMOSTAT-UI (Top and Bottom Layer)

Tuning Check List

Review this check list when tuning a design that requires noise immunity.

  1. If RF immunity is required, enable noise immunity mode in the CapTIvate™ Design Center. This will enable frequency hopping during measurement, and will increase the measurement time for each sensor by just over 4x.
  2. Set strong de-bounce settings. A value of 2 or greater is recommended.
  3. Set a strong count filter beta. A value of 2-3 for buttons and 1-2 for sliders/wheels is recommended.
  4. For self capacitance sensors, enable modulation. In self mode, the modulation improves the performance of the DTA (dynamic threshold adjustment) algorithm by spreading the conversion clock frequency and reducing noise spikes directly at the conversion frequencies and lower harmonics.
  5. For mutual (projected) capacitance sensors, disable modulation. In mutual mode, the modulation interferes with frequency hopping, as it widens the susceptibility bands.
  6. For mutual (projected) capacitance sensors, use a conversion frequency of 2 MHz or greater. If the phase lengths are both set to 1, a frequency divider of f/4 provides an effective conversion frequency of 2 MHz. Utilizing a faster conversion frequency increases the effectiveness of the frequency hopping mechanism by providing a wider spread between hop points.
  7. Set an error threshold for each sensor. For mutual capacitance, a good rule-of-thumb is to take the conversion count + 2-3x the maximum expected touch strength. For example, if a button has conversion count setting of 400, and a a maximum expected delta due to touch of 100, than setting an error threshold of 600-700 would be appropriate. This serves to "cap" every conversion result to a maximum value. If noise in the system attempts to cause a conversion to continue beyond the error threshold, then the conversion will be halted. This prevents rogue samples from having extremely long sample times and effecting the response time / filtering of the system. For self capacitance, a good value is the conversion count * 1.25. For example, a sensor with a conversion count of 800 would have an error threshold of 1000. This allows space for the runtime re-calibration algorithm to kick in (which happens if the LTA drifts outside +/- 1/8th of the conversion count, if enabled).
  8. For mutual (projected) capacitance sensors, set the bias current value to the highest setting.
  9. Become familiar with the EMC module configuration parameters, should you need to adjust them during development.

References

  1. http://wcalc.sourceforge.net/cgi-wcalc.html