Arduino - TTP223B - CAPACITIVE TOUCH SENSOR SWITCH

12,731

14

5

Posted in TechnologyArduino

Introduction: Arduino - TTP223B - CAPACITIVE TOUCH SENSOR SWITCH

About: Hello world! I make simple & Advanced projects for people who want to learn programming and electronics. Most of my Instructables are about arduino and the wide range of sensors you can use with it. I ma...

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

Share

    Recommendations

    • Spotless Contest

      Spotless Contest
    • Microcontroller Contest

      Microcontroller Contest
    • Space Challenge

      Space Challenge
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    5 Comments

    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 ?

    1 reply

    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;

    }