Capacitive touch sensing interface implementation solution

Publisher:cloudsousou6Latest update time:2012-11-22 Source: 维库电子 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Touch-sensing buttons are popular in daily human-machine interface applications because they are easy to use, beautiful, and do not involve mechanical movement. In particular, capacitive touch sensing technology can be implemented through copper pads in standard PCB design, making it more popular than other technologies.

This article will provide a brief overview of the basic principles of capacitive touch sensing technology and its implementation. It will show how to use CVD (capacitive voltage divider) technology and a microcontroller peripheral called charge time measurement unit (CTMU) to implement a low-cost capacitive touch sensing design with minimal external components. A reference design will also be given to illustrate how to replace mechanical switches with capacitive touch sensing buttons.

The recent success of capacitive sensing scroll wheels in many devices has given this technology an advantage over other touch sensing technologies.

Principle of capacitive touch sensing

When any object with capacitive properties, such as a finger, comes into contact with a capacitive touch sensor, it acts as another capacitor due to its dielectric properties. This changes the effective capacitance of the system, which is how the touch is detected.

As shown in Figure 1, the finger acts as one of the parallel plates, while the other parallel plate is connected to the sensor input of the chip. The iron in the human blood will generate a group of capacitors that are attached to the body surface. When this group of capacitors is close to the conductor, a capacitance that is essentially coupled to the ground will be generated, which will be reflected as a change in the measured voltage when a touch is determined.

Figure 1: Schematic diagram of capacitive touch sensing technology.

A typical capacitive touch sensing system consists of three main functional blocks: an analog block for capacitive sensing, a controller for processing data, and an interface block for communicating with the host processor.

Capacitive touch sensing solutions can be effectively implemented by leveraging voltage change-based techniques, such as by using the microcontroller’s on-chip charge time measurement unit (CTMU) peripheral, or by using a voltage divider (CVD) technique that uses an analog-to-digital converter (ADC) without the need for any dedicated capacitive touch sensing peripheral.

1. Capacitive touch sensing using the CTMU peripheral

The CTMU peripheral is a flexible analog module that can be used in conjunction with an ADC to accurately measure capacitance. It consists of a constant current source connected to this ADC channel, as shown in Figure 2. The CTMU uses the constant current source to calculate the change in capacitance and the time difference between different events.

Figure 2: CTMU module structure block diagram.

Compared to CVD, CTMU can provide faster response time because it has multiple different current source ranges, which will help charge the analog channels at a faster rate, thereby improving the response time of the capacitive touch sensing system.

The CTMU peripheral is used in capacitive touch sensing applications using the formula I×T=C×V. Where: I is the constant current source of the CTMU, T is the fixed period for the CTMU to charge the capacitive touch sensor, C is the capacitance of the capacitive touch sensor, and V is the capacitive touch sensor voltage (read by the ADC).

Rearranging this formula to C = (I × T) / V, the relative change in capacitance can be detected by observing the voltage change. Based on the previous formula, the following are the steps involved in the process of detecting a touch: The capacitive touch sensor (as a capacitor) is connected to a channel multiplexed with the CTMU peripheral and the ADC; Initially, a constant current source charges the touch sensor for a fixed period of time (T), and the voltage across the sensor (V) is measured by the ADC, as shown in Figure 3; As long as the capacitance caused by the touch sensor pad does not change, the voltage will not change during the process of multiple consecutive charge measurements.

Figure 3: CTMU charge and discharge waveforms.

The constant current source present in the CTMU peripheral, combined with the multi-channel ADC, provides an effective platform for interfacing with capacitive touch sensors. Connecting the CTMU peripheral directly to the input of the ADC allows it to be connected to any pin through an analog multiplexer. With this configuration, the number of sensors that can be measured by a single CTMU peripheral will be equal to the number of ADC channels.

Trim bits associated with the current sources facilitate calibration to account for external disturbances and transmission losses.

2. Capacitive touch sensing using CVD

The capacitive voltage divider (CVD) method uses only the ADC and implements a voltage-based measurement by comparing a known fixed internal sample-and-hold capacitor to an unknown variable capacitive sensor.

The sensor structure of CVD is the same as that of a typical sensor, where the sensor is a copper area on the PCB or a similar conductive pad used for sensing. The sensor is directly connected to the ADC channel and the ADC and I/O are configured in a specific way.

The basic principle of using CVD includes: First, the ADC's internal sample/hold capacitor is charged to VDD through one ADC channel. Then, the sensor channel is grounded to put it in a known state, as shown in Figure 4. After the sensor is grounded, it needs to be reset as an input. After the reset is completed, the ADC channel is immediately switched to the sensor.

Figure 4: CVD structure block diagram.

This action places the sample/hold capacitor CHOLD in parallel with the sensor capacitance, forming a voltage divider between the two. Therefore, the voltage across the sensor capacitance is equal to the voltage across the sample/hold capacitor. The ADC is sampled and its reading represents the ratio of the two capacitances. When a finger touches the sensor, the capacitance of the sensor increases. Therefore, the voltage across the sensor will decrease, and the ADC reading will increase.

For capacitive touch sensing technology, an absolute capacitance reading is not required because all decoding decisions are relative to a reference reading.

Develop firmware to eliminate external interference

Various factors such as temperature and humidity, touch level and contaminants on the sensor, and EMI/EMC interference will cause dynamic fluctuations in capacitance, thus affecting the system's capacitive touch sensing performance. To address these effects, firmware that can implement dynamic average detection, de-jittering, and dynamic level jumps can be used. These techniques will make the system more robust.

Additionally, software filtering must be incorporated to remove any residual noise on the sensor pads so that the firmware can distinguish between touched and untouched states. The algorithm can also be designed to detect multiple touch states to distinguish between intentional and unintentional touches. The software can then be calibrated to detect touches even with thick overlays on the capacitive touch pads.

Capacitive Touch Sensing Reference Design

Figure 5 shows a reference design for capacitive touch sensing applications that can immediately help users get started with implementing a capacitive touch sensing system. This design will also provide great flexibility when implementing interfaces with other peripherals such as USB and LCD. In addition, it will help reduce the turnaround time required to get a touch sensing system up and running.

Figure 5: Reference design for capacitive touch sensing applications.

The microcontroller used in the reference design has 13 ADC channels, so up to 13 touch sensors can be connected. Four capacitive touch sensors are included in the design and are connected to ports A0-A3. The CTMU module has a programmable current source to charge the capacitive touch sensors. The USB receptacle powers the application as a bus-powered device, using the on-chip USB engine. When the sensor is pressed, the firmware provides feedback by displaying the corresponding status of the touch sensor on the LCD module, which is driven by the pins in port D. In addition, a 6-pin header is provided to connect the reference board to a hardware programmer.

Factors Affecting Effective Capacitive Touch Sensing Design

The introduction of capacitive touch sensing technology has brought various challenges to real-time applications. The following design considerations can help reduce parasitic capacitance and increase finger capacitance, ultimately ensuring a better sensor design.

Sensor pad size: When designing a capacitive sensor, the shape of the sensor pad is not important. The main concern is the area of ​​the pad, which determines the sensitivity. The larger the pad area, the higher the sensitivity. Generally speaking, this area should be considered the average size of a user's finger (15x15mm). If the sensor pad size is larger than ideal, it will increase parasitic capacitance due to being closer to ground.

Spacing between sensors: Consider the proximity of the sensor to the adjacent sensors. When a sensor is touched, the finger not only creates additional capacitance to the current sensor, but also to the adjacent sensors. Therefore, to isolate the finger capacitance, there must be some space between adjacent sensors. Ideally, the sensor spacing should be 2 to 3 times the thickness of the cover material of the capacitive touch sensing system. For example, for a typical capacitive touch sensing design, if the cover material is 3mm thick, the distance between sensors should be 6mm to 9mm.

Trace length: The trace length between the sensor and the microcontroller cannot be too long, otherwise it will be more likely to be affected by parasitic capacitance. This will change the trace impedance and affect sensitivity. Ideally, the trace length should not exceed 12 inches (300mm).

Overlay material and its thickness: The overlay material used and its thickness will determine the finger capacitance transmitted to the capacitive touch sensor. The overlay material used must have a large dielectric constant to increase sensitivity. In addition, the overlay material must be as thin as possible. If the thickness of the overlay material increases, the crosstalk effect between sensors will increase.

Grounding Techniques: Sensing methods will be affected by parasitic capacitance between the sensor and ground. This can be overcome by placing the ground as close to the sensor as possible, which will increase the parasitic capacitance and reduce its effect on the sensor.

Selecting an adhesive: The adhesive is used to secure the cover material to the PCB. The adhesive used should be as thin as possible to maintain high sensitivity. Care should be taken when applying the adhesive to ensure that there are no air bubbles. The adhesive instructions should be carefully read before using the adhesive.

Conclusion

Recent advances in touch sensing technology have reduced the costs associated with this popular user interface, making it an ideal choice for consumer electronics, industrial products, and other products. The main advantage of capacitive touch sensors over traditional mechanical switches is that they do not wear out over time like mechanical switches. By using the microcontroller's on-chip CTMU peripheral or CVD technology, designers can implement capacitive touch sensing user interfaces with minimal components and at a low cost.

Reference address:Capacitive touch sensing interface implementation solution

Previous article:Eliminating Capacitive Touchscreen Design Barriers with Gen4
Next article:Design scheme for realizing multi-touch by using single-layer ITO

Latest Power Management Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号