You are on page 1of 4

Touch module

Overview
This lesson will show how use the touch module to control a LED light.

Materials
Arduino Uno x 1
Some DuPont wires
Touch the module x 1

Product Description

The touch module is a capacitive touch switch module based on the touch detection IC (TTP223B). Normally,
the module outputs a low level. When the module is touched with a finger, the module outputs a high level.

You could install the module in non-metallic materials (such as plastic, glass) with the four mounting holes. It is
then covered by a thin piece of non-metallic material. This could be a hidden keys in walls, desktops and other
places. (ensure touch region is correctly located). An advantage of this module is that is simpler than
conventional pressure-type keys.
Technical Parameters
Low power consumption
Power supply for 2 ~ 5.5V DC
Can replace a traditional button.
Four M2 screws positioning holes for easy installation
Size: 2.4 x 2.4 x 0.7cm(LxWxH)

Features
Initial state is low. When it is touched it goes to high. When it is not touched it returns to low (similar to other touch
buttons).
Low power consumption
Power supply can be 2 ~ 5.5V DC
Front and back touch can both be used as a touch surface, and they can replace traditional touch buttons.
4 M2 screw positioning holes make the module install easily and help to locate.
Control Interface: A total of three pins (VCC, GND, SIG): GND is to ground, VCC is for the power supply, SIG is
digital signal output pin.
Touch area: this is icon-like area of the fingerprint, it will be recognize when you touch it with fingers.

Wiring diagram
Arduino Uno <------> Touch module
D3 <------> SIG
5V <------> VCC
GND <------> GND

Sample code
int Led=13;// Define LED interface
int touch=3;//Define the touch module interface
int val;// Digital variables "val"
void setup()
{
pinMode(Led,OUTPUT);// Define the LED for the output interface
pinMode(touch,INPUT);/*Define the touch module for the input interface*/
}
void loop()
{
val=digitalRead(touch);/* Will the value of the digital interface 3 read assigned to val*/
if(val==HIGH)/* When the key switch sensor detection signal, LED light*/
{
digitalWrite(Led,HIGH);
}
else
{
digitalWrite(Led,LOW);
}
}
Results

No touch, the LED lights on the Arduino do not light up.

When touched, the LED light on the Arduino lights up.

You might also like