AN-1141 A Two-Button Touch Sensor

This simple, compact, and low cost touch sensor can be used in many devices to detect fingers touching a surface or two-button area.

It operates because the additional capacitance added to the circuit by the fingers changes the frequency of a generator. While capacitance increases, frequency decreases. This change is detected by the GreenPAK™. One SLG46620V is enough to implement two button touch sensors.

ATouch sensor demo board

Figure 1. Touch sensor demo board

Touch sensor circuit design

At the core of this design are two independent generators (one generator per button) which consist of inverters with enables (2L0 and 2L4). Inputs (PIN#3 and PIN#13) and outputs (PIN#8 and PIN#18) are connected with 68K resistors (see Figure 2, Figure 3, Figure 4). Frequency associated with the resistance value is ~550 kHz.

Touch Sensor circuit

Figure 2. Touch Sensor circuit

Touch Sensor design, Matrix0

Figure 3. Touch Sensor design, Matrix0

Touch Sensor design, Matrix1

Figure 4. Touch Sensor design, Matrix1

When we change the resistance, the generator’s frequency will change (the lower the resistance, the higher the frequency). Also, frequency varies because of external factors such as temperature, supply voltage, and normal chip to chip variation. That’s why unidirectional self-tuning circuitry is used.

The characteristics of the design are as follows:

1. One reference generator, which generates pulses with duty cycle very close to 100%.

2. Two more generators for making pulses with the same frequency (synchronized by the falling edge), but with duty cycles that can be changed internally.

3. A tuning process adjusts the duty cycle.

4. To multiply (by 552) the frequency variation caused by touching a button, delay blocks CNT0/DLY0 and CNT1/DLY1 with clock sources (that are generators’ outputs for each button) are used. If the button is touched, the frequency becomes lower and the subsequent delay will be longer. Changing duty cycle of the DLY’s input signal, we can add or subtract additional delay and move the DLY’s output rising edge. This is how the tuning is done.

CNT6/DLY6 is used as a reference delay (DLY). Initialization should be such that the output rising edges of the DLY0 and DLY1 should come earlier than the reference DLY’s. When the circuit detects that the rising edges are not close enough (Pipe Delay0 - Pipe Delay1 OUT1 PD number withing 16 clocks), it generates a pulse which will maintain the appropriate FSM (FSM0, FSM1) for some period of time, decreasing the duty cycle of the reference generator. That adds additional delay for buttons’ delays DLY0 and DLY1, and moves their outputs’ rising edges closer to reference DLY output rising edge. As soon as both buttons’ rising edges are close enough, 3L1 and 3L9 will latch High.

This means that the circuit is now tuned. Wake & sleep will be enabled, respective outputs PIN#10 and PIN#20 will go High, indicating that a button has been touched. Since the generators’ frequency can vary over time and conditions, in some cases the circuit may need to be reset.

The reset functionality is achieved by Pipe Delay0 and Pipe Delay 1 OUT0 outputs. Reset condition should be met 14 times in a row (defined by DLY7 counter data), for the system to get reset. After the reset, 3L1 and 3L9 will go Low and the FSMs will shift phase relatively to the CNT5 reference (which will be 0) as during initialization (see Figure 5).

Touch Sensor states sequence

Figure 5. Touch Sensor states sequence

Also, forced reset will be done when either buttons have been High for 20 sec or more. Reset is shared for both the buttons. As soon as the button is considered touched, it cannot cause system reset.

Wake and Sleep period is 50 ms. It is fast enough to detect touch and slow enough so that the sensor has low power consumption.

Unused PINs are configured as push-pull to be connected to external GND for noise suppression.

Although this design has self tuning capability and is quite stable, there are some considerations:

1) If either button had been touched while device was turning on, the corresponding output will remain Low. The other button should be operational. As soon as the touched button gets released, it too will operate properly.

2) Sensor cannot recognize slow approach (~1s touch).

3) Reset is shared. Both buttons are reset simultaneously.

4) If the first button is touched (first output is High) and the second one needs reset (voltage or temperature changed or because of slow approach), both buttons will be reset and both outputs will go Low.

5) If the VDD is decreasing faster than ~300mV/s, any output (or both of them) may latch High. They will go Low again if VDD returns higher than the VDD at the latching moment.

6) If the button is touched, it cannot be tuned. That's why if both the buttons are touched, the system cannot make the reset. If VDD decreases more than ~200-300mV, one or both outputs may latch High.

7) If the button is touched and the VDD increases more than ~200-300mV, the corresponding output will start blinking and go Low.

8) Touch pad size affects the generator's frequency and power consumption considerably. Additional capacitors can be added for each generator to lower the frequency. However, adding capacitors lowers the touch sensitivity.

9) Resistors' values can be increased to lower the frequency and power consumption. The generator's frequencies should be higher than 550kHz to keep the self-tuning system operational.

10) If the layout of touch pads are too close to each other, touching one can affect the other one. With that, one may observe that both outputs will go High, and the circuit will be reset after ~1s.


Using a single SLG46620V, it is possible to create an almost independent two-button self-tuning touch sensor which can be used in many compact and low cost devices.

About the Author

Name: Yurii Shchebel

Background: Yurii Shchebel graduated from Ivan Franko Lviv National University in 2015, studying at the Department Electronics. Presently he is working with Configurable Mixed Signal ICs (CMICs), creating handmade audio amplifiers, based on ICs, transistors and vacuum tubes.




See full list of Application Notes