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:
- How to import a .dxf file
- StackUp of Materials
- Pointer Creation
- Pointer Placements
- How to run an Equivalent Circuit Analysis
The voltage changes on a capacitive touch sensor are a good indication of its sensitivity to various triggers, be it a normal touch, a gloved finger or anything else you would like to SENSE for your project. You can evaluate the voltage changes in two ways. If you have the resources for the sensor prototype, usually made by a third-party provider, and for the lab equipment, you can spend some hours in measurements making sure they are repeatable and trustworthy. An easier way is to use a SPICE simulator with which you can virtually and accurately carry out the measurements in seconds. The major challenge related to the second approach is that you cannot easily prepare a circuit equivalent to your touch sensor, which is needed as input in any SPICE tool. This task is quite challenging, since it demands a high expertise and good familiarity with touch sensor technology, electromagnetics, and analog circuit analysis, and also the equivalent circuit itself is usually very complex due to the number of nodes required.
However, this is quite an easy task through SENSE and in this document we will see how you can:
- Extract the sensor equivalent circuit from SENSE
- Import it to a SPICE tool and run an analysis
- Get the voltage output and the difference after the sensor being touched
1. Extracting the equivalent circuit from SENSE
Extracting the equivalent circuit from SENSE
With SENSE you can extract the circuit of your touch sensor in a netlist format (.cir) using the Equivalent Circuit Analysis. You can think of each netlist as a black box representing the touch sensor. This box is connected to anything else outside it with the specific source and sink ports you choose. Usually the sources are the ends of the traces that connect to the MCU and the sinks the ends of the shields. You can, however, choose any other combination, if, for example, you wish to investigate the performance of only a part of your sensor. In general, in order to use a netlist in a SPICE tool, you should define the sources and sinks in the setup of the Equivalent Circuit Analysis as you expect to use them later. In addition, SENSE takes into account any touch event caused by a pointer, by automatically adding in the netlist the corresponding changes of the circuit. This way you will get a different equivalent circuit, therefore also a different netlist, for each different pointer shape and placement simulated. You can then use these different netlists to compare their response and evaluate their performance just as you would do in the lab with an oscilloscope.
In this example, we will use a PCB-based four-buttons board as shown below, where each button is connected with a trace that runs up and down the board through vias. On the top layer around the buttons there is a shielding entity, which serves as a return path for the signal. The first step is to import the design of the sensor in the Layout tab of SENSE, you can read more about this over in the article "How to import a .dxf file". Once the .dxf is imported, the layout will look like this:
Fig. 1. The sensor layout as imported in SENSE.
The next step is to define the stack-up of materials that form the sensor. The screenshot below shows the stack-up used in this example. The Electrodes, Shielding Layer and Traces 2 are placed at the Top Layer (Layer 2) and the Traces 1, connected to the rest of the entities with Vias, run at the Bottom Layer (Layer 4). For the conductive entities of Layers 2 and 4 a sheet resistance of 1 Ohms/sq was selected. You can read more on how to create a stack-up in the article "StackUp of Materials". Finally, in order to simulate the effects of the touch, we should include a Pointer in the model and define where it is going to touch our sensor. Here we used a 10 mm long cylinder with 8 mm diameter centered above the Button #2 (top-left). You can read more about Pointer creation and Placement in the articles "Pointer Creation" and "Pointer Placements".
Fig. 2. The sensor stack-up and materials as created in SENSE.
In the Equivalent Circuit Analysis (more info in "How to run an Equivalent Circuit Analysis") the edges of the traces of the four buttons are selected as sources and the edge of the shield, that covers the area around the buttons, as a sink. We also include the Pointer and Placement as described above in the analysis and select for the resources 16 Cores and 32 GB RAM. With this configuration the analysis will be completed in approximately 6 hours.
Fig. 3. Sensor design during terminal selection for Equivalent Circuit Analysis.
The results of the Equivalent Circuit Analysis are two netlist files (.cir), one for the case without any pointer and one for the case of pointer. In the latter the pointer is represented by a conductor that is electrically floating above the sensor. However, to accurately simulate a finger touch we must include the Human Body Model (HBM) in the circuit by modifying the self capacitance of the pointer (100 pF) and adding in series with this capacitance a resistance to the ground (1.5 kΩ), as shown below.
Fig. 4. Graphical representation of the equivalent circuit of the touch sensor including a pointer. Left: Without Human Body Model (HBM). Right: With Human Body Model.
The original and the modified netlists appear in the image below:
Fig. 5. Netlists of the equivalent circuit of the touch sensor including a pointer.
Left: Without Human Body Model. Right: With Human Body Model.
2. Setting up a SPICE analysis
After downloading the two netlist files from SENSE, we could use any SPICE tool to set up and run a SPICE analysis which will give us the voltage response. We can do this either manually or by using a tool to simplify the process. In this document we focus on the use of LTspice, which is easy to use and well documented. For the SPICE analysis we will need the extracted netlists of the sensor and we will also need to specify the excitation and groundings of the setup to simulate the instruments and setup from the laboratory.
First, we need to convert the downloaded netlist files to something that we can use in the circuit modelling environment of LTspice. This is done by creating a Symbol. A different .cir file represents a different sensor or touch position and should be converted to a separate Symbol. We do that by opening the .cir file and right clicking on the respective line containing the “eq_circ” which is the naming convention SENSE follows. This will create a Symbol with this name in our LTspice library. We repeat this process for the other netlist file that also includes the pointer. It is useful to rename each Symbol accordingly, for example “eq_circ_noPointer” and “eq_circ_fingerAtButton2”, so that we can use more than one circuits in the same schematic for comparison purposes. We do that by simply editing the name of the subcircuit in the .cir file before creating the Symbol, as shown in the image below.
Fig. 6. Creating a Symbol in LTspice from a netlist (.cir) file.
After the Symbols are done, we use them to create a New Schematic (File -> New Schematic). In the Schematic we design the circuit we wish to simulate, select the voltage source and the connectivity of the Symbol as they appear in the figure below. As a voltage source, a square pulse of 5 ns duration was assigned at button #2 represented by the Source2 port and a transient analysis of 10 ns duration was performed. The 5 ns duration is sufficient for the button to fully charge and we allow the same duration for a full discharge cycle, resulting in 10 ns in total (Tperiod). These values depend on the sensor and more or less affect the simulation time. For example, a bigger trace/button would need more time. In any case it is recommended that you start with a pulse duration in the range of 100 ns and modify if needed. Anyway, each run takes only a few seconds. The 1 ps rise and fall times are selected to provide a steep, rectangular pulse. Once we have set up the Schematic, we can start the simulation by clicking Simulate -> Run.
Fig. 7. Parameters of the voltage source used in LTspice.
Fig. 8. Schematic in LTspice including 2 Symbols, with and without a pointer.
3. Getting the voltage outputs and voltage difference
When SPICE simulations are finished, we get the voltage output by clicking on the line of Sink1 (a marker automatically appears when we place the mouse over it). The two different circuits will show the different voltage response when there is no touch and when a finger touches the sensor above Button #2, so that we will be able to get the voltage difference due to the pointer touch.
Fig. 9. Voltage output at Sink1 with and without a pointer, as extracted by LTspice.
We observe that the response of the plain sensor settles at approximately 240 mV and the respective with the touch at 233 mV. The 7 mV change at the steady state is representative of the touch event. The voltage drop from 1 V of the source pulse to the ~240 mV at the output is associated with the resistances and capacitances of this specific sensor example.
In general, voltage difference depends on the sensor design, materials used, and the type of touch (finger, stylus, gloved finger). For example, a thicker cover material would decrease the touch sensitivity. You can simulate different combinations of sensors and/or excitations following the process described above. Finally, using the same analysis you can also evaluate the temporal response of your sensor.