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

    • PCB Contest

      PCB Contest
    • First Time Author

      First Time Author
    • Toys Contest

      Toys Contest

    5 Discussions

    0
    None
    MàđhúkêshT

    1 year ago

    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 ?

    0
    None
    MeorF1

    2 years ago

    can the touch sensor work by not installing relay ?

    1 reply
    0
    None
    MarvMMeorF1

    Reply 2 years ago

    Forgot to push reply button ;D

    0
    None
    MarvM

    2 years ago

    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;

    }