Take a quick look at most older appliances, consumer products, and even medical devices of just a few decades ago and you’ll see their user front panels are covered with traditional, protruding electromechanical pushbutton-contact switches. In many cases, these pushbuttons are covered to protect them from spilled liquids and dirt, while their labels take up precious panel space.
Now fast-forward to the present and their appearance has dramatically changed, largely due to one development: reliable and cost-effective touch sensing, especially capacitive-based touch sensing. These switches have varying shapes and sizes, with labels and images on overlays on top of the entire panel, and with no openings for liquid or dirt intrusion.
They’re activated when the user’s finger gets close to (proximity) or touches the overlay, depending on the design and implementation specifics. In contrast, using capacitive-touch sensing, there’s no need for or even possibility for physical contact between the switch’s metallic elements and the user’s finger, an additional benefit (Fig. 1).
- PSoC® 4 Microcontrollers: Your Problem Solver on Chip
- Cypress PSoC 4 Microcontrollers Brochure
- Getting Started with CapSense
1. The capacitance-based touch pushbutton is now widely used in consumer products due to its many positive attributes and overall cost-effectiveness.
One key feature of capacitive touch sensing is long-term reliability. There are no moving parts, no exposure to the elements, no required activation force, and no performance changes due to dirt intrusion. Other advances have led to the elimination of additional panel assembly cost, no switches to insert and wire, no need for costly panel cutouts, flexibility of switch location and positioning, and an overall enhanced and sleek appearance.
What makes these switches practical is a sophisticated application of a basic principle of physics. Translating that principle into a workable concept, and then into a viable solution to the switch issue, can take significant effort and integration across multiple engineering disciplines. The challenge becomes more difficult when a wired or wireless link between the end product and a PC, smartphone, or other network is needed.
Fortunately, today’s ICs with embedded analog front end, firmware, and connectivity can turn this challenge into a straightforward, easy-to-use solution to the technical issues related to capacitive-based touch and proximity sensing. As a result, this principle has been widely adopted in products ranging from basic door locks and LED activation to appliances such as microwave ovens, stoves controls, and even personal medical devices.
Basic Principles and Implementation
It’s been known for well over a century that the presence of the human body or even an appendage affects the capacitance of a nearby “exposed” (non-shielded) capacitor. Perhaps the best-known example of this is the Theremin musical instrument, where one hand of the performer controls oscillator pitch while the other controls its volume, without physical contact.
2. The pushbutton design starts with the understanding of the electric field formed as a capacitor between a sensing pad and a nearby ground.
In capacitive touch sensing, that capacitor is part of the tank circuit which establishes resonant frequency. Changes and shifts in capacitor value can be detected and then used to determine if a user’s finger was “close enough” or even touched the panel (Fig. 2).
The basic concept behind capacitive touch switch is simple: The system determines that a button has been pressed, or the finger has come sufficiently close, by first detecting changes in capacitance at the layered assembly of printed circuit board (PCB), insulated overlay, and touch surface (Fig. 3).
3. The basic principle is to sense changes in capacitance between a sensor pad and associated ground that occur when a finger touches or is in close proximity to the pad.
The capacitance is usually measured by frequency-to-count analog-to-digital converter (ADC). Making the decision as to whether a change in count and thus capacitance is a valid touch or even a close-enough proximity approach requires firmware-based algorithms that are tuned to the specific touchpad configuration. It generally requires a large amount of experience in modeling, designing, and implementing the pad geometry and physical layers, as well as with the many types of waveforms that the changes may generate and understanding how to interpret them.
The touchpad can have a wide range of dimensions and shapes, including small squares or circles about 1/4-in. (5.6 mm) across to larger sizes reaching two to three times those dimensions. The construction of the touchpads is compatible with standard PCB layout and fabrication, so the switch is essentially “free” except to the real estate it uses, which is generally less than the mechanical switch and panel label it replaces; this is another advantage.
Note that the single-pad topology is best suited for single-button switches. A somewhat more complicated arrangement uses the mutual capacitance between two closely spaced pads, and how it’s affected by a finger proximity, to implement sliders and other motions used with touchscreens and trackpads. While this setup is somewhat more involved, the underlying basics and associated issues are very similar to the single-pad button.
It’s More than PCB and Plastic
What electrically differentiates the capacitive touch switch from the older electromechanical (EM) switch is very clear: The EM switch is a basic ohmic switch closure, and thus is easily detected as its resistance goes from near-infinite to near-zero ohms. In contrast, the capacitance touch switch requires algorithms to make the equivalent of the on/off determination.
4. Capacitive-sensing signal analysis begins with raw counts, which correspond to the digitized value of the frequency of the oscillator using this capacitor.
These algorithms must recognize both the non-activated baseline waveform as well as changes due to legitimate touch or proximity, while ignoring nearby false positives or the triggers due unavoidable noise. The baseline waveform of raw counts is a function of many factors, such as switch geometry, implementation, and application variables. For example, a baseline raw-count reading might look like Fig. 4, while the same switch, when activated, might have the waveform of Fig. 5 (top). Meanwhile, the actual reading is that waveform raw count minus the baseline shown in Fig. 5 (bottom). However, depending on details such as finger size, number of fingers, nearby body position, and other factors, that raw count can vary considerably. There are also issues of circuit drift with temperature, manufacturing tolerance and variability, noise, and other factors.
5. Part of the algorithm’s function is to determine a raw-count baseline and subtract it from the active raw-count readings.
Fortunately, these complications are no longer an impediment to using the capacitive touch switch. Today’s advanced algorithms tune to the baseline switch situation and its variations, and dynamically auto-tune and adjust yes/no thresholds to the application, drifts, tolerances, and effects of nearby objects that may affect capacitance. They can also filter out noise and other electrical variations such as supply-induced changes, as well as add appropriate hysteresis. The result is a reliable, low-cost, flexible contactless switch that offers initial savings and design flexibility, long-term performance, and enhanced appearance.
Then There’s Adding Wireless
In today’s dynamic environment, providing connectivity—especially wireless connectivity—is an important factor in marketing the latest- and next-generation of appliances as they become nodes in the Internet of Things (IoT). This is a reality as consumers expect to have everything connected to the web and the cloud.
But making this connectivity happen has traditionally required adding and subsequently integrating yet another module or function to the existing circuitry. Complicating the situation is that the expertise needed for developing an analog sensor such as a touch switch, interfacing it, and assessing its output often is far different than that needed for wireless connectivity. Among the challenges are difficult issues of RFI/EMI (both sourcing and being degraded by it), internal interconnections, suitable layout, and even regulatory requirements from the FCC in the U.S. and corresponding agencies around the world.
Fortunately, the multifaceted issues related to developing the physical touch switch, defining and implementing the sense algorithms as discussed above, and adding wired/wireless connectivity are now overcome via highly integrated solutions. One of those is the PSoC 4 portfolio from Cypress Semiconductor, which comprises several families of Arm Cortex-M0 and Cortex-M0+ microcontrollers.
However, that’s only the start as most devices in the portfolio include Cypress’ proprietary CapSense technology, a capacitive-sensing solution for touch- and proximity-sensing applications. Other features include a customizable analog front end with programmable analog blocks to interface to any analog sensor with an assortment of op amps, comparators, ADCs, and digital-o-analog converters (DACs), enabling complex analog signal flows.
There’s more than analog to the portfolio—digital functions include universal digital blocks, serial communication blocks, and timer/counter/pulse-width modulators. These can be configured to set up custom digital interfaces, state machines, and even custom logic functions.
6. The PSoC 4100 family includes devices with basic analog building blocks such as programmable ADCs/DACs, comparators, and op amps, as well as wired (CAN, USB) and wireless (BLE) interfaces.
Within the PSoC 4 portfolio are devices that include wired and wireless connectivity. For example, the PSoC 4100 family (Fig. 6) has programmable analog blocks such as ADCs, DACs, low-power comparators, and op amps. Wired connectivity supports USB and CAN interfaces, and the PSoC 4100BL includes an integrated Bluetooth Low Energy radio and subsystem.
The availability of these blocks and flexibility when using them makes design of high-end consumer products such as an induction cooktop straightforward (Fig. 7). It includes the interfaces and drivers needed for both the user-facing and internal functions such as temperature and humidity sensors, LCD displays, touch switches, fan control, and even control for the IGBT-coil drivers.
7. The PSoC 4100 devices are a good fit with consumer appliances such as an induction cooktop. They’re configurable and include interfaces and drivers for many peripheral functions including front-panel capacitive touch interfaces.
Capacitive-based touch switches offer a wide range of benefits for product design and execution, as well as to the end user, with cost-effective and visually pleasing results. Efficiently and reliably implementing their use was a complex task with many subtleties in the past, as it required integrating of multiple analog, digital, and mixed-signal functions, as well as algorithms and coding to produce rugged, reliable switch sensing.
Now, devices such as those in the Cypress Semiconductor PSoC 4 family with integrated CapSense and Cortex Arm microcontrollers, as well as wired/wireless connectivity, have dramatically redefined this situation. The result is an attractive, cost-effective path for bringing sophisticated, leading-edge products to market quickly with a high level of confidence and performance.