Arduino - TTP223B - CAPACITIVE TOUCH SENSOR SWITCH

24K157

Intro: Arduino - TTP223B - CAPACITIVE TOUCH SENSOR SWITCH

Hello world! Today i made a code for the ttp223b capacitive touch sensor. A sensor that i am testing for my webshop, and it does its job! So soon i will add it to my webshop at arduinosensors.nl. The code is really easy and can be used with normal buttons to. Follow the next step for the schematic, code & parts list.

STEP 1: Schematic Code & Parts List.

It is very easy, Just wire it up like the schematic and upload the code.

Parts list:

  1. Arduino uno, I used the RobotDyn Uno.
  2. KY-019 Relay
  3. TTP223B Capacitive touch sensor.
  4. Jumper wire set MM/FF/MF
  5. Lamp socket + power cable & light bulb (optional)

Good luck!

Follow me for more!

Check out my website arduinosensors.nl

6 Comments

Where can I find the fzpz file for ttp223b sensor?

Hello vandenbrande !!!!! i made it , thanks to you for the codes and schematic. Now am trying to make a 4 channel touch relay control. Can you help me with the code ?

can the touch sensor work by not installing relay ?

Forgot to push reply button ;D

Works without relay as well.

#define TouchSensor 10 // Pin for capactitive touch sensor

boolean currentState = LOW;

boolean lastState = LOW;

int counter = 0;

void setup() {

Serial.begin(9600);

pinMode(TouchSensor, INPUT);

}

void loop() {

currentState = digitalRead(TouchSensor);

if (currentState == HIGH && lastState == LOW){

counter++;

Serial.print("Button pressed: ");

Serial.print(counter);

Serial.print(" times!");

Serial.println("||");

//delay(1);

}

lastState = currentState;

}