Stufin
Home Quick Cart Profile

TTP223 Touch Switch Module ( Pack of 25)

Buy Now on Stufin

Operating Voltage

2.0V to 5.5V

Operating Current

5mA to 10mA

Output Voltage

Compatible with TTL logic levels

Sensitivity

Adjustable using onboard potentiometer

Response Time

10ms to 100ms

Dimensions

15mm x 15mm x 2mm (L x W x H)

Weight

1.5g

Applications

The TTP223 Touch Switch Module is suitable for a wide range of applications, including

Smart Home Automation

Use the module to control lights, fans, and other appliances with a touch.

Industrial Control Systems

Use the module to create touch-based control interfaces for industrial equipment.

Wearable Devices

Use the module to create interactive controls for wearable devices.

Prototyping and Development

Use the module as a cost-effective and easy-to-use touch sensor solution for prototyping and development projects.

Pinout Diagram

The TTP223 Touch Switch Module has the following pinout

VCC

Power supply (2.0V to 5.5V)

GND

Ground

OUT

Output signal (TTL logic level)

SENS

Sensitivity adjustment pin (connect to potentiometer)

Conclusion

The TTP223 Touch Switch Module is a reliable and easy-to-use capacitive touch sensor module that offers high sensitivity and low power consumption. With its compact design and simple connection scheme, it is suitable for a wide range of applications, from smart home automation to industrial control systems and wearable devices.

Pin Configuration

  • TTP223 Touch Switch Module Documentation
  • Overview
  • The TTP223 Touch Switch Module is a capacitive touch sensor module that allows users to detect touch events without the need for physical contact. This module is commonly used in IoT projects, home automation, and interactive devices.
  • Pinout Description
  • The TTP223 Touch Switch Module has 3 pins, which are described below:
  • Pin 1: VCC (Power Supply)
  • Description: This pin is used to power the module. It should be connected to a stable DC power supply (typically 2.0V to 5.5V).
  • Function: Provides power to the module, enabling it to operate and detect touch events.
  • Pin 2: OUTPUT (Digital Output)
  • Description: This pin is the digital output of the module, which indicates whether a touch event has occurred.
  • Function: When a touch event is detected, the OUTPUT pin goes LOW (0V). When no touch event is detected, the OUTPUT pin goes HIGH (VCC).
  • Note: This pin is typically connected to a microcontroller's digital input pin or a logic-level input of another device.
  • Pin 3: GND (Ground)
  • Description: This pin is the ground connection for the module.
  • Function: Provides a return path for the power supply and helps to stabilize the module's operation.
  • Connection Structure
  • To use the TTP223 Touch Switch Module, follow these connection guidelines:
  • 1. Power Supply Connection:
  • Connect Pin 1 (VCC) to a stable DC power supply (2.0V to 5.5V) using a suitable wire or jumper.
  • 2. Digital Output Connection:
  • Connect Pin 2 (OUTPUT) to a digital input pin of a microcontroller or a logic-level input of another device using a suitable wire or jumper.
  • 3. Ground Connection:
  • Connect Pin 3 (GND) to the ground pin of the power supply or the ground plane of the circuit board using a suitable wire or jumper.
  • Example Connection Diagram:
  • Here's an example connection diagram using an Arduino Uno board:
  • | TTP223 Pin | Arduino Pin |
  • | --- | --- |
  • | VCC (Pin 1) | 5V |
  • | OUTPUT (Pin 2) | Digital Pin 2 |
  • | GND (Pin 3) | GND |
  • Note: Make sure to use a suitable power supply and follow proper wiring practices to avoid damaging the module or other components in your circuit.
  • By following these guidelines, you can successfully integrate the TTP223 Touch Switch Module into your IoT projects and develop interactive devices that respond to touch events.

Code Examples

TTP223 Touch Switch Module Documentation
Overview
The TTP223 Touch Switch Module is a capacitive touch sensor module that allows users to detect touch events without the need for physical buttons or switches. This module is ideal for IoT projects that require touch-sensitive interfaces. The module comes in a pack of 25, making it an affordable and convenient option for prototyping and production.
Pinout
The TTP223 Touch Switch Module has three pins:
VCC: Power supply pin (typically 3.3V or 5V)
 GND: Ground pin
 OUT: Output pin that signals a touch event (digital output)
Features
Capacitive touch sensor technology
 High sensitivity and accuracy
 Low power consumption
 Simple and compact design
 Compatible with various microcontrollers and development boards
Code Examples
### Example 1: Basic Touch Detection using Arduino
This example demonstrates how to use the TTP223 Touch Switch Module with an Arduino board to detect touch events and turn an LED on or off.
```cpp
const int touchPin = 2;  // Connect OUT pin of TTP223 to digital pin 2 on Arduino
const int ledPin = 13;  // Connect an LED to digital pin 13 on Arduino
void setup() {
  pinMode(touchPin, INPUT);
  pinMode(ledPin, OUTPUT);
}
void loop() {
  int touchState = digitalRead(touchPin);
  if (touchState == HIGH) {
    digitalWrite(ledPin, HIGH);  // Turn LED on when touch is detected
  } else {
    digitalWrite(ledPin, LOW);  // Turn LED off when no touch is detected
  }
  delay(50);
}
```
### Example 2: Debouncing Touch Events using Raspberry Pi (Python)
This example demonstrates how to use the TTP223 Touch Switch Module with a Raspberry Pi to detect touch events while implementing debouncing to prevent false triggers.
```python
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
touch_pin = 17  # Connect OUT pin of TTP223 to GPIO 17 on Raspberry Pi
GPIO.setup(touch_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)
def debounce(touch_pin):
    count = 0
    while count < 5:
        if GPIO.input(touch_pin) == GPIO.LOW:
            count += 1
        else:
            count = 0
        time.sleep(0.01)
    return True
while True:
    if debounce(touch_pin):
        print("Touch detected!")
        # Perform desired action when touch is detected
    time.sleep(0.1)
```
Notes and Considerations
When using the TTP223 Touch Switch Module, ensure that the module is properly connected to a power source and ground.
 The OUT pin of the module should be connected to a digital input pin on the microcontroller or development board.
 In noisy environments or when using the module with other capacitive components, it may be necessary to add additional filtering or shielding to prevent false triggers.
 The module's sensitivity can be adjusted by adding an external capacitor between the OUT pin and ground. Increase the capacitor value to increase sensitivity, and decrease the value to decrease sensitivity.