Overcome the Top 4 Challenges of Capacitive Sense Design
From light switches to washing machines, developers are adding capacitive sense to hundreds of devices that need a sleek, low-profile interface surface, improved long-term reliability compared to mechanical buttons, and a customized interface. All capacitive sensing solutions essentially perform the same task. Sensors use integrated CMOS designs combined with external capacitive components to measure minute analog changes. Then, post-sample processing interprets these changes to characterize user touches. Although capacitive sensing solutions have been on the market for decades, this technology still has formidable design barriers, especially in early-stage development. Engineers must do the following to create an optimal solution:
- Balance the often-conflicting priorities of touch robustness and current consumption
- Focus on sensor layout, stack-up, and other system-level considerations
- Create firmware that filters interference, qualifies touches, and produces reliable touch data
Additionally, any sensitive analog sub-system in a mixed-signal design faces the challenge of performing optimally in systems where almost every factor in a system (i.e., current draw, timing) work in concert to degrade performance. To minimize these complexities and streamline the development process, developers must determine if an integrated approach is better than a fixed-function one for their application.
Integrated vs. Fixed Function Approach
The numerous capacitive sensing solutions on the market today can be divided into two groups:
- Those that require some firmware development
- Those that do not require any coding
Before developers begin evaluating solutions, they must determine which type of solution is right for their product. This presents an interesting challenge. To successfully design a product for the connected home, designers must generally build a small form-factor product, with the cheapest bill of materials (BOM), and reliable operation over several years without battery replacement.
Option A: Integrated Solution
An MCU-based, integrated solution is beneficial when multiple responsibilities need to come from one microcontroller because
- The device has space constraints
- The sensor must use a less-common serial or parallel interface to communicate to the larger system
- System level requirements fall outside the capabilities of fixed function solutions
However, this isn't a foolproof option. Integrating capacitive sensing into a central MCU creates additional challenges, including coding issues and resource constraints.
1. In-house coding expertise. The worst case is when a developer has chosen an MCU from a vendor that doesn't have comprehensive capacitive sensing firmware and software support. Therefore, all sensing firmware must be developed in-house. Coding, debugging, and finally optimizing capacitive sensing firmware against all of the factors that can degrade performance in the field is a task that companies easily devote entire teams to deliver. Ideally, developers will find a way to avoid this treacherous path and instead choose a vendor that provides firmware to be used as a starting point. However, even when an MCU is running thoroughly tested code, integration challenges remain.
2. MCU resource contraints. In an MCU that is responsible for multiple tasks in a system, capacitive sensing sample and processing time must be shared among all other responsibilities. Resource sharing requires careful examination of expected worst-case runtime scenarios so that a balance can be struck among components. Otherwise, the capacitive sensing component could become a 'starved thread' that isn't responsive or reliable enough to be product-ready. Current consumption is another aspect of resource sharing that must be taken into consideration. MCUs chosen to perform many tasks are often relatively power-hungry. Without careful tuning of capacitive sensing sample time, such an MCU could be forced into a higher power state for a percentage of time that blows through a product's current budget.
Option B: Fixed-Function Solution
Fixed-function capacitive solutions eliminate the challenges presented by the integrated approach. This option frees them from the low-level coding concerns of touch qualification and nuanced state maintenance. It also gives them more development cycles to hone the product features and optimize other system-level concerns. Because all of the touch qualification and interference filtering techniques are baked into the fixed function device, developers avoid costly firmware development. Instead of managing all the close-to-the-metal details of conversion and processing, the developer will be presented with an interface that is geared toward providing information as concisely and promptly as possible. A fixed-function device requires that a host MCU be present in a system, monitoring the device for capacitive sensing events and other responsibilities. At first glance, this might seem to present a current draw issue compared to a solution using the integrated approach. However, because these devices are optimized to perform a narrowly defined task, they use minimal current draw. Simultaneously, these devices are usually designed to signal a host MCU in an event-driven manner, meaning they don't require constant polling from a host. This use-model enables a host MCU to remain in its lowest power state for a higher percentage of time while monitoring the fixed-function, signaling pin as a wake-up source. In these use cases, a two-chip solution results in lower system current draw. The larger chip remains in deep sleep mode while the smaller, more current-conscientious chip efficiently scans capacitive sensing inputs.
Real World Example: Remote Control
Either approach often works. However, developers should examine how consumers will use their product to determine which option is best. For example, let’s look at remote control devices, which are increasingly using capacitive sensing surfaces for user input. In its simplest form, a remote control only has a few components: a user input system, IR transmitter circuit, and an MCU to control the system. Because the product requirements are not resource-intensive, an integrated approach might seem ideal to help eliminate the resource-sharing challenges between the capacitive sensing and the IR output components. A closer examination of this use case reveals how a fixed-function device may lead to a more optimized, energy-efficient system.
Because all remote control behavior begins with user input - specifically a user pressing one of the buttons on the remote - the MCU controlling other components of the system (i.e., IR output) can be placed in a deep sleep to minimize current draw and increase battery life. Also, because the system requirements of the MCU are likely not stringent in this type of application, using an optimized, fixed-function solution means that the controlling MCU needs fewer port pins to operate, because it will not need to sense each input on its own. A lower pin count MCU is likely a lower-cost MCU, potentially enabling a developer to design in an MCU that is 'just good enough' rather than a chip that is more functionally dense and geared toward 'system on a chip'-style use.
Solution to Capacitive Sensing Design Challenges
Let’s continue to focus on the remote control example. While capacitive sensing poses some challenges throughout the entire development cycle of this application, most issues occur because of decisions made during the proof-of-concept stage.
Here are the top four early-stage design challenges:
1. Rely heavily on sample code. Vendors frequently provide capacitive sensing-enabled code examples that run well in demo environments and during proofs-of-concept. However, when dropped into product firmware, the sample code lacks production-ready features. This misstep slows progress and creates panicked and expensive revisions, incorporating sub-optimal hacks to get the device released on time.
2. Test too late. One rule of thumb is that a design never works better than it does when it’s on the developer’s desk. In many ways, a workstation can be an ideal environment for capacitive sensing because so many environmental variables are carefully controlled. Stress testing later in development often reveals susceptibility to interference, which can be an insidious problem and hard to characterize.
3. Turn sensitivity and robustness firmware to the max. In many cases, developers begin work on an isolated system such as a vendor evaluation board. A tendency to ‘turn every knob’ toward sensitivity and robustness in early firmware without noticing that in almost every case improving those metrics comes at the cost of increased current draw and sensing time.
As with most analog measurements, capacitive-sensing touch qualification benefits from sampling more data, more frequently. Unfortunately, sampling at higher frequencies tends to put capacitive sensors into states where current draw is relatively high. Additionally, turning robustness-related features to their maximum can cause touch qualification response time to decrease. The impact of this decreased responsiveness is not fully apparent at first because the system in the proof-of-concept stage might still be responsible for only monitoring for touches. In later-stage development when the microcontroller (MCU) cycles are shared between capacitive sensing and other responsibilities, the decreased responsiveness can be exacerbated.
4. Experience sensor design complexity. Sensor design challenges cause multiple prototype builds and schedule delays. The shape of a capacitive sense electrode and its proximity to ground pour on a PCB or other board components can lead to interference problems and other issues. Because in many cases the developer's first tests of a capacitive sensing solution are designed on vendor evaluation boards, they are unencumbered by design constraints of a developer's final product. When the solution moves to a board with a different layout, sensing performance may degrade. Silicon Labs created an end-to-end fixed-function capacitive sensing solution that helps eliminate these challenges and provides the following:
- Reliable touch qualification
- Best-in-class current consumption
- Easy configuration through sophisticated software tools
Our CPT007 and CPT112S fixed-function devices give developers a streamlined path toward adding button and slider capacitive inputs to a design. If a developer chooses a Silicon Labs CPT device, they can enter the proof-of-concept phase using the evaluation kits. These kits have sensor designs onboard that simulate buttons in the final product. Additionally, the CPT device interface can be wired to a host MCU, while the CPT device's configuration and data interface can connect to Simplicity Studio, an integrated software development environment. This software includes specialized items, including the following:
- XPress Configurator: easily configure characteristics of each sensor
- Capacitive Sense Profiler: properly examine real-time capacitive output
After developers design a prototype board, they can use Simplicity Studio to optimize and improve a CPT device in-system through a two-wire interface that can be routed to pads or vias on the prototype board. This feature helps developers overcome challenges that occur when first moving a system away from 'optimal' proof-of-concept designs using vendor evaluation boards. Developers can prototype a product's enclosure and different types of overlays without losing critical visibility into how each design choice effects capacitive sensing performance. Furthermore, our documentation guiding sensor design ensures that a developer designs a board that performs optimally, even in a tightly integrated system.
Focusing on the minutia of a product's capacitive sensing feature is a waste of time. The more effort poured into tweaking firmware or spinning new boards to avoid crippling interference coupling, the less time you can devote to making innovative products. The Silicon Labs CPT sensing devices offer a combination of robust hardware and supporting software that can help you overcome the many pitfalls of capacitive sensing design, clearing a path for product design creativity.