Counts is a value used by many in the capacitive touch industry, but understood by few. In this section, we’ll provide an intuitive explanation based upon an example.
As we saw, the value of Counts is proportional to the size of the electrode’s capacitance, Cx. As you recall from the previous chapters, the value of the electrode’s capacitance changes when conductive elements interact with the electrode. As a matter of fact, when this happens, the capacitance of the electrode increases, as does the value of Counts. Controllers leverage this phenomenon to detect the presence of conductive elements in the vicinity of the sensor, using the value of counts.
We define delta-counts as the difference between the touch and the no-touch states. The controller compares delta-counts to a given threshold value to determine if the sensor is touched by a conductive object or not.
Let’s consider a theoretical example of a circuit like the one in Figure one, with six sensors connected to it. Suppose that a conductive object touches sensor 2, another hovers slightly above sensor 4 and another hovers a greater distance above sensor 6. Sensor 1 has no objects in its environment, while sensors 3 and 5 have non-conductive objects in their respective environments, as summarized in Table 1.
Table 1. Placement and type of objects.
Based on what we’ve learned from the previous chapters, we expect the values of the capacitance of the electrodes of the sensors 2,4, and 6 to be much greater than that of the sensors 1,3, and 5. Moreover, we can expect that sensor 2 will feature the largest capacitance, as the conductive material is the closest to the sensor, and that the capacitance of sensor 4 is greater than the capacitance of sensor 6. We can also expect that the capacitances of sensors 1,3, and 5 will be close to zero.
Translating this to delta-counts, we expect that the value of the delta-counts of sensor 2 will be the greatest, and the value of delta-counts of sensor 4 to be greater than that of sensor 6. The values of delta-counts of sensors 1,3, and 5 are expected to be close to zero.
Figure 6 shows what a typical delta-counts diagram would look like in this example for each of the sensors under consideration.
Figure 6. Sampling capacitor voltage over time.
In this example, we considered the threshold to be set to 100. Therefore, the MCU would detect touch events only in sensors 4 and 6. If we wanted the MCU to be able to detect the hovering item in sensor 6, we would have to set a lower threshold level. Conversely, if we wanted the MCU to reject the hovering item in sensor 4, we would have to increase the touch threshold.
Key takeaways from this section: