Skip to main content

Capacitive Touch Sensors

A Brief Introduction

Image Source: amixstudio/Stock.adobe.com

By Robin Mitchell for Mouser Electronics

Published March 2, 2023

Of all the electronic components that exist, the switch is arguably one of the most fundamental. The switch and lamp are often the first circuits shown to students to demonstrate how electrical current flows. Numerous switch technologies are available to engineers, and each technology has its own advantages and disadvantages.

Large electromechanical switches are ideal for controlling grid power, as they can handle large voltages and currents using a simple mechanical design (e.g., lever action), while smaller push buttons are ideal for use in consumer electronics that require a low-cost, simple solution that handle a few volts at most.

However, electromechanical switches used in consumer electronics can come with several hurdles, including their limited number of mechanical and electrical cycles (this is especially problematic for devices used by the public, such as chip-and-PIN readers).

Switches used in industrial control applications also face challenges. Environments that are humid, dusty, or corrosive can damage internal contacts and clog levers and actuators. Potentially explosive environments can even be ignited by such switches due to arcing between contacts. In these cases, even the smallest and simplest switches need high IPX ratings to ensure that they are fully sealed from the surrounding environment.

To mitigate these challenges, capacitive touch sensors offer engineers an excellent option for a switch that has no moving parts, can provide multitouch capabilities, and can easily be environmentally sealed. Although capacitive touch sensors are extremely popular in consumer electronics, they are not without their faults; engineers wishing to use them will need to learn how they work as well as possible obstacles and how to overcome them.

Understanding Capacitive Touch Sensors

Simply put, a capacitive touch sensor behaves like a switch that activates upon detecting a change in capacitance. While most other switch technologies rely on mechanical action, capacitive touch sensors activate in the presence of a finger or stylus regardless of the pressure applied (though that parameter can often be adjusted).

Capacitive touch sensors work because, under normal circumstances, the dielectric between two surface plates is air. When a finger replaces this air, the dielectric material changes, which significantly lowers the overall capacitance.

Capacitive touch sensors are ideal for applications that require environmental sealing from dust, dirt, and grease. For example, kitchen surfaces are often soiled by food and dust, which can quickly damage electromechanical switches. Capacitive touch sensors are not only immune to such damage but can also be wiped down easily, providing a more hygienic interface.

This ability to seal the sensors is also advantageous for industrial equipment that is expected to be used in explosive environments. Common electromechanical switches can spark when contact is made, and the size of this spark will depend on the voltage and current being used. If such switches are not properly sealed, they could ignite an explosive environment. Since capacitive touch sensors can be sealed entirely, their explosive risk is virtually zero.

Another potential application for capacitive touch sensors is devices that require many mechanical cycles. Even though electromechanical switches can have mechanical life cycles in the millions, some applications require more, such as payment terminals in public transport stations. Capacitive touch sensors are practically immune to long-term mechanical damage due to their lack of mechanical parts.

Finally, capacitive touch sensors are ideal for self-service checkout screens, especially because such surfaces can be cleaned easily without damaging the capacitive touch sensor. This is becoming increasingly important since the beginning of the COVID-19 pandemic, as many organizations routinely clean shared touchscreen surfaces as part of virus control efforts.

Integrating Capacitive Touch Sensors

When integrating capacitive touch sensors, engineers should keep several factors in mind, including the type of capacitive touch sensor, power consumption, interference from nearby electronics, and sensitivity.

Physical Characteristics

One of the most common types of capacitive touch sensor is mounted on a printed circuit board (PCB). This variety is manufactured entirely as a PCB feature, which can be an extremely cost-effective method for creating interfaces. The design requirements associated with a PCB-mounted capacitive touch sensor are relatively simple requiring only an electrode grid on the top layer, surrounded by a ground plane. Such a sensor design is further simplified by the many microcontrollers on the market that allow for direct reading of these switches.

When designing capacitive touch sensors in PCBs, the size of the sensor should not exceed the size of the average fingertip; in general, capacitive touch sensors for PCBs are between 8mm and 20mm in diameter. If larger, the sensor will be too sensitive, which can result in a phenomenon called “hand-shadow,” where being near a hand or arm will trigger the sensor.

Power Considerations

While electromechanical switches are passive components that require no power to operate, capacitive touch sensors are entirely active—they require power, which may introduce challenges where energy efficiency is critical. During operation, capacitive touch sensors are charged via an external circuit, and the time to charge is calculated by a microcontroller. As the time to charge is dependent on the capacitance, the presence of a finger will change the resulting charge time—a change that can be detected in software. Thus, a capacitive touch sensor requires both a charging current and a microcontroller that actively scans the sensor.

To reduce the power consumption of a capacitive touch sensor, engineers deploy different techniques. The most common is power cycling. During this phase, capacitive touch sensors are checked less frequently to minimize energy waste. Only when a finger or stylus is detected will the system increase the number of check cycles per second to ensure accuracy.

Another technique to reduce power involves the use of wake-up algorithms that can put a microcontroller to sleep while still operating capacitive touch peripherals. Just like power cycling, this method will only check for the presence of a finger periodically before waking up the main processor to determine what action to take.

Noise and Interference

One major drawback to capacitive touch sensors is their vulnerability to noise and interference; thus, engineers must ensure that sources of interference are eliminated or mitigated as much as possible. For example, fluctuations in the power supply can easily inject noise into the sensor itself, especially high-frequency noise caused by switch-mode power supplies and microcontroller operation. As such, power supplies and microcontrollers must have sufficient decoupling as well as low-pass filters.

A particularly troublesome source for interference is external electromagnetic interference (EMI), as capacitive touch sensors are large plates that act as antennas. Therefore, engineers must shield the sensors from noisy EMI sources by providing sufficient ground planes and by keeping the sensor circuits away from noisy components.

Variations in ambient temperature can also affect the sensing capabilities of capacitive touch sensors, primarily because the dielectric constant of fingers changes greatly with temperature. Despite the stable core temperature of humans, the temperature of their extremities can change dramatically, and these changes can make it difficult to detect the presence of a finger. At the same time, lower temperatures also reduce the amount of moisture on skin, which affects how capacitive touch sensors operate.

Sensitivity

Capacitive touch sensors produce a nonlinear analog output (as opposed to a simple digital on/off output), so they can be used for more than just simple detection. For example, this nonlinear output can be used to determine both distance and pressure applied by a finger, which allows for advanced features.

While this nonlinear nature may be desirable in some applications, the sensitivity to environmental conditions can make capacitive touch sensors difficult to tune. For example, a capacitive touch sensor in a dusty environment will require increased sensitivity, while moist environments such as humid climates may require decreased sensor sensitivity.

Electrical Specifications

Capacitive touch sensors are extremely tolerant of operating voltages, and many microcontrollers that natively support capacitive touch sensors will integrate all the necessary voltage drivers and current readers to operate the switches. Therefore, design engineers can generally focus their attention on the physical dimensions and design of capacitive touch sensors instead of worrying about voltage levels, bus converters, and other electrical considerations.

Mounting and Layout Design

The art of designing capacitive touch sensors is complex, with design considerations such as the size of the sensor, the use of ground planes, and the materials that will cover the sensor. Fortunately for engineers, numerous in-depth resources describe different sensor designs and the calculations needed to make these sensors work. Such resources are typically published by manufacturers of microcontrollers that incorporate capacitive touch sensor peripherals.

As previously discussed, capacitive touch sensors must be kept away from noisy EMI sources. Grounding around the sensor is also important, and engineers should consider the casing of the overall device. For example, an ungrounded metal enclosure can introduce noise into capacitive touch sensors and make it difficult to detect presses reliably.

Interfaces

While design engineers could create their own capacitive touch interface, using one of the many off-the-shelf solutions is far easier. In most cases, these microcontrollers have all the peripherals needed to drive capacitive touch sensors directly, which not only eliminates the need for external components but also reduces the price and size of the final design.

Calibration

Calibration is an extremely important step when integrating capacitive touch sensors. No amount of theory and calculation will allow a capacitive touch sensor to be programmed once in a factory without some kind of calibration step; as such, engineers should consider how to integrate calibration either during manufacturing or as a first-time setup stage by customers.

The best way to calibrate a capacitive touch sensor is to take multiple readings, find the average, and then add margins. By doing so, the switch is guaranteed to activate each time it is pressed, and the margin can account for slight changes in moisture, temperature, and debris. Finally, advanced gesture controls can also be calibrated by performing multiple identical actions, recording the data, averaging these data, and then feeding these data into the algorithm used to identify the gestures—or if artificial intelligence (AI) is used, training the AI from the collected raw data.

Conclusion

Although capacitive touch sensors may require microcontrollers to operate and shielding from noisy sources, they are an excellent alternative to traditional electromechanical switches in industrial control applications due to their entirely solid-state design, comparative low cost, and support for gestures. This article provides an overview of capacitive touch sensors and some of their uses and designs. For more detailed information, refer to the datasheets and application notes of the sensors and the microcontrollers that support them.

About the Author

Robin Mitchell is an electronic engineer who has been involved in electronics since the age of 13. After completing a BEng at the University of Warwick, Robin moved into the field of online content creation developing articles, news pieces, and projects aimed at professionals and makers alike. Currently, Robin runs a small electronics business, MitchElectronics, which produces educational kits and resources.

Profile Photo of Robin Mitchell