Example controller touch sensing circuit
The Example Controller is an ideal circuit implemented in SPICE, used to emulate the role of an actual micro-controller unit (MCU) in capacitive touch sensing applications. It operates by the Charge Transfer capacitive measurement technique, which uses multiple analog switches directly embedded into the GPIO pins of an MCU. An example schematic is presented below:
The user configures the acquisition sequence depending on the application, the number of sensors, and external components (capacitors).
Charge Transfer Acquisition Method
The Charge Transfer method is widely used to estimate the capacitance of a conductor (Cx) in touch sensing applications. First, the conductor is charged to a certain voltage (VDD), and then the charge is transferred to a sampling capacitor (Cs). The charge transfer cycle is repeated N times (counts) until the voltage on the sampling capacitor reaches a threshold. The number N of transfer cycles required to reach the threshold is representative of the quantity Cx.
Controller parameters and acquisition sequence
Clock frequency and divider
A hardware clock embedded in the MCU controls the frequency rate of the charge transfer cycle. This clock operates in a predetermined base frequency (FREQ_CLK). A clock divider may be used to further divide the base frequency by a ratio equal to the DIV parameter. An abstract plot of the charge transfer cycle is presented below:
In the charge phase, the S1 switch is closed (S2 is open), and the electrode is charged to VDD voltage. The variable CHARGE_STATE controls the duration of this phase of the method.
In the transfer phase, the S2 switch is closed (S1 is open). The charge stored in the electrode Cx is now transferred to the Cs capacitor. The duration of this phase is determined from the TRANSFER_STATE parameter of the controller.
End of acquisition
Every cycle increases the charge stored in the sampling capacitor, subsequently increasing its voltage level. When the voltage of the Cs reaches a threshold, usually a fraction of the VDD, the acquisition stops. The number of cycles until the end of the acquisition is the counts, and it’s proportional to the size of electrode capacitance.
Touch sensing application
The capacitance of a touch sensing electrode changes whenever a finger or any other conductive object is present in its vicinity (Touch state). As a result, the count measurements between the touch and the no-touch state will be different. This difference is called delta-count. The MCU compares the delta-count with a given threshold and determines if the sensor is touched by a conductive object or not.
In this example, the threshold is set to 100. Therefore, the MCU detects a touch event only in sensors 2 and 4.
TO BE RELEASED SOON