This guide assumes you have basic knowledge of capacitive sensing and you are familiar with the SENSE environment. If you feel that you are missing any of the necessary concepts or you are a new SENSE user, you may want to read the following articles that will help you get started:


Most usually touch buttons are created on printed electronics, which can be either the traditional PCBs or the most recently introduced flexible electronics. In PCBs the conductive parts forming the buttons and their traces/tracking are encapsulated within dielectric layers of FR-4. In modern printed electronics conductive inks, usually solutions based on silver, are used to print the conductive parts that are placed on top of a flexible substrate, like PET.

In order to design a capacitive touch button that works you need the combined expertise on two domains: circuit design and electrostatics. Circuit design skills are necessary for you to prepare the schematic and the electrical network of the touch sensor. The electrical network consists of  actual electrical components, like resistors, capacitors, and coils, but it also must take into consideration the resistances and capacitances that are not actual components but do exist inherently in the electrical network and their values depend on the specific geometry and materials of your touch sensor. Those resistances and capacitances cannot be easily estimated still in the design phase, unless you use any electrostatic simulation software In addition, in order for you to be able to achieve some specific target values for them by changing the geometry and materials, without betting on pure luck :) , you need at least some fundamental knowledge on electrostatics.

However, you can also do the job without having to go back to university to acquire those skills and knowledge. SENSE is here to help you design capacitive touch sensors that work and evaluate them even from early design stages. Controllers measure the touch effect through the variation in Counts which are unitless. In general, counts depend on the methodology that each controller follows and also its specific settings. So, in order to virtually test if a combination of a touch sensor with a specific controller will finally work, we need to run a Counts Analysis, which is a SPICE simulation that takes into account the equivalent circuit of the touch sensor and also the circuitry of the controller including the resistances and capacitances that are connected to controller pins. Let me show you how you can do this by using as an example the self-capacitive touch button we created before and following these steps:

  1. Run an Equivalent Circuit Analysis which will give us two netlists that represent  in a text file format the equivalent circuits of the touch sensor with and without a touching pointer. 
  2. Select a Controller from the library to be connected with our touch sensor.
  3. Combine your Sensor with the Controller and set up the System Configuration.
  4. Run a Counts Analysis
  5. Results will show us if the touch button works or not. If not, we will need to redesign it and go back to step #1. This way we can try a revised design faster, without having to manufacture any new prototypes.

1. Run Equivalent Circuit Analysis

The process on how to set up the Layout and Stackup and Pointer is described in detail in the article about touch sensitivity of a self-capacitive touch button, so here we continue with the next step, that is Analysis -> Create a New Analysis -> Equivalent Circuit Analysis:

Fig. 1. The screen of SENSE where we select Equivalent Circuit Analysis.

Firstly we select the terminals, which represent the electrical connections between the sensor and the Controller (MCU). A voltage terminal (or “source”) acts as an input for the electrical signal, so it belongs to the transmitting electrode, whereas the GND terminals act as outputs and belong to the receiving electrodes.

Fig. 2. Voltage and GND Terminal selection for this example.

In the next step, we select the pointer and its placement as was created before and described in detail here. Then we select the resources to be used for this Analysis; 8 cores and 16 GB of memory are enough to get results in about 70 minutes. In case you want a faster option, you may enable the “Advanced Options” here and select the “High Speed” option. Finally, we take a last look just to confirm that all settings are ok and click “Run Analysis”. If you like, you can read in detail about how to run an Equivalent Circuit Analysis.

Once the Analysis is completed, we see two netlist files in the Results tab of the Analysis. We click on “Create Touch Sensor” in order to import these files directly in the Sensor tab of the System menu. After a few seconds, we are automatically redirected into the Sensor tab, where these two files are loaded. By clicking on the Sensor tab on the left, you see the Sensor file created and you can rename it.

💡 In case you want to check the performance of a touch sensor with different pointers and placements, you can do this by running a separate Equivalent Circuit Analysis for each different pointer set up. In this way you will see multiple sensor files listed in the Sensor tab.

2. Controller Selection

Our sensor, represented as a circuit, is ready, but we definitely need a controller to be virtually connected with the sensor, so that we will be able to check if this combination will finally work or not. In the Controller tab of the System menu we click on “Create a new Controller” in order to select a controller from the library and define its parameters. For this example we select the STM32F091 model. Once the new controller is created, its parameters are displayed; for this example we proceed with the default values. In case you need to know more about these parameters and how they affect the results you may read this short article or the detailed datasheet of this controller. In the tab “Pins” you can see the type of each controller pin, how they are grouped in banks and how they correspond to IBIS pins.

💡 If you want to check how the sensor performs with different controller parameters, it is recommended to create multiple Controllers here, each one having different values for some parameters.

💡 We recommend you to start with the defaults parameters of the controller. Afterwards, in case you wish to improve the performance of your touch panel, you could try changing some parameters and see how results change. In order to have better control and understanding of the results, it is recommended to change only one or two parameters at a time.

3. Set up the System Configuration

Now we have already set up the sensor and the controller, so we just need to connect them before we test if this combination works. This connection is done through the “System Configuration” tab of the System menu. Here we create a New System Configuration and as a first step we choose the Controller and the Sensor that we want to connect.

💡 In case we need to check how our sensor works with multiple controllers or with different parameters of a specific controller, we should have created multiple controllers in the “Controllers” tab.

Next step is to set up the Connectivity Interface through the next tab on top. Here through this table we correspond each controller pin to the specific terminals of the touch sensor, as they were previously defined in the Equivalent Circuit Analysis (Fig. 2). For the present case, we choose to connect the voltage terminal (the edge of the trace shown in the left part of Fig.2) with the controller pin G1_IO2, so in the column “Connection” of this row we keep the default selection “Touch Sensor”. In the same row for the sensor pin we choose “Source 1”, this is the voltage terminal. We keep the default selection of the resistance value (10 kΩ) to be placed between the controller pin and this point of the sensor. 

Since there is no other voltage terminal to be connected to the controller pins, we select “Floating” for the rest of the pins, namely G1_IO4, G2_IO2, G3_IO3, G3_IO4, G4_IO2, and G6_IO2. The GND terminal of the touch sensor (right part of Fig.2) is connected to the Vss pin, which is grounded; to do this we check the “Sink 1” option in the last row of this table. About the rest values of this table, we keep the default options for the other pins, like the voltage source, Vdd, shown in the first row, as well as for the G1_IO1 which is connected to the sampling capacitor (47 nF) of the Group 1.

In the last tab on top (“Pointer”) we choose to enable the Human Body Model (HBM) for the pointer, by using a Resistance of 1500 Ohm in series with a Capacitance of 100 pF.

💡 Enabling the HBM is essential for the accurate simulation of a finger touch, since it assumes that the finger is grounded through a specific RC circuit. If for some special case you want to represent the pointer as an electrically floating conductor, just do not check this checkbox.

You can find a detailed description about how a Sensor interfaces with the Controller.

4. Run Counts Analysis

Once we have set up the System Configuration, we go to the Analysis tab of the System menu to create a New Analysis-> Controller Counts Analysis. 

  • The first step here is to select the System Configuration we just created and a list of Active Banks appears. For the present case, we need to activate only the Bank 2, because the voltage terminal of the sensor is connected to the controller pin G1_IO2 which belongs in Bank 2 (you can check this info going to Controller-> Pins).
  • Second step is related to noise and is optional, so we skip it for this example.
  • In the third step we must select the computed resources to be used for this Counts Analysis. 8 cores and 16 GB of memory are usually enough for this type of Analysis. For this example, we got results in less than 5 minutes.

💡 While the Analysis is running, you can check its progress through the “Progress” tab, where the progress of each separate task is shown.

5. Results

In the Results tab at first we can see the Counts we got for each pointer scenario. In this example Counts are 3092 and 3263 respectively for the case of no pointer and for the case where a pointer touches the center of the button:

Fig. 3. Counts obtained from SENSE for both cases (without and with a pointer).

In order to see if our touch sensor works with this specific controller settings or not, we must evaluate the value of “Delta Counts”, which is the difference in Counts caused by the finger touch. We can select to view this value from the drop-down menu:

Fig. 4. Delta Counts obtained from SENSE for a pointer touching at the center of the button.

This value of Delta Counts (171) means that the touch button we used in this project can work well with the default settings of the STM32F091, since for this controller the acceptable range of Delta Counts is between 100 and 200. Values lower than 100 are unwanted because they would increase the noise effects, whereas values higher than 200 mean that the button would be too sensitive, increasing the danger of possible false touches.

💡 In case you want to change Delta Counts by changing the Layout, you could try for example to change the button's diameter or the length of its trace, as these will directly affect the self-capacitance of the touch button.

Besides Delta Counts, the acquisition time is also an important metric to evaluate the performance of a touch sensor. You can read more here.

Did this answer your question?