TTP223 practical reference
A capacitive touch-sensing breakout that swaps a physical button for a solid-state touch pad, common in enclosure-friendly builds. Built around the TTP223 capacitive touch IC, it detects the small capacitance change caused by a finger touching (or even approaching through a thin non-metal panel) its copper pad, outputting a simple digital HIGH/LOW signal — a clean way to add a button-like input to a project without any moving parts or a hole cut in the enclosure.
Key specifications
- Sensor type: TTP223 capacitive touch sensor IC
- Operating voltage: 2.0V–5.5V DC
- Operating current: ~1.5-3 µA in standby, low active current
- Output modes: Toggle mode or momentary (direct) mode, selectable via a solder jumper on most breakout boards
- Output logic: Active HIGH by default on most modules (some variants can be configured active LOW)
- Touch-through thickness: Can sense through a few millimeters of non-conductive material (plastic, glass, acrylic), useful for sealed enclosures
- Response time: ~60ms typical
- Interface: Single digital output pin, read directly as a HIGH/LOW input
Pinout and connection notes
A small solder jumper pad on the back of most TTP223 breakout boards selects between momentary mode (output HIGH only while actively touched) and toggle mode (output flips between HIGH and LOW with each separate touch) — check which mode your board is configured for before wiring up your project logic, since it changes how you should read the pin in code.
- VCC: Power, 2.0–5.5V DC
- GND: Ground
- SIG (OUT): Digital output — goes HIGH when touched (in direct/momentary mode), or toggles state on each touch (in toggle mode)
Integration checklist
- Confirm the exact part number and breakout-board revision.
- Verify supply voltage, current demand, logic levels, and signal direction against the datasheet.
- Check controller pin assignments and bus address or interface mode against the example code.
- Power up with external loads disconnected, then test signals before full integration.
- If readings or communication fail, check power and ground first, then pin mapping, interface settings, and library initialization.
Troubleshooting and reproducibility
Record the board used, wiring, library/version, supply arrangement, and measured behavior. Use the selected board-specific wiring example as the source of truth. Never assume visually similar modules share identical voltage tolerance or pin order.
Touch sensing through an enclosure: design and troubleshooting
The touch electrode senses a change in capacitance, so the enclosure material, thickness, nearby grounded metal, moisture, wiring length and the user's body connection can all affect sensitivity. Test the sensor behind the final enclosure rather than tuning it on an exposed bench and assuming the result will transfer. A thicker panel or a grounded metal layer between the finger and electrode can reduce or prevent detection.
Confirm whether the specific breakout is configured for momentary or toggle operation and whether its output is active HIGH or active LOW. Clone boards may use different solder-jumper arrangements. Read the output state at power-up and during a touch before writing application logic. If the output chatters, improve mechanical mounting, shorten the signal wire, keep it away from switching power wiring, and add a suitable software debounce or state-stability interval.
A capacitive touch input is not a secure authentication method and should not be used as the only control for hazardous equipment. Moisture, gloves, grounding and environmental changes can alter detection. For outdoor or wet installations, use an enclosure and sensor design rated for the environment and validate operation under realistic conditions.
Wiring & code
Board integration
Library
None — built-in digitalRead by —
No library needed; uses core Arduino functions only.
Wiring
| Component pin | Arduino Uno pin | Note |
|---|---|---|
| VCC | 5V | |
| GND | GND | |
| OUT | D2 | Goes HIGH while a finger touches the pad (default mode). |
#include <Arduino.h>
#define TOUCH_PIN 2
void setup() {
Serial.begin(9600);
pinMode(TOUCH_PIN, INPUT);
}
void loop() {
bool touched = digitalRead(TOUCH_PIN);
Serial.println(touched ? F("Touched") : F("Not touched"));
delay(100);
}- Default mode is momentary (HIGH only while touched); some boards have a solder jumper to switch to toggle mode (stays HIGH until touched again) — check silkscreen markings on your specific module.
- Mounting it behind a thin non-metal panel (plastic, glass, thin wood) still works fine since it senses capacitance, not direct contact.
