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.
Previous article:Eliminating Capacitive Touchscreen Design Barriers with Gen4
Next article:Design scheme for realizing multi-touch by using single-layer ITO
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [SAMR21 new gameplay] 2. Download BOOTLOADER
- [Zero-knowledge ESP8266 tutorial] Quick Start 16 Use of WiFiScan library to scan WiFi near you
- Abnormal erasure of data in the information segment of the msp430 MCU, please help me
- About Lithium Battery Pack Monitoring, SOC and Battery Balancing Technology
- I am going to make a USB sound card myself and give a few to the forum.
- About the font design of single chip microcomputer
- Free evaluation: Pengfeng perf- V fpga development board worth thousands of yuan
- How to use IAR V7.12.1 to program MSP430 series microcontrollers
- sampling
- HuaWei Verilog Constraints