How to Use Touch Switch with Arduino and Touchless Capacitive Sensor


Today we learn How to Use Touch Switch with Arduino and Touchless Capacitive Sensor, it presents an innovative way to create interactive and touch-sensitive systems. This project incorporates an Arduino UNO microcontroller, a widely-used development board, along with the TTP223 Capacitive Touch Sensor. Employing jumper wires and a breadboard, this setup allows for the implementation of touchless controls, offering the advantage of responsiveness without the need for physical contact. This technology finds applications in various domains, from household devices to interactive panels and beyond, providing a versatile and durable alternative to traditional switches.

Hardware Required

You will require the following Hardware Components How to Interface TTP223 Capacitive Touch Sensor with Arduino.

Components#Buy From Amazon
Arduino UNO1Buy Link
TTP223 Capacitive Touch Sensor1Buy Now
9v DC Adapter (Optional)1Buy Link
Jumper Wires3Buy Link
Breadboard1Buy Link

What is a Touch Switch Module?

A touch switch, in this context, refers to a capacitive touch sensor capable of emulating the functionality of a traditional button but without the need for direct physical pressure. The touch switch operates based on the measurement of capacitance variation. Acting as a capacitor, the sensor plate and the human body create a system that stores an electrical charge. When proximity is reduced, capacitance increases, triggering a charge accumulation that generates a digital signal when it surpasses a predefined threshold. This touchless operation allows the sensor to be placed under various materials, offering flexibility in design and application.



Pin Configuration

Pin NamePin Type
SIGSignal Pin
VCCPositive Pin
GNDGround Pin


  1. Touchless Operation: Activated with little or no physical pressure, making it suitable for interactive and user-friendly applications.
  2. Versatility in Material: Can be placed under non-conductive materials like vinyl, plastic, cardboard, wood, or glass (within a certain thickness limit).
  3. Durability: Lacks moving parts, enhancing longevity compared to conventional switches.
  4. Digital Output: Generates a digital signal when triggered, compatible with Arduino digital inputs.


The TTP223B Touch Sensor module typically includes the following components:

  1. Touchpad sensor: The touchpad sensor is the main component of the module that detects the touch of a human finger.
  2. TTP223B IC: The onboard IC is a capacitive touch sensor controller that processes the touch signal and provides a digital output.
  3. LED: The module also includes an LED that lights up when the touch sensor is activated, providing a visual indication of the touch.
  4. Resistors: The module may include resistors for voltage regulation or to limit current to the LED.
  5. Capacitors: The module may also include capacitors for filtering and noise suppression.
Operating Voltage2.0-5.5V DC
Operating Current<5uA
Source Current-4mA @ VCC = 3V, VOH = 2.4V
Output TypeDigital (High or Low)
Dimensions15mm x 11mm

Circuit Diagram

The following circuit shows you the connection of the How to Use Touch Switch with Arduino and Touchless Capacitive Sensor Please make the connection carefully


Circuit Connections

ArduinoTouch Module
+5VVCC Pin

Installing Arduino IDE Software

First, you will require to Download the updated version of Arduino IDE Software and Install it on your PC or laptop. if you Learn How to install the Arduino step-by-step guide then click on how to install Arduino Button given Blow


The required code is equally straightforward. When utilizing a digital signal, we employ a digital input to read the status. In the provided example, we display a message on the screen, but in a practical scenario, we would take the necessary actions instead of simply displaying the message.

//For more Projects:

const int sensorPin = 9;

void setup()
   pinMode(sensorPin, INPUT);

void loop()
   int state = digitalRead(sensorPin);

   //send message to serial port based on the value read
   if (status == HIGH)
      Serial.println("Contact detected");
      //here the actions would be executed


  1. Home Automation: Used in electrical switches for home automation, providing a touchless and modern interface.
  2. Interactive Panels: Integrated under vinyl or graphic arts for touch-sensitive interactive panels.
  3. Furniture Integration: Embedded under the wood of furniture to create discreet touch buttons.
  4. Public Spaces: Deployed in public spaces, bathrooms, and garages for touchless control of lighting and appliances.
  5. Art and Design: Employed in creative projects for touch-sensitive artistic installations and interactive designs.

Leave a Comment