Panel For Example Panel For Example Panel For Example

Capacitive Touch Sensing Using MCU Microcontrollers

Author : Adrian April 15, 2026

 

Introduction

Fundamentally, a microcontroller can be described as a logic processing unit closely coupled with an increasingly complex set of peripherals. By coupling this digital domain with the physical world, peripheral functions and performance define the capabilities of a microcontroller.

Although attention often focuses on the MCU core, the application largely determines the required peripheral set. As MCU processing costs fall, more diverse and application-specific peripherals have emerged, enhancing general-purpose I/O through dedicated interfaces.

 

Peripheral Interfaces and Touch Sensing

In simple cases, a dedicated interface may be only a comparator rather than an ADC, but more integrated peripherals combine excitation (voltage or current sources) and measurement (for example ADC/DAC or current sensing) in a single input. Whether GPIO should be replaced by an application-specific interface typically depends on market scale and potential cost savings from high-volume production. One such application area is touch sensor interfaces.

Demand for low-cost touch interfaces is rising because increased interactivity can provide better control across many devices and is increasingly expected by users.

 

Touch Technologies

Historically, the most common form of touch sensing has been resistive, where the sensing surface can cover a screen or printed panel. The benefit of this approach is simplicity and low cost; it requires few resources and has relatively low processing overhead, though dedicated functional blocks can also be used to implement it.

Resistive interfaces usually work by detecting small resistance changes across planar surfaces formed by two conductive layers separated by an insulator. Applying pressure reduces the measured resistance. The key challenge is detecting the surface location of the pressure in X and Y coordinates, which depends on resolution. The minimum detectable position for an analog resistive interface is usually defined by surface size, absolute resistance change that can be measured, and the resolution of the ADC used to convert that measurement to a digital value.

Applying pressure at a specific point effectively creates a voltage divider that can be measured on the X and Y axes to localize a single contact point. The limitation of this method is that it usually permits only a single contact measurement at a time. As multi-touch sensing became desirable, resistive interfaces lost favor, although they remain useful in harsh or hazardous environments.

By contrast, capacitive touch sensing does not require physical pressure but does require close proximity to a conductive body, typically a finger. Like resistive sensing, capacitive sensing depends on two conductors separated by an insulator, but the insulator is air and the second conductor is the human body.

Replacing pressure with proximity has a notable drawback compared with resistive technology: it limits operation with nonconductive objects. While any conductive object can operate a capacitive sensor, it restricts use in some cases. For example, capacitive touchscreens are harder to operate with gloves on, whereas resistive interfaces work easily with gloves.

Capacitive sensing also relies on measuring very small capacitance fluctuations rather than the relatively large and easily measured resistance changes. This requires more complex solutions, but the added complexity is often handled by software running on the MCU core.

An important advantage of capacitive sensing is that primary electrodes can be constructed with conventional printed circuit board traces, allowing a variety of shapes and sizes.

Selecting the right solution for a given application is not simply a matter of choosing the most flexible or complex approach. The most appropriate technology can be the simplest, so all options should be carefully evaluated.

 

Discrete Solutions

Demand for touch-sensitive interfaces has driven development of dedicated devices, often targeting capacitive sensing. One example is Atmel's QTouch family, including the QT1481. This device supports matrix layouts and integrates the signal processing required to provide stable sensing in most conditions, even with single-sided PCBs. The device (44 pins) supports up to 48 keys of various shapes and sizes. The QTouch technique uses a method called lateral charge transfer, which forces charge changes between two electrodes using pulse edge detection. Because GPIO can emulate this method, Atmel's QTouch software library allows implementation on many of the company's MCU devices, including UC3A and UC3B series.

 

Traditional (Resistive) Solutions

Resistive touch remains suitable for many applications. There are solutions that support this need while offering additional features. An example is Cirrus Logic's EP9315 series MCU, which integrates resistive touch interface support. This mature family is based on an ARM920T core and can support Linux and Windows CE operating systems. Some variants include a math co-processor and graphics accelerator, providing competitive features compared with Cortex-based MCUs.

The device uses a hardware-based analog resistive touchscreen controller engine to handle sampling, averaging, range checking, and scan modes. While the engine performs the standard interface functions, it can be bypassed and more complex scan algorithms can be implemented on the ARM core.

 

Capacitive Interfaces

While resistive sensing remains relevant, many developers seek the flexibility and functionality provided by multi-touch capacitive sensing.

Beyond supporting multi-touch in displays, capacitive sensing allows user controls to be added to many non-transmissive surfaces, enabling controls in printed or coated glass, ceramic, or plastic panels. This permits almost any surface to become a durable interface for consumer and industrial applications.

Hardware and software methods for capacitive sensing vary by manufacturer, but oscillators are commonly used. Microchip's mTouch technology, for example, is implemented in its PIC16F series.

A capacitive sensing oscillator generates a triangular waveform, alternately sourcing and sinking current. Frequency changes caused by capacitance fluctuations are detected in software using two timers that are also under oscillator control. Introducing a capacitive load, such as a finger, reduces the oscillator frequency. Adding analog multiplexers allows the hardware to support up to twelve separate capacitive inputs.

Microchip PIC16F capacitive touch

Figure 1: Microchip capacitive touch on PIC16F series.

Microchip has also developed standalone devices that use more advanced projected-capacitive sensing to detect three-dimensional gestures, sensing distance from an electrode (PCB trace) up to 150 mm. This enables new applications that use natural gestures to control devices.

MCUs are continually being redefined, as illustrated by Cypress Semiconductor's programmable PSoC family. The PSoC range includes three main variants distinguished by core: PSoC1 uses an 8-bit M8C core, PSoC3 uses an 8051 core, and PSoC5 uses a 32-bit ARM Cortex-M3.

In each case, the core is augmented by a configurable hardware architecture that implements software-defined peripherals using analog and digital modules. This flexibility is managed through Cypress' integrated development environment, PSoC Creator.

Using this IDE, capacitive sensing features can be configured and optimized and, when combined with software libraries, can be used to implement application-specific touch solutions.

PSoC Creator IDE configuring PSoC3 and PSoC5

Figure 2: Configuring PSoC3 and PSoC5 with the PSoC Creator IDE.

In general, touch sensing and capacitive sensing can be implemented locally using relatively generic hardware features and compact software algorithms on many MCUs, while manufacturers continue to develop differentiated solutions.

Silicon Labs sees this application area as significant and has developed targeted solutions such as the C8051F family. These devices are described as capacitive-touch MCUs; they are based on a high-performance 8051 core and are optimized for touch applications. This is evident in the feature set, which includes a 16-bit successive approximation converter that can operate autonomously from the CPU.

The latest members of Silicon Labs' series are the Precision32 family, based on an ARM Cortex-M3 core, for example the SiM3 series. This provides higher processing performance and adopts Silicon Labs' capacitive-to-digital conversion technology.

In both series, conversions can be initiated from multiple internal and external sources and can support up to 16 channels. The SiM3C1xx devices offer four operating modes: single conversion, single scan, continuous single conversion, and continuous scan. Automatic accumulation mode averages multiple samples.

Silicon Labs Precision32 capacitive touch with Cortex-M3

Figure 3: Silicon Labs Precision32 combines an ARM Cortex-M3 core with touch sensing hardware.

 

Conclusion

User interfaces continue to evolve. Although simple mechanical switches may remain the easiest to implement, the inherent flexibility of MCUs means interfaces will become more sophisticated over time.

Capacitive touch sensing has replaced resistive sensing in many applications, but both technologies remain valid and will be designed where appropriate. Future improvements in touch sensing accuracy are likely to extend the use of these enabling technologies into a wider range of applications.