Home      Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science

13 January 2011
Author: Giorgos Lazaridis
DIY Resistance Touch Button

A typical 12V resistance touch sensor driving a 12V relay

A few days ago, i uploaded a theory page explaining how the touch sensors work. I presented different ways of touch sensing techniques, and i promised that i will post a circuit with many variations for each method. Well, here i begin with the first method, the resistance touch sensor.

Resistance Touch Momentary Button circuit

Here is the very simple and reliable resistance touch sensor schematic:

R1 is a simple protective resistor. On pins E1 and E2, the two electrodes are connected to perform the touch plates. T1 is a transistor amplifier. I choose to use a darlington pair transistor, because i want to have enough current amplification to drive loads such as a relay, even if your skin is completely dry. You could use a simple transistor as well if you plan to drive simple LEDs or other low current loads. The next transistor is a power switching transistor, able to deliver enough current for the relay. A capacitor is connected to its base, to eliminate bounces or other parasitic noise. It causes a slight ON-OFF delay, but it is extremely fast to notice.

The load is connected to pins L1 (positive) and L2 (ground). The current must be taken into account when connecting the load. 2N2222 can handle up to 800mA. Should you need more current, consider another transistor instead. R3 is a protective resistor for the T2. It should be selected according to the load.

 In quiescence With the electrodes touchesd

In case that you want to control high current loads, you can use a relay. In that case, R3 can be totally omitted:

Do not forget the flyback diode! The diode must be connected parallel to the relay's coil, with reverse polarity. I have test the circuit with 5 and 12 volts, and works with no component change. Make sure that the relay has the same voltage for the coil as your power supply.

 In quiescence The LEDs are switched through the 12v relay

Bill Of Materials
 Resistors R1 Resistor 330 Ohm 1/4 Watt 5% Carbon Film R2 Resistor 1 KOhm 1/4 Watt 5% Carbon Film R3 Selected according to your load Capacitors C1 Ceramic Capacitor 0.1 uF 50 Volts Transistors T1 BC517 NPN Darlington Transistor T2 2N2222 Switching NPN Transistor Semiconductors D1 1N4004 General Purpose Diode Rectifier

Resistance Toggle Touch Switch circuit

Things are getting a little bit more stiffer here. The previous circuits act as pushbuttons. As long as the two electrodes are touched, the load is actuated. When released, the load is deactivated. To make a toggle switch, i added a D-Flip Flop, more specifically i added the CD4013 CMOS chip that i had in stock. It has two Flip-Flop modules. I will use one of them as an one-shot debouncer, and the other will be connected as a toggle Flip-Flop to drive the output. Here is the schematic: (click to enlarge)

So, E1 and E2 are the two electrodes, then comes the darlington pair amplifier to sense the touch. The next transistor is to provide enough current to drive both the Set input of the Flip Flop (B), and to load the capacitor C2. This capacitor is a large electrolytic, and this is the one that will generate the one-shot delay. When it is charged, it will hold the Set input HIGH, even if the electrodes are not touched any more. It will then slowly discharge through the parallel large discharging resistor R5. Changing this capacitor will result into more (if more capacitance) or less (if less capacitance) time interval of the one-shot action.

The output of the first Flip-Flop is then driven to the second Flip-Flop, which is connected as a toggle switch. This is done by driving the S and R inputs LOW, and giving a negative feedback to the D input. On each pulse of the Clock input (which comes from the first F-F), the output state is changed.

Finally, we only have to add a large resistor and connect an output transistor to the F-F. This resistor must be big enough to kinda separate the transistor from the feedback of the F-F, but not that large, because the transistor may not provide enough current for the load. If you need more, add a second amplification stage. The final transistor can be of any type, but i used the 2N2222 to drive high-current loads like a relay. Similarly as before, in case that you drive a relay, the R8 can be totally omitted. The load is connected to pins L1 (+) and L2 (Gnd).

 Toggled ON Toggled OFF

Bill Of Materials
 Resistors R1 Resistor 330 Ohm 1/4 Watt 5% Carbon Film R2 Resistor 1 KOhm 1/4 Watt 5% Carbon Film R3 Resistor 330 Ohm 1/4 Watt 5% Carbon Film R4 Resistor 100 KOhm 1/4 Watt 5% Carbon Film R5 Resistor 220 KOhm 1/4 Watt 5% Carbon Film R6 Resistor 1 KOhm 1/4 Watt 5% Carbon Film R7 Resistor 22 KOhm 1/4 Watt 5% Carbon Film Capacitors C1 Ceramic Capacitor 0.1 uF 50 Volts C2 Electrolytic Capacitor 4.7 uF 50 Volts C3 Electrolytic Capacitor 10 uF 50 Volts Transistors T1 BC517 NPN Darlington Transistor T2 BC338 NPN Silicon AF Transistors T3 2N2222 Switching NPN Transistor Integrated Circuits IC1 CD 4013 Dual D-Type Flip-Flop