Implementation scheme of the hottest capacitive to

  • Detail

Capacitive touch sensing interface implementation scheme

touch sensing keys 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 realized through copper pads in standard PCB design. It is more popular than other technologies because it has overcurrent, overvoltage, overspeed, overload and other protection devices

this paper will briefly outline the capacitive touch sensing technology and its basic principle of implementation. This paper will introduce how to use CVD (capacitive voltage divider) technology and a MCU peripheral called charging time measurement unit (CTMU) to realize the low-cost capacitive touch sensing design with the least external components. A reference design will also be given to illustrate how to use capacitive touch sensing keys to replace mechanical switches

recently, the success of capacitive sensing rollers in many devices has made this technology more advantageous than other touch sensing technologies

principle of capacitive touch induction

when any object with capacitive characteristics (such as fingers) contacts the capacitive touch sensor, it will act as another capacitor due to its dielectric characteristics. This will change the effective capacitance of the system to detect the touch action

as shown in Figure 1, the finger acts as one of the parallel plates, and the other parallel plate is connected to the sensor input of the chip. Iron in human blood will produce a set of capacitors, which are attached to the body surface. When this capacitor bank approaches the conductor, it will produce a capacitance that is essentially coupled to the ground, which will be reflected as the change of the measured voltage when determining the touch

Figure 1: schematic diagram of capacitive touch sensing technology

a typical capacitive touch sensing system is composed of three main functional modules: an analog module for capacitive sensing, a controller for processing data, and an interface module for communicating with the main processor

the capacitive touch sensing solution can be effectively realized by using the technology based on voltage change, for example, by using the peripheral of on-chip charging time measurement unit (CTMU) of single chip microcomputer; Or by using voltage divider (CVD) technology, which uses analog-to-digital converter (ADC) without any special capacitive touch sensing peripherals

1. Using CTMU peripherals to realize capacitive touch sensing

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

Figure 2: CTMU module structure block diagram

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

ctmu peripherals for capacitive touch sensing applications use formula I × T=C × V. Where: I is the constant current source of CTMU, t is the fixed charging cycle of CTMU for capacitive touch sensor, C is the capacitance of capacitive touch sensor, and V is the voltage of capacitive touch sensor (read through ADC)

reorganize the formula into c= (I × T)/V, the relative change of capacitance can be detected by observing the voltage change. According to the above formula, the following steps involved in the touch detection process are given: connect the capacitive touch sensor (as a capacitor) to a channel multiplexed with CTMU peripherals and ADC; Initially, the constant current source charges the touch sensor within a fixed time period (T), and the voltage (V) on the sensor is measured by ADC, as shown in Figure 3; As long as the capacitance generated by touching the sensor pad does not change, the voltage will not change in the process of continuous charge measurement

Figure 3: charge and discharge waveform of CTMU

the constant current source in CTMU peripherals, combined with multi-channel ADC, provides an effective platform for interfacing with capacitive touch sensors. Connect CTMU peripherals directly to the input of ADC, so that it can be connected to any pin through 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

the micro adjustment bits related to the current source facilitate calibration, so that external interference and transmission loss can be dealt with

2. Capacitive touch sensing using CVD

capacitive voltage divider (CVD) method only uses ADC and realizes voltage based measurement by comparing the known fixed internal sample and hold capacitance with the unknown variable capacitance sensor

cvd sensor structure is the same as that of a typical sensor. The sensor is a copper-clad area on a PCB or a similar conductive pad for sensing. Connect the sensor directly to the ADC channel and configure ADC and i/o in a specific way

the basic principles of using CVD include: first, charge the internal sampling/holding capacitor of ADC to VDD through an ADC channel. Then, ground the sensor channel to a known state, as shown in Figure 4. After the sensor is grounded, it needs to be reset to input. After the reset is completed, the ADC channel switches to the sensor immediately

Figure 4: CVD structure block diagram

this operation enables the sample/hold capacitor CHOLD to be connected in parallel with the sensor capacitor, forming a voltage divider between the two. Therefore, the voltage on the sensor capacitor is equal to the voltage on the sample/hold capacitor. The ADC is sampled and its reading represents the ratio of two capacitors. When the finger touches the sensor, the capacitance of the sensor will increase. As a result, the voltage on 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 related to the reference reading

develop firmware to eliminate external interference

many factors such as temperature and humidity, touch degree and pollutants on the sensor and emi/emc interference, but the fatigue testing machine will cause dynamic fluctuations in capacitance, which will affect the capacitive touch sensing performance of the system. In order to deal with these effects, firmware that can realize dynamic average detection, de jitter and dynamic level jump can be used. These technologies will make the system more robust

in addition, software filtering must be combined to eliminate any residual noise on the sensor pad so that the firmware can distinguish between touch and untouched states. Designing the algorithm can also detect multiple touch states to distinguish intentional and unintentional touch. Then, the touch can be detected by calibration software, even if there is a thick covering layer on the touch pad of the capacitor

capacitive touch sensing reference design

Figure 5 shows a reference design for capacitive touch sensing applications, which can immediately help users start to implement capacitive touch sensing systems. This design will also provide great flexibility in realizing the interface with other peripherals such as USB and LCD. In addition, it helps reduce the turnaround time required to start and operate the touch sensitive system

Figure 5: reference design of capacitive touch sensing application

the single chip microcomputer used in the reference design has 13 ADC channels, so at most 13 touch sensors can be connected. The design includes four capacitive touch sensors, which are connected to ports a0-a3 respectively. The CTMU module has a programmable current source for charging capacitive touch sensors. As a bus powered device, USB socket provides power for applications. It uses an on-chip USB engine. When the sensor is pressed, the firmware can provide feedback information by displaying the corresponding status of the touch sensor on the LCD module, which is driven by the pin in port D. In addition, a 6-pin connector is provided in the design to connect the reference circuit board to the hardware programmer

factors affecting the design of effective capacitive touch sensing

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, and ultimately ensure a better sensor design

size of sensor pad: when designing capacitive sensors, the shape of sensor pad is not important. The main concern is the area of the pad that determines the sensitivity. The larger the pad area, the higher the sensitivity. In general, this area should be considered as the average size of the user's fingers (15x15mm). If the size of the sensor pad is larger than the ideal value, the parasitic capacitance will be increased because it is closer to the ground

spacing between sensors: the proximity between sensors and adjacent sensors should be considered. When touching a sensor, the finger generates additional capacitance not only to the current sensor, but also to its adjacent sensors. Therefore, to isolate finger capacitance, a certain space must be left between adjacent sensors. Ideally, the sensor spacing should be 2-3 times the thickness of the covering material of the capacitive touch sensing system. For example, for a typical capacitive touch sensing design, if the thickness of the covering material is 3mm, the distance between sensors should be 6mm to 9mm

wiring length: the wiring length between the sensor and the single chip microcomputer should not be too long, otherwise the possibility of being affected by parasitic capacitance will be greater. This will change the routing impedance and affect the sensitivity. Ideally, the routing length should not exceed 12 inches (300mm)

code for quality acceptance of covering materials advanced building decoration engineering dbj/t01 ⑵ 7 ⑵ 003 and its thickness: the covering materials used and their thickness will determine the finger capacitance transmitted to the capacitive touch sensor. The covering material used must have a large dielectric constant to increase sensitivity. In addition, make sure the covering material is as thin as possible. If the thickness of the covering material increases, the crosstalk effect between sensors will increase

grounding technology: the sensing method will be affected by the parasitic capacitance between the negative coherent inductor with large import and export at the beginning of transmission and the ground. It can be overcome by making the ground as close to the sensor as possible, which will increase the parasitic capacitance and reduce its impact on the sensor

select adhesive: adhesive is used to fix the covering material to PCB. The adhesive used should be as thin as possible to maintain high sensitivity. Care should be taken to ensure that there are no empty bubbles when using the adhesive. Carefully read the bonding instructions before using the adhesive

summary of this article

the latest development of touch sensing technology has reduced the related costs of this popular user interface, making it an ideal choice for consumer electronics, industrial products and other products. Compared with traditional mechanical switches, the main advantage of capacitive touch sensors is that they will not wear out over time like mechanical switches. By using the on-chip CTMU peripherals or CVD technology of single chip microcomputer, designers can realize the capacitive touch sensing user interface with the least components and at a lower cost. (end)

Copyright © 2011 JIN SHI