Blog

TTP223 Capacitive Touch Sensor Module – Complete Guide

Capacitive Touch Sensor

TTP223 Capacitive Touch Sensor Module

Solid-State Touch Detection with Digital Output

The TTP223 replaces a mechanical push-button with a fully solid-state touch pad - there are no moving parts to wear out, because it detects touch electrically rather than mechanically. The small copper pad on the module forms one plate of a capacitor; a human finger, being conductive and grounded through the body, effectively adds capacitance to that pad on contact, and the onboard TTP223 chip continuously measures the pad's baseline capacitance and watches for that characteristic shift, translating a detected touch into a clean digital HIGH signal on its output pin. Because there's no physical switch mechanism to bounce or degrade, capacitive touch sensors like this are popular anywhere a sealed, low-profile, or maintenance-free control surface matters - the pad can even be triggered right through a thin layer of non-conductive material like plastic or glass, which is exactly how touch-sensitive panel buttons on consumer electronics work.

Capacitive
Sensing Method
Digital HIGH/LOW
Output
2.0V – 5.5V
Supply

Key features

Solid-State Touch Detection

No moving parts, nothing to mechanically wear out.

Simple Digital Output

A clean HIGH/LOW signal, easy to read on any GPIO pin.

Works Through Thin Materials

Can sense a touch through thin plastic or glass overlays.

Low Power Consumption

Draws only a few microamps in standby on most modules.

Selectable Output Mode

Momentary or toggle/latching output behavior, depending on board variant.

Wide Supply Voltage Range

Runs from 2.0V to 5.5V, compatible with most logic families.

Technical specifications

Supply Voltage 2.0V – 5.5V
Output Digital (HIGH on touch, LOW when released - default mode)
Sensing Method Capacitive
Stabilization Time ~220ms after power-on, then fast per-touch response
Standby Current A few µA (chip-dependent)
Operating Current ~1.5–3mA when active
Output Modes Momentary (default) or toggle/latching, board-dependent
Touch Surface Onboard copper pad (senses through thin overlay material)
Package 3-pin breakout module

Pinout

PinFunction
VCC Power supply
GND Ground
SIG Digital output

Applications

Touch-sensitive buttons for enclosed or sealed projects DIY touch lamps and light switches Replacing worn mechanical buttons in a build Kids' interactive toy projects Touch-to-mute or touch-to-trigger controls Wearable and costume prop touch triggers

What's in the box

1x TTP223 capacitive touch sensor module

Downloads

Datasheet (PDF) Arduino Touch-Button Example Sketch
🔌
Pin Connections
1 Table
Pin Connections Table 1
BoardSensor PinConnection
TTP223VCC/GND/OUT3.3-5V / GND / board digital pin
📟
Capacitive Touch Sensor TTP223 Red
7 Examples • C/C++ | Boards: Arduino Uno, Arduino Nano, Arduino Mega, ESP32, ESP8266, STM32, Raspberry Pi Pico
Capacitive Touch Sensor TTP223 Red - Arduino Uno
Capacitive Touch Sensor TTP223 Red - Arduino Nano
Capacitive Touch Sensor TTP223 Red - Arduino Mega
Capacitive Touch Sensor TTP223 Red - ESP32
Capacitive Touch Sensor TTP223 Red - ESP8266
Capacitive Touch Sensor TTP223 Red - STM32
Capacitive Touch Sensor TTP223 Red - Raspberry Pi Pico
📄 File: capacitive_touch_sensor_ttp223_red_-_arduino_uno.inoArduino Uno
295 characters
1//ekostra.com
2//electronics store in egypt
3//+201008896258
4
5// Digital OUT pin 2 on Arduino Uno
6#define TOUCH_PIN 2
7
8void setup() {
9 Serial.begin(115200);
10 pinMode(TOUCH_PIN, INPUT);
11}
12
13void loop() {
14 Serial.println(digitalRead(TOUCH_PIN) == HIGH ? "Touched" : "Not touched");
15 delay(100);
16}
📄 File: capacitive_touch_sensor_ttp223_red_-_arduino_nano.inoArduino Nano
296 characters
1//ekostra.com
2//electronics store in egypt
3//+201008896258
4
5// Digital OUT pin 2 on Arduino Nano
6#define TOUCH_PIN 2
7
8void setup() {
9 Serial.begin(115200);
10 pinMode(TOUCH_PIN, INPUT);
11}
12
13void loop() {
14 Serial.println(digitalRead(TOUCH_PIN) == HIGH ? "Touched" : "Not touched");
15 delay(100);
16}
📄 File: capacitive_touch_sensor_ttp223_red_-_arduino_mega.inoArduino Mega
296 characters
1//ekostra.com
2//electronics store in egypt
3//+201008896258
4
5// Digital OUT pin 2 on Arduino Mega
6#define TOUCH_PIN 2
7
8void setup() {
9 Serial.begin(115200);
10 pinMode(TOUCH_PIN, INPUT);
11}
12
13void loop() {
14 Serial.println(digitalRead(TOUCH_PIN) == HIGH ? "Touched" : "Not touched");
15 delay(100);
16}
📄 File: capacitive_touch_sensor_ttp223_red_-_esp32.inoESP32
289 characters
1//ekostra.com
2//electronics store in egypt
3//+201008896258
4
5// Digital OUT pin 4 on ESP32
6#define TOUCH_PIN 4
7
8void setup() {
9 Serial.begin(115200);
10 pinMode(TOUCH_PIN, INPUT);
11}
12
13void loop() {
14 Serial.println(digitalRead(TOUCH_PIN) == HIGH ? "Touched" : "Not touched");
15 delay(100);
16}
📄 File: capacitive_touch_sensor_ttp223_red_-_esp8266.inoESP8266
293 characters
1//ekostra.com
2//electronics store in egypt
3//+201008896258
4
5// Digital OUT pin D4 on ESP8266
6#define TOUCH_PIN D4
7
8void setup() {
9 Serial.begin(115200);
10 pinMode(TOUCH_PIN, INPUT);
11}
12
13void loop() {
14 Serial.println(digitalRead(TOUCH_PIN) == HIGH ? "Touched" : "Not touched");
15 delay(100);
16}
📄 File: capacitive_touch_sensor_ttp223_red_-_stm32.inoSTM32
293 characters
1//ekostra.com
2//electronics store in egypt
3//+201008896258
4
5// Digital OUT pin PB4 on STM32
6#define TOUCH_PIN PB4
7
8void setup() {
9 Serial.begin(115200);
10 pinMode(TOUCH_PIN, INPUT);
11}
12
13void loop() {
14 Serial.println(digitalRead(TOUCH_PIN) == HIGH ? "Touched" : "Not touched");
15 delay(100);
16}
📄 File: capacitive_touch_sensor_ttp223_red_-_raspberry_pi_pico.inoRaspberry Pi Pico
301 characters
1//ekostra.com
2//electronics store in egypt
3//+201008896258
4
5// Digital OUT pin 2 on Raspberry Pi Pico
6#define TOUCH_PIN 2
7
8void setup() {
9 Serial.begin(115200);
10 pinMode(TOUCH_PIN, INPUT);
11}
12
13void loop() {
14 Serial.println(digitalRead(TOUCH_PIN) == HIGH ? "Touched" : "Not touched");
15 delay(100);
16}
Capacitive touch switch, digital output.
Since it can sense through thin non-conductive material, it can be mounted flush behind a thin plastic or acrylic panel for a fully sealed-looking button - just keep that overlay thin and non-conductive, since thick or metallic covers block the capacitive effect. Mounting the bare pad very close to metal chassis parts, or running its signal wire alongside noisy high-current wiring, can cause erratic triggering, so keep it electrically isolated from nearby conductive surfaces where possible. And check whether your specific board defaults to momentary output (HIGH only while actively touched) or toggle/latching output (HIGH after one touch, LOW after the next) before wiring your logic, since assuming the wrong one is a common source of ”it doesn't work as expected” confusion.