Touch Sensor

Tips, Tricks and methods for programming, learn ways of making your programming life easier, and share your knowledge with others.

Moderators: Benj, Mods

Post Reply
User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Touch Sensor

Post by JohnCrow »

Touch Sensor

Introduction:

I recently spotted this simple touch sensor on a component site. They are only £6.00 with free postage.
Having my love of playing with sensors, a couple were ordered to play with.
This is my first test project using them.

This project is a simple demonstration using the Adafruit 1374 Touch Switch Board.
The sensor consists of a small PCB (about the size of a UK postage stamp).
It uses the Atmel AT42QT1010 device and a few discreet SMD components.

Only connections required are 5V, GND and output.
When the board is touched, the output goes high. A SMD led on the board is turned on for the duration of the touch.
The device can work with a VCC of 1.8V to 5.5V

The SIL Header needs to be soldered to the board, but apart from that its supplied complete and ready to go.

Hardware:

EB006 Programmer with 16F877A PIC
EB005 LCD E-Block – Port C
EB004 LED E-block – Port D
EB016 Proto-Board – Port A

This uses 2 touch sensors, connected to Port A bits 0 & 1

Flowchart:

The flowchart is very simple and needs little explanation.

Bits 0 and 1 are read, and when the bit is high, the sensor has been touched.
The corresponding LED on port D is turned on and the message on the LCD changed to Touched.
(Top line is Ch 0 and second line is Ch 1).
When the touch is released, the LED is turned off and the message on the LCD changed to No Touch.
The program just keeps running round the loop until the power is removed.

Expansion Possibilities :

Instead of using the touch area on the sensor, a wire can be run to position the touch area in another location.

Also if it is needed to run the device in a lower power mode a jumper can be cut on the back of the PCB, though this does reduce the sensitivity.
Sensors.jpg
Sensors.jpg (102.75 KiB) Viewed 5798 times
Sensors On Protoboard
Back.jpg
Back.jpg (73.3 KiB) Viewed 5798 times
Back View Of Sensor
Touch Switch 2 Channel V1.fcfx
(10.31 KiB) Downloaded 567 times
1 in 10 people understand binary, the other one doesn't !

Post Reply