Tags: TTP223, Capacitive, Touch, Switch, Button, TOUCH, SENSOR

TTP223 Capacitive Touch Switch Button (TOUCH SENSOR)

  • 10.00 AED
    • Ex Tax:10.00 AED
    • Product Code: TTP223
    • Availability: In Stock
    A capacitive touch sensor module based on the dedicated TTP223 touch sensor IC. The module provides a single integrated touch sensing area of 11 x 10.5mm with a sensor range of ~5mm. An on-board LED will give a visual indication of when the sensor is triggered. When triggered the modules output will..

    A capacitive touch sensor module based on the dedicated TTP223 touch sensor IC. The module provides a single integrated touch sensing area of 11 x 10.5mm with a sensor range of ~5mm. An on-board LED will give a visual indication of when the sensor is triggered. When triggered the modules output will switch from its idle low state to high (default operation). Solder jumpers allow for re configuring its mode of operation to be either active low or toggle output.



    Specification:

    Product Code: HCSENS0039
    Supply Voltage: 2.5 to 5.5V
    Supply current: (Vcc = 5V): 6uA (Idle) 16mA (Active)
    Sensor area: 11 x 10.5mm
    Max sensor range: ~5mm
    Module dimensions: 14.5mm x 11mm


    We need Switch to control electronics or electrical appliances or some thing, Some time electrical switches will give a shock when we use electrical switches with wet hand and then touch to control electrical or electronic load is much interactive than ordinary switches, may be some projects needs touch switch. Here the Digital Capacitive touch sensor arduino interface is made as an experiment.




    Image


    Picture of Pin Definition

    Trigger setting mode: (1 = Short ; 0 = No Short)

    Jumpers AB

    Momentary / High Output 00 (used in this tutorial)

    Self Lock / High Output 01

    Momentary / Low Output 10

    Self Lock / Low Output 11

    Picture of Hardware Connection

    Make the connection as above picture.

    Based on the results,

    1. The LED will turn on when we touch the TTP223 Capacitive Touch Sensor Module.

    2. If no touching detected, the LED will turn off

    Introduction to TTP223 Capacitive touch module for Arduino

    The source code for TTP223 Touch Module for Arduino

    by touching the module, the pin 8 is sending signal to turn the Relay or switch ON

    
     /*
     * This is the Arduino code for  TTP223 Touch module switch
     * by touching the module, the pin 8 is sending signal to turn the Relay or switch ON  
     *  * 
     * Written by Ahmad S. for Robojax.com 
     * Date: April 01, 2017, in Ajax, Ontario, Canada
     * Permission granted to share this code given that this
     * note is kept with the code.
     * Disclaimer: this code is "AS IS" and for educational purpose only.
     * 
     */
    
    int touchPin = 2;// connect output from TTP223 to this
    int val = 0; 
    int relayPin = 8;// Connected to relay
    
    void setup() {
     Serial.begin(9600);
     pinMode(touchPin, INPUT); 
      pinMode(relayPin, OUTPUT);
    
    }
    
    void loop() {
      digitalWrite(relayPin, HIGH);
      val = digitalRead(touchPin); 
      if(val ==1){
      Serial.println("Touched");
      digitalWrite(relayPin, LOW);
      }
      delay(100);
      Serial.println();
    }
       

    The source code for TTP223 Touch Module for Arduino for 2 Touch module

    by touching the module, the pin 8 is sending signal to turn the 2 Relay or 2 switch ON

    
     /*
     * This is the Arduino code for  TTP223 Touch module switch
     * by touching the module, the pin 8 is sending signal to turn the Relay or switch ON  
     *  * 
     * Written by Ahmad S. for Robojax.com 
     * Date: April 01, 2017, in Ajax, Ontario, Canada
     * Permission granted to share this code given that this
     * note is kept with the code.
     * Disclaimer: this code is "AS IS" and for educational purpose only.
     * 
     */
    
     // 1st channel
    int touchPin1 = 2;// connect output from TTP223 to this
    int val = 0; 
    int relayPin = 8;// Connected to relay
    
     // 2nd channel
    int touchPin2 = 3;// connect output from TTP223 to this
    int val2 = 0; 
    int relayPin2 = 9;// Connected to relay
    
    void setup() {
     Serial.begin(9600);
     pinMode(touchPin, INPUT); // input put from touch
     pinMode(relayPin, OUTPUT);// output to relay
     
      pinMode(touchPin2, INPUT); // input put from touch (2)
     pinMode(relayPin2, OUTPUT);// output to relay (2)
    
    }
    
    void loop() {
     // start of channel 1 code 
      digitalWrite(relayPin, HIGH);// set the relay to HIGH (if your relay is lowe-trigger. If not remove this line)
      val = digitalRead(touchPin); // read channel 1 touch module value
      if(val ==1){
      Serial.println("Channel 1 Touched");
      digitalWrite(relayPin, LOW);// turn relay (of switch) 1 ON
      }
      delay(100);
      Serial.println();
       // end of channel 1 code 
      
     // start of channel 2 code   
      digitalWrite(relayPin2, HIGH);// set the relay to HIGH (if your relay is lowe-trigger. If not remove this line)
      val2 = digitalRead(touchPin2); // read channel 2 touch module value
      if(val2 ==1){
      Serial.println("Channel 2 Touched");
      digitalWrite(relayPin2, LOW);// turn relay (of switch) 2 ON
      }
      delay(100);
      Serial.println();
      // end of channel 2 code 
    }