(Editor's note: We are pleased to present this lengthy, multipart, hands-on article about capacitive sensing, which address solid engineering and design issues. Touch sensing and touchscreens are extremely popular topics with our audience; for your convenience, you can see a linked list of all articles we have published on this topic here.)
Capacitive-sensing buttons are emerging as a popular interface alternative to mechanical switches in many consumer electronics and "white goods" applications. However, designing a capacitive-sensing interface comes with its own challenges which introduce new product-development, production, and quality-control concerns. For example, the parasitic capacitance (CP) of capacitive sensing buttons can vary from board to board and also can vary due to environmental changes such as changes in temperature and humidity. Noise also varies from system to system.
Another common issue with user interface (UI) design is design portability. If the UI design of a TV front panel changes, for example, the design will require sensor retuning to accommodate changes in layout, sensor dimensions, and other factors. The laborious process of tuning adds cost to a system in terms of manpower and time, as well as delays the product’s time to market.
This article focuses on different hurdles faced when designing a capacitive sensing interface and methods developers can use to overcome typical problems to make a design robust and portable.
Figure 1 shows what a typical capacitive-sensor board looks like.
Figure 1: Cross sectional view of capacitive sensing board
The sensor capacitance with respect to circuit ground in the absence of a finger is as shown in Figure 2(a). This capacitance is called parasitic capacitance (CP). When a finger touches the sensor (or comes near the sensor), Figure 2(b), it introduces another capacitance called finger capacitance (CF) in parallel to the CP. In the presence of a finger, the total sensor capacitance (CX) is given by Equation 1:
CX = CP + CF (Equation 1)
Figure 2(a): Sensor capacitance in the absence of finger
Figure 2(b): Sensor capacitance in the presence of finger
The change in capacitance introduced by CF is used to detect a finger press.
An electronic system measures the sensor capacitance by converting the capacitance into a digital value. Figure 3 shows the block diagram of a capacitive-sensing preprocessing circuit. (Note: There can be numerous different methods to measure capacitance).
Figure 3: Preprocessing circuit for measuring capacitance
This system uses a switched-capacitor circuit on the front end of the system to convert the sensor capacitance to an equivalent resistor, as shown in Equation 2 and Figure 4:
REQ = 1/FSCX (Equation 2)
where FS is the switching frequency of the switched-capacitor block.
Figure 4: Equivalent resistor
A sigma-delta modulator converts the current measured through the resistor into a digital count. When a finger is on the sensor, the capacitance increases and the equivalent resistance decreases. This causes an increase in the current through the resistor, resulting in an increase in the digital count.
This method requires one external component, CMOD. This is an Integration capacitor that gets charged through a constant-current source (IDAC) and discharged through the equivalent resistor.
The current is measured with the help of a comparator whose output bit stream (shown in Figure 3) is fed to a counter for a fixed amount of time. This counter value (the digital count) gives us an indication of the magnitude of CX. Let us measure the counter value as raw counts. The amount of time for which the counter counts determines the response time.
The fixed-time duration of the counter is called as scan time. Raw counts are compared with a reference level to decide the sensor ON and OFF status; this reference level is called baseline. When there is a finger touch, the raw count increases. In order for the sensor to be ON, this increase in the raw count must be greater than a threshold called the finger threshold. If the change in raw counts is below this threshold, then it is considered to be noise and that threshold is called the noise threshold (Figure 5).
Figure 5: Graph of different parameters of a capacitive sensor
Now that we have understood the basics of capacitive sensing, let’s discuss why capacitive sensing is needed and what challenges are faced in implementing them.
Comparison between capacitive-sensing and mechanical-button user interface
Capacitive sensing brings elegance, easy-to-use touch sensing functionality to a user interface. Capacitive touch sensor shave already replaced billions of mechanical buttons. Capacitive sensing not only gives sleek look to front panels but also eliminates wear and tear problems associated with mechanical buttons. In TV/monitor applications, capacitive sensing is being widely adopted because it eliminates tooling costs and adds to the aesthetics, Figure 6.
Figure 6: Mechanical buttons (upper) and
capacitive-sensing buttons (lower) on TV front panel
Table 1 lists some of the problems associated with mechanical buttons and the advantages of capacitive sensing buttons over mechanical switches.
(End of Part 1; Part 2 looks at the design flow and critical design issues including firmware, tuning, and production fine-tuning.)
Subbarao Lanka is a Senior Applications Engineer working at Cypress Semiconductor Corp. on Capacitive Touch Sensing applications since 2007. His responsibilities include defining technical requirements for new capacitive sensing controllers, developing new capacitive sensing controllers, conducting system analysis, debugging technical issues for customers, and technical writing. He can be reached at firstname.lastname@example.org.
Shruti H is an Applications Engineer working at Cypress Semiconductor on Capacitive Touch Sensing applications since 2009. She works on defining debugging technical issues for customers, technical requirements for new capacitive sensing controllers, developing new capacitive sensing controllers, conducting system analysis, and technical writing. She can be reached at email@example.com.