What the TTP223 Capacitive Touch Module Does for Your Arduino Project
The TTP223 capacitive touch switch module replaces mechanical push buttons with a solid-state touch pad that responds to the lightest contact. It outputs a clean TTL digital signal that any Arduino GPIO pin can read directly — no ADC or extra components are needed. The module works with both 3.3V and 5V logic boards, including Arduino Uno, Nano, ESP32, and Raspberry Pi.
Because the capacitive field penetrates non-conductive materials up to roughly 3 mm thick, you can mount the touch pad behind acrylic, ABS plastic, or thin wood for a seamless, waterproof front panel with no exposed contacts.
TTP223 Module Key Specifications
- 10Pcs TTP223 Capacitive Touch Switch Button Module Self Lock: Supply voltage: 2.5V – 5.5V Compatible with both 3.3V and 5V microcontrollers without a level shifter.

10Pcs TTP223 Capacitive Touch Switch Button Module Self Lock - 10Pcs TTP223 Capacitive Touch Switch Button Module Self Lock: Output type: TTL digital (high/low) Connects directly to any digital GPIO pin — no analog input required.
- 10Pcs TTP223 Capacitive Touch Switch Button Module Self Lock: Default mode: no-lock (momentary); self-lock enabled by bridging pad A Choose between momentary or latching behavior by soldering a single jumper — no code changes needed.
- 10Pcs TTP223 Capacitive Touch Switch Button Module Self Lock: Response time: ~60 ms Fast enough for interactive controls, button replacements, and simple touch interfaces.
- 10Pcs TTP223 Capacitive Touch Switch Button Module Self Lock: Board dimensions: 24 x 24 mm Compact enough to fit inside enclosures or behind panels.
Wiring the TTP223 to Your Arduino
The TTP223 module has three pins: VCC, GND, and OUT. Connect them as follows:
- VCC: Connect to the Arduino's 5V or 3.3V output (both are within the module's 2.5V–5.5V range).
- GND: Connect to any GND pin on the Arduino.
- OUT: Connect to a digital input pin, e.g., pin 2 on an Arduino Uno.
Selecting Momentary or Self-Lock Mode
The TTP223 ships in momentary (no-lock) mode: the output goes high only while you touch the pad. To switch to self-lock (latching) mode, solder a blob across the A pads on the back of the module. Once bridged, one touch turns the output high; the next touch turns it low. No firmware change is required — the mode is set entirely in hardware.
This hardware-only switching is useful when you want a toggle behavior without writing extra code, or when you need to change behavior on the fly by swapping modules.
Arduino Code Example for Momentary Mode
The following sketch reads the TTP223 output and turns the built-in LED on while the touch pad is pressed. It works with the module in its default momentary mode.
const int touchPin = 2; // TTP223 OUT connected to digital pin 2
const int ledPin = 13; // built-in LED
void setup() {
pinMode(touchPin, INPUT);
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
}
void loop() {
int touchState = digitalRead(touchPin);
if (touchState == HIGH) {
digitalWrite(ledPin, HIGH);
Serial.println("Touched");
} else {
digitalWrite(ledPin, LOW);
delay(50);
Arduino Code Example for Self-Lock (Toggle) Mode
When the module is in self-lock mode (A pads bridged), the same wiring works. The output toggles with each touch: high on first touch, low on the next. The code above reads the state correctly without modification. You can use the output to control a relay, LED, or other load directly from the GPIO pin.
Practical Considerations for Your Project
The TTP223 module is a direct drop-in for any GPIO pin on an Arduino, ESP32, or Raspberry Pi. Its small size (24 x 24 mm) and low voltage range make it ideal for portable or battery-powered projects. The pack of 10 modules is enough for a full project or a classroom set.
If you plan to mount the touch pad behind a panel, remember that the capacitive field works through non-conductive materials up to about 3 mm thick. Test your panel material before final assembly. The module has no exposed contacts when mounted behind a panel, giving a clean look and protecting against dust or moisture.


