Capacitive Touch Sensor (TTP223)


We need Switch to control electronics or electrical appliances or something, Sometime 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.


Working Principle:

TTP223B IC based digital capacitive sensors are very affordable and gives good response when we touch it, this sensor breakout can be easily interfaced with any kind of microcontrollers, and contains only three terminals for external interface. The  TTP223  is  a  touch  pad  detector  IC  which  offers  1  touch  key.  The touching detection IC is designed for replacing traditional direct button key with diverse pad size. Capacitive touch allows electronics to sense when your finger is within a few millimeters of a surface to simulate a button “press” just like how the pushbutton works.  Capacitive sensing may be used in any placeTTP223 is 1 Key Touch pad detector IC, and it is suitable to detect capacitive element variations. It consumes very low power and the operating voltage is only between 2.0V~5.5V. The response time max about 60mS at fast mode, 220mS at low power mode @VDD=3V. Sensitivity can adjust by the capacitance (0~50pF) outside


Pin Configuration:

Vcc: 5v


Sig: Digital pin (2 to 13)




Interfacing with Arduino :

Connect Vcc pin of Sensor breakout board to Arduino’s +5V pin and Gnd to Gnd. Connect Signal (SIG) pin to Arduino Digital pin D1 and Upload the following code to get response when you touch the Capacitive sensor.


Arduino Code: 

//Digital Capacitive Touch Sensor Arduino Interfacing


#define sensorPin 1 // capactitive touch sensor – Arduino Digital pin D1


int ledPin = 13; // Output display LED (on board LED) – Arduino Digital pin D13


void setup() {


  pinMode(ledPin, OUTPUT);  

  pinMode(sensorPin, INPUT);



void loop() {

  int senseValue = digitalRead(sensorPin);

  if (senseValue == HIGH){

    digitalWrite(ledPin, HIGH);





    Serial.println(“not touched”);







  • Water proofed electric products
  • Button key replacement
  • Consumer products
  • Can replace the traditional touch of a button.