CAPSENSE™ & MagSense Forum Discussions
One of the parameters that engineers have to know in order to properly configure the controller is called Charge Phase. Tuning the Charge Phase parameter can be done in different ways. In this post, we will show how simulation can help identify the Charge Time values of the sensor that are used to properly tune the Charge Phase parameter value.
How a touch system works
Initially, it is important to take a look on how a touch system works. A touch system which in its basic form consists of:
- The touch sensor with two sets of electrodes
- The touch controller (IC)
- The traces
In a touch sensor one set of electrodes may serve as Receivers and the electrodes in the other set may serve as Transmitters. The Traces connect the two sets of electrodes to the controller (IC). A voltage with a specific waveform (usually square wave pulse) is applied to the Transmitting electrodes from the IC and then the voltage response is measured through the Receiving electrodes by the Measurement Circuit inside the IC. This method is called Charge-Transfer modulation and it is one of the most used methods of measuring changes in the capacitance of a touch sensor.
To get into more detail, this method works by charging a large sampling capacitor (Cs) in several steps using the charge that is stored in the sensor capacitances as well. The sensor capacitors are smaller and will be charged much quicker than the sampling one. Sensor capacitors will, then, be discharged to the sampling capacitor. This process is performed many times until the sampling capacitor also reaches a charged threshold.
The time needed for the voltage response of the Receivers to reach the steady state approximately 90% of Vout is called Charge Time (tc). The period that a charge is applied to the sensor is called Charge Phase (Cph), followed by the Transfer Phase (Tph) which is the period of the discharge to the large capacitor (Cs). Charge Time values are defined in the nodes of the Receiver and Transmitter electrodes of the sensor. For example, in a touch sensor that uses 20 Receivers and 30 Transmitters, the sensor will have 600 individual Charge Time values. By identifying the Charge Time values of the sensor, the engineer will be able to determine the proper Charge Phase input value in the IC firmware, as well as, to understand potential mistakes in the design of the touch sensor.
How to tune Charge Phase in touch sensing
In practice, engineers choose two ways of tuning the Charge Phases of a touch sensor:
The first way is the firmware-tuning way, in which the engineer configures the duration of the Charge Phases through firmware and then measures if the sensor(s) is fully charged and discharged. If the measured voltage reaches the desired voltage, then the charge transfer is ideal and it works. If the measured voltage does not reach the desired voltage, the charge transfer is non-ideal and the Charge Transfer period needs to be adjusted, potentially together with other parameters as well. Although the above process is considered a trusted way for engineers to configure the controller, it creates a lengthy procedure with multiple lab measurements that might result in configuring the controller in a functional but sub-optimal way.
The second way is the simulation way, where the engineers identify the Charge Time values of the touch sensor by simulating the operational parameters of a touch system that determine its performance. Knowing the Charge Time values, it will allow the engineer to determine the Charge Phase parameter in controller's firmware. Below we will explain the process for .
You can read more about how to identify Charge Time in a touch sensor using simulation HERE.Show Less
The process of designing and validating a touch sensor depends on the level of experience and expertise of the designer. However, no matter the case, a design begins from the high level (system-level) product specifications of the touch sensor. Those specifications describe the desired outcome and what is expected from the touch sensor when it is ready for production. For example, a product specification table of mutual and self-capacitive touch sensors is shown in Figure below.
In this figure we can see that the capacitance touch sensor is expected to have a response time of 30ms, to be able to support 2 concurrent touches with a minimum diameter of 7mm and many more. Other high level specs can be the size of the screen, restrictions on the controller and material choices, the thickness of the protective cover lens and many others.
Once the specifications are clearly defined, the designer can depict them in an equivalent circuit, or a Target Schematic, which ideally transforms those specifications into the electrical circuit of the product.
Finally, when the target schematic is ready, the designer is ready to produce the sensor, that is the sensor layout. The physical layout should incorporate all the product specifications and remain consistent with the target schematic in terms of the typical requirements that the product definition describes. For example, you cannot have a target schematic for a 5 inch touchscreen, but design a 5.5 inch Sensor Layout, because that better sensitivity, cheaper materials etc.
The most common practice of doing so is to design the layout by following generic or specific guidelines and experience. There is a very large list of guidelines for the design of a capacitive touch sensor. For example, in order to design a typical touchscreen using the common diamond double layer pattern, we learn that there is a typical row/column pitch, a typical XY separation, but also minimum and maximum values that should be considered:
The next step is the product validation. The sensor layout is going to be compared against the product specifications. This can be done by performing a series of measurements and tests on the actual prototype model or by building a virtual prototype and test it against the target through a round of simulations.
Touch detection in a capacitive touch sensing system
Before diving into the basic principles of each technology, we need to say a few words about how a touch event is actually detected in a capacitive touch sensor system.
The electrodes of the sensor, regardless of the technology, are connected through wiring (usually called “traces”, “routing” or “tracking”) to the controller of the system. Being the “brains” of the whole system, the controller uses an Analog-to-Digital converter (ADC) and its firmware to detect a change in the sensor’s state. Since we are talking about touch sensors, this change is most likely caused by a touch event. The controller’s firmware is also responsible for the action that the touch event triggers (for example communicating with the CPU to start an application). To sum up, a change in capacitance (physics) is translated into a change of a digital signal (controller), which ends up in the user interface display (user experience).
Figure 1. Capacitive touch detection principle.
Self-capacitive touch sensors principle
There are two main types of capacitive touch sensor technology; self-capacitive and mutual-capacitive sensors. A self-capacitive system measures changes in capacitance with respect to earth ground. Considering a parallel-plate model, the electrode forms one plate of a capacitor, with the other plate being either ground or the user’s finger. A touch causes the electrode capacitance to increase, as the human body “adds” capacitance to that of the system.
Self-capacitive measurement employs a single electrode and measures the change in capacitance with respect to ground caused by a typical user’s touch; the finger results in a higher capacitance compared to the baseline measured value . Any parasitic capacitances to ground in the system should be minimized, as they reduce the effect of the user touch and make the touch detection harder.
Self-capacitive electrodes project Electric field lines in all directions as shown in the picture above, so interaction can occur on both sides of the electrode. Ground or driven (active) shielding is often added to limit sensitivity to only the desired direction. The following animation shows the change of the self-capacitance of a touch button with respect to finger’s distance.
Mutual-capacitive touch sensors principle
Mutual-capacitive systems also measure a change in capacitance. In contrast to the single electrode design discussed earlier, this approach uses two electrodes that together represent the two plates of the capacitor. The user’s finger modifies the field between the two electrodes and reduces the capacitive coupling between the electrodes. To make things simpler, the human body now “steals” mutual-capacitance from the system of these two electrodes, thus reducing it.
You can read and learn more about the operational principles and types of capacitive touch sensors hereShow Less
Toggles, push buttons, sliders, rotary & rocker switches and their capacitive touch equivalents.
But how can you start designing capacitive touch switches? Get our free technical guide: From switches to touch controls here.
We'll draw and simulate three button designs: with 1, 2 and 4 mm clearance respectively. The PCB footprint stays the same in each case, but the
area the buttons take up changes.
In this case, the design guideline has a severe effect on the performance.
As far as the capacitance is concerned, all the designs could work, even the one with the 4 mm clearance that is outside the recommendations.
But, choosing the design with 1 mm clearance would limit us to a 1 mm cover glass, that would make the design too fragile and the design with the 4 mm clearance creates empty spaces, where touch will not be detected.
So, we select the design with 2 mm clearance as the basis for further optimization. You can read and get our free technical guide: From switches to touch controls here.Show Less
Capacitive sensing can be overwhelming for a newcomer. The nature of the underlying electromagnetic phenomena is complex. That’s why many newcomers tend to cut corners. They tend to skip the part of understanding the physics involved and jump head-first to projects. Naturally, they soon feel lost and resort to trial and error.
This chapter contains all the knowledge we wish we had when we first started working on capacitive sensing. It will teach you the basics of electrostatics, conductors, and capacitance tailored to the need of a capacitive touch sensor designer.
Then you’ll familiarize yourself with one of the most useful concepts in capacitive sensing: the fundamental case of the parallel plate capacitor. Understanding this case can help you unlock the mysteries of capacitive sensing!
Finally, you’ll get an intuitive understanding of how certain parameters, like electrode geometry, dielectrics, and traces affects the performance of a capacitive touch sensor.
Thanks to Benjamin Franklin’s pioneering experiments, that took place almost three centuries ago, almost everyone knows today that electric charges can travel through materials causing flow of electric current.
The tendency of a material to allow the flow of electric current through its body is described by conductivity, σ. On the contrary, the difficulty that a material poses to electric charge conduction can be quantified by resistivity, ρ.
You can read and learn more about the fundamentals of electrostatics & capacitance for capacitive touch sensors here.
Rotary Encoders are another use case for inductive sensing. This section discusses the design of inductive rotary encoder. The construction of rotary encoder involves two sensor coils and N number of targets placed on the rotating platform as shown in the figure below.
Construction of Inductive Rotary Encoder
The number of targets (N) decides the angular resolution as shown in:
Angular resolution = 360/(N*4)
The sensor coils need to be separated at an angle twice the angular resolution. For example, if the number of targets N = 8, then the achievable angular resolution is 11.25° and the required spacing between sensor coils is 22.5°. The direction of rotation can be determined using the previous value of coil ‘A’ and the current value of coil ‘B’ as shown in Table 2. If the current value of coil ‘B’ and previous value of coil ‘A’ are same, it means the direction of rotation is anti-clockwise direction; if the values are different, then is the direction of rotation is clockwise.
Direction of Rotation
To find out more on MoT designs, please see the Inductive Sensing Design Guide.
Metal over Touch (MoT) involves detecting the deflection of a metal overlay upon a touch. MoT uses a metal overlay separated from the sensor using a thin spacer or etched surfaces of metal overlay as shown in the figure below. When you touch the metal, the metal deflects. This deflection is detected by the inductive sensor. An example of front and back (with etched cavities) of a metal overlay is also shown below. The sensitivity of touch detection depends on the following parameters.
- Amount of metal deflection
- Sensor dimensions
- Spacer thickness or depth of etched cavity
- Applied force
Note that the amount of metal deflection for the applied force depends on metal material, thickness, and flexural rigidity.
Metal over Touch Arrangement
Example Metal Overlay
To find out more on MoT designs, please see the Inductive Sensing Design Guide.Show Less
Liquid-Level Sensing (LLS) detects the presence and level of liquid in a container without any physical contact. There are various types of liquid-level sensors such as capacitive, mechanical float, inductive, magnetic, Hall effect, optical, acoustic density, and ultrasonic; each has advantages and disadvantages. Capacitive liquid-level sensing has become popular due to its low cost, high reliability, low power, sleek aesthetics, and seamless integration with existing control architectures.
Cypress’s PSoC MCUs support liquid-level sensing with resolution down to 1 mm. Capacitive liquid-level sensing is provided through the use of the CapSense Component available in the free PSoC Creator™ Integrated Development Environment (IDE). The CapSense Component configures the on-chip CapSense peripheral hardware and provides required firmware for operation on PSoC MCUs. The following key liquid-level sensing benefits are provided using CapSense:
- Non-contact measurement avoids contamination and cleaning problems.
- Sensors located on the exterior of a non-conductive liquid container simplify industrial design and improve product user experience.
- Optimized resolution and accuracy to support varying price points with a single, low-cost, base system
- Sensors may be constructed out of low-cost materials such as plastic substrates and conductive ink.
A capacitive LLS system comprises of two key design elements:
- Capacitive sensor pattern to sense the liquid level
- PSoC MCU with CapSense Component to measure the sensors and calculate the liquid level
Cypress provides the CY8CKIT-022 Liquid-Level Sensing Shield Kit, which shows the simplicity of a PSoC MCU based LLS design.
Liquid-Level Sensing Block Diagram with PSoC 4 MCUs
We recommend that a later generation PSoC MCUs, such as PSoC 4 and PSoC 6 be used for optimal LLS performance. Development kits for PSoC 4 and PSoC 6 MCUs can be found here.
Capacitive liquid-level sensors are conductive pads or traces laid on a non-conductive material such as a PCB, plastic, or glass. The intrinsic capacitance of the PSB trace, pads, and other sensor connections is called the sensor parasitic (CP). when a target object such as water approaches the sensor, a small amount of liquid capacitance (CL) is added to the CP. LLS involves measuring the increased capacitance when a liquid is near the sensor.
Capacitance and Electric Field of a Capacitive LLS Added Capacitance (CL) when Liquid Approaches a Capacitive Sensor
The CapSense Component measures the capacitance by injecting a current into the sensor with a current Digital to Analog Converter (IDAC). A timer measures how long it takes the IDAC to charge the sensor’s voltage to a reference voltage using a comparator. When the conversion is complete, the timer count value that measured the IDAC charge time is used as the raw sensor value used in calculations and is commonly referred to as the sensor count.
CapSense capacitive-sensing also provides capacitive proximity detection. Proximity sensors detect the presence of a conductive object (such as a hand) in a three-dimensional space around the sensor. However, the actual output of the proximity sensor is an ON/OFF event, similar to a button. Proximity sensing can detect an object at a distance of several centimeters to tens of centimeters depending on the sensor design. This is also a good replacement for IR sensors and other proximity sensors out in the world today.
Proximity sensing requires electric fields that are projected to much larger distances than buttons and sliders. This requires a large sensor area. However, a large sensor area also results in large parasitic capacitances, Cp, and detection becomes more difficult. This requires a sensor with high electric field strength at large distances while also having a small area. Recommendations are to use a trace with a thickness of 2-3mm surrounding the other sensors.
To find out more, please check the PSoC 4 and PSoC 6 MCU CapSense Design Guide.Show Less
Capactive-sensing is used in a variety of applications such as home appliances, automotive, and industrial applications. These applications require robust capacitive-sensing even in the presence of mist, moisture, water, ice, and humidity changes. In a capacitive-sensing design, false touches or proximity detection can happen due to the presence of a film of liquid or liquid droplets on the sensor surface, due to the conductive nature of some liquids. Cypress' CapSense capacitive-sensing provides liquid tolerant features for capacitive sensors. When a liquid is on the sensor, CapSense can identify the capacitive characteristics of a liquid vs. finger and reject false events in wet conditions, delivering a robust, intelligent, and easy-to-use method to get a capacitive-sensing design to production.
Liquid-Tolerant CapSense-Based Touch UI in a Washing Machine
To compensate for changes in the capacitive signal due to mist, moisture, and humidity changes, CapSense continuously adjusts the baseline signal of the sensor to prevent false events. To compensate for the changes in the signal due to wet conditions, a Shield Electrode and Guard Sensor should be implemented to provide robust touch sensing.
Shield Electrode (SH) and Guard Sensor (GUARD) Connected to CapSense Controller
To find out more, please check the PSoC 4 and PSoC 6 MCU CapSense Design Guide.Show Less