PSoC-based CapSense solution simplifies capacitive touch sensing design

Publisher:HarmoniousDreamLatest update time:2012-09-29 Keywords:PSoC Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Capacitive touch sensing adds robustness to human-machine interfaces in a wide range of applications, including industrial and white goods, by sensing the presence of a finger through varying thicknesses of glass or plastic. The most well-known example of capacitive touch sensing is the touchpad used in laptop computers. In recent years, several popular MP3 players have also begun to use capacitive touch sensing technology to provide easy navigation and popularize capacitive touch sensing input methods.

However, the traditional implementation of this technology uses a modular design solution with poor flexibility, high cost, and involves licensing issues. To address these issues, Cypress Semiconductor has introduced a new design approach called CapSense that eliminates the "black box" barrier of the module and can achieve the lowest cost solution to date.

Figure 1: Simple capacitive switch.

Some touch sensing technologies look similar to capacitive touch sensing (e.g., resistive film and field effect), but the performance comparison ultimately falls short. Resistive film measures the change in voltage between two thin resistive plates covering the display, and resistive film is expensive, easily wears out, and has a short lifespan.

Field effect, on the other hand, detects changes in electric fields that occur in the presence of a conductive element. Currently, field effect implementations are very expensive because they require a system controller and an additional IC for each switch. Because each IC sensor must be isolated from nearby sensors, field effect designs are inflexible and limited, making sliders and touchpads with any useful resolution virtually impossible. Field effect implementations often require costly switch calibration during manufacturing.

Capacitive touch sensing offers far greater flexibility and is much less expensive than the two touch sensing technologies mentioned above. The basic principle is that the insertion of a conductive element causes a change in the charge voltage on a capacitive switch. (The simplest capacitive switch consists of just two adjacent conductive plates, as shown in Figure 1.) This measured change in capacitance can be used to provide many highly flexible input configurations, from buttons, sliders, and touchpads to proximity detectors for security applications.

CapSense Solution Based on PSoC

CapSense is based on Cypress's PSoC mixed-signal array technology. The Cypress PSoC design team has implemented unique CapSense solutions through close collaboration with specific customers whose applications require a flexible single IC architecture that can be easily integrated into existing systems at a lower cost and with greater flexibility than module-based solutions.

Figure 2: Relaxation oscillator block diagram

With module-based solutions, customers have to pay for the module redesign done by the module vendor. Therefore, embedded product engineers urgently need a new approach that can take the initiative by providing a method to quickly implement unique solutions. The unique configurability of the PSoC architecture and new intuitive software tools together enable CapSense solutions.

Both the CY8C21x34 and CY8C24794 PSoC devices include a DAC-adjustable current source, automatic connections for comparators and reset switches, and a unique analog multiplexer bus. The analog multiplexer bus allows all channels under test to be run from a common comparator and current source. This means that every IO (28 total IOs) in the CY8C21x34 device and 48 IOs in the CY8C24794 device can be used for a CapSense switch. In contrast, competing solutions often require multiplexers and multiple ICs to provide a comparable number of switches. PSoC offers greater integration capabilities and significant BOM cost savings.

Not only is the PSoC architecture well suited for capacitive touch sensing, but the technology used to process the measured capacitance changes is also optimal for two reasons: it is an open technology (not restricted by expensive patent royalties) and it is implemented using easy-to-use design tools.

Relaxation Oscillator Technology

The relaxation oscillator technique is a specific method used by the PSoC device to implement capacitive touch sensing. Figure 2 shows how the PSoC device is configured to implement the relaxation oscillator.

The relaxation oscillator consists of a capacitive switch, a charging current source, a comparator, a reset switch, a PWM, and a timer. The voltage on the capacitor is charged linearly until it reaches the threshold, triggering the comparator output to a high level. This will start the switch and then reset the voltage on the capacitor to ground (so that the charging cycle can start again). Its oscillation waveform is shown in Figure 3.

Figure 3: Relaxation oscillator waveform.

The output frequency of this oscillation depends on the capacitance (Cp) and the charging current. If an additional conductive element (such as a finger) is not on the switch, Cp consists only of parasitic capacitance. If a finger is present, Cp becomes larger because it includes the additional capacitance formed by the conductive element in addition to the parasitic capacitance. The larger the capacitance, the longer the charging time and the lower the oscillation frequency. The frequency of the oscillation corresponds to the size of the capacitance driven by the oscillator output. The digital count block provides a count value (n) that can be used to determine whether the capacitive switch has been activated.

The digital counting block can be configured to provide two different measurement methods: frequency measurement and period measurement. (See Figure 3 for the period measurement method.) As the names imply, the difference between these measurement methods is the physical quantity being measured. In the period measurement method, the frequency of the PWM is fixed and the period length is determined by the relaxation oscillator. In contrast, the frequency measurement technique has a fixed period and measures the change in the PWM frequency (which is determined by the frequency of the relaxation oscillator). In both cases, the PWM output will enable a timer whose count (n) can be associated with a specific threshold to implement a simple on/off switch. Alternatively, since a switch can have an interpolation resolution of up to 1/256, the timer count (n) can be used to determine the position of a slider or touch pad. The easy-to-use PSoC Designer software makes both methods easy to implement.

Figure 4: CSR Configuration Wizard

Simple function blocks simplify design

The PSoC device is a complex mixed-signal array with an onboard 8-bit controller and high flexibility. The majority of the chip consists of analog and digital blocks controlled by registers that can be configured to implement onboard peripherals such as PWM, timers, counters, ADCs, programmable gain amplifiers, and many other components, all part of the same device. Because the PSoC device is based on flash memory, these functional blocks can be reconfigured 50,000 times and can even be reconfigured at will.

Embedded product engineers can quickly configure these functions one by one and interact with PSoC devices at the register level; they can also save a lot of design time by using PSoC Designer (free download from www.cypress.com) user modules to control device configuration at the functional block level. PSoC Designer includes a library of more than 50 user modules. In the process of selecting user modules, Cypress provides engineers with simple design wizards and parameter tables.

Figure 5: Training Board (CY3212 - CapSense)

Each user module automatically configures the appropriate PSoC registers and provides a set of application programming interfaces (APIs) that enable engineers to simplify code to implement a PWM with only two lines of code.

This simple functional block-based design standard also applies to capacitive touch sensing. The CSR user module (Capacitive Switch Relaxation Oscillator) provides pull-down parameter settings, a GUI configuration wizard, and a detailed product manual to answer questions related to board layout and duplexing to create a more efficient slider or touchpad implementation. Figure 4 shows a photo based on the CSR GUI configuration wizard (see website for details).

In addition to the user modules, Cypress also provides some related application notes (AN2233a: Capacitive Switch Scanning and AN2292: Layout Guidelines for PSoC CapSense) to provide engineers with more design support. Two demonstration boards, along with user guides, supporting firmware, and application notes, form the basic CapSense design (CY3220-FPD and CY3220-Slider). To help designers who are new to CapSense, Cypress also offers a training kit that provides a detailed guidebook on CapSense implementation. It includes a training board (see Figure 5). The combination of the training kit, easy-to-use design tools, a flexible and powerful architecture, and patent-free measurement technology makes PSoC CapSense an ideal choice for all capacitive touch sensing designs.

Keywords:PSoC Reference address:PSoC-based CapSense solution simplifies capacitive touch sensing design

Previous article:Research on image processing components and filtering technology
Next article:Simulation of Base Station Power Amplifier Based on ADS

Recommended ReadingLatest update time:2024-11-16 16:20

PSoC 4 BLE meets low-power wireless design challenges for IoT and wearable devices
For wearable devices and Internet of Things (IoT) products that are blooming everywhere, what kind of wireless technology is the product really needed? What challenges do engineers face when designing? The survey shows that engineers mainly face three major design challenges: First, it is difficult to design sensor-ba
[Power Management]
PSoC 4 BLE meets low-power wireless design challenges for IoT and wearable devices
Latest Analog Electronics 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号