Stufin
Home Quick Cart Profile

TTP223B Capacitive Touch Sensor Module

Buy Now on Stufin

Supply Voltage

2.0 V to 5.5 V

Operating Current

Approximately 10 A

Output Type

Digital (0 or 1)

Sensitivity Adjustment

Onboard potentiometer

Response Time

Approximately 10 ms

Operating Temperature

-20C to 70C

Storage Temperature

-40C to 85C

Dimensions

15 mm x 24 mm x 2 mm

Applications

Home appliances (e.g., touch-controlled lamps, fans)

Industrial control systems (e.g., touch-based HMIs)

Consumer electronics (e.g., touch-controlled remote controls)

Medical devices (e.g., touch-based interfaces for medical equipment)

Connectivity and Interface

The TTP223B module has the following connections
VCC (Power Supply)Connect to a power source (2.0 V to 5.5 V)
GND (Ground)Connect to ground
OUT (Digital Output)Connect to a microcontroller or other digital system

Notes and Precautions

The TTP223B module is sensitive to electrostatic discharge (ESD). Handle the module with care to avoid damage.

Ensure proper grounding to minimize noise and electromagnetic interference.

Avoid touching the sensor pad with a conductive object, as this may cause false triggering.

By understanding the functionality and key features of the TTP223B Capacitive Touch Sensor Module, designers and developers can effectively integrate this component into their projects, creating innovative and user-friendly touch-based interfaces.

Pin Configuration

  • TTP223B Capacitive Touch Sensor Module Pinouts and Connection Guide
  • The TTP223B Capacitive Touch Sensor Module is a popular and widely used IoT component for detecting touch or proximity events. It features a simple and compact design, making it suitable for various applications, including robotics, home automation, and wearable devices. This documentation provides a detailed explanation of the module's pins and how to connect them.
  • Pinouts:
  • The TTP223B Capacitive Touch Sensor Module has a total of 4 pins, which are:
  • 1. VCC (Power Supply):
  • Pin description: Positive power supply pin (typically 3.3V or 5V)
  • Connection: Connect to a power source, such as a battery or a USB connection
  • 2. GND (Ground):
  • Pin description: Ground pin
  • Connection: Connect to the ground of the power source or the circuit
  • 3. OUT (Output):
  • Pin description: Digital output pin that indicates the touch state (HIGH or LOW)
  • Connection: Connect to a microcontroller's digital input pin or a logic-level signal
  • 4. IN (Input/Touch Pad):
  • Pin description: Capacitive touch input pin
  • Connection: Connect to a conductive material (e.g., copper, aluminum, or a touch pad) that serves as the touch interface
  • Connection Structure:
  • To connect the TTP223B Capacitive Touch Sensor Module to a microcontroller or a development board, follow this structure:
  • Connect the VCC pin to a power source (e.g., 3.3V or 5V) using a jumper wire or a breadboard.
  • Connect the GND pin to the ground of the power source or the circuit using a jumper wire or a breadboard.
  • Connect the OUT pin to a digital input pin on the microcontroller or development board (e.g., Arduino, Raspberry Pi, or ESP32) using a jumper wire or a breadboard.
  • Connect the IN pin to a conductive material that serves as the touch interface (e.g., a copper pad, aluminum foil, or a touch pad) using a jumper wire or a breadboard.
  • Example Connection Diagram:
  • Here's an example connection diagram for the TTP223B Capacitive Touch Sensor Module with an Arduino Uno:
  • ```
  • +---------------+
  • | TTP223B |
  • +---------------+
  • |
  • |
  • v
  • +---------------+ +---------------+
  • | VCC (3.3V) | | Vin (3.3V) |
  • +---------------+ +---------------+
  • |
  • |
  • v
  • +---------------+ +---------------+
  • | GND | | GND |
  • +---------------+ +---------------+
  • |
  • |
  • v
  • +---------------+ +---------------+
  • | OUT | | Digital Pin 2 |
  • +---------------+ +---------------+
  • |
  • |
  • v
  • +---------------+ +---------------+
  • | IN | | Touch Pad |
  • +---------------+ +---------------+
  • ```
  • Note:
  • Make sure to use a stable power supply and a suitable voltage level for the TTP223B module.
  • Use a pull-up resistor (typically 1 k to 10 k) between the OUT pin and the power supply (VCC) to ensure a stable output signal.
  • The IN pin should be connected to a conductive material that serves as the touch interface. The module will detect changes in capacitance when a user touches the material.
  • Refer to the datasheet and application notes for specific usage guidelines and maximum ratings for the TTP223B Capacitive Touch Sensor Module.

Code Examples

TTP223B Capacitive Touch Sensor Module Documentation
Overview
The TTP223B is a capacitive touch sensor module that detects changes in capacitance when a user touches the sensor pad. It is a popular and widely used module in IoT projects due to its ease of use, low power consumption, and high sensitivity.
Pinout
The TTP223B module has 3 pins:
VCC: Power supply (3.3V or 5V)
 GND: Ground
 OUT: Digital output signal ( HIGH or LOW)
Working Principle
The TTP223B module uses a capacitive sensing technology to detect changes in capacitance when a user touches the sensor pad. When a user touches the pad, the capacitance increases, and the module outputs a HIGH signal. When the user releases the pad, the capacitance decreases, and the module outputs a LOW signal.
Code Examples
### Example 1: Basic Touch Detection using Arduino
In this example, we will use an Arduino board to read the output signal from the TTP223B module and detect touch events.
```c++
const int touchPin = 2;  // Assign the OUT pin of the TTP223B to digital pin 2
void setup() {
  pinMode(touchPin, INPUT);
  Serial.begin(9600);
}
void loop() {
  int touchState = digitalRead(touchPin);
  if (touchState == HIGH) {
    Serial.println("Touch detected!");
  } else {
    Serial.println("No touch detected");
  }
  delay(50);
}
```
In this code, we read the digital output signal from the TTP223B module using the `digitalRead()` function. If the signal is HIGH, it means a touch event has occurred, and we print a message to the serial console.
### Example 2: Debouncing Touch Events using Raspberry Pi (Python)
In this example, we will use a Raspberry Pi to read the output signal from the TTP223B module and debounce the touch events to reduce false triggers.
```python
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
touch_pin = 17  # Assign the OUT pin of the TTP223B to GPIO 17
GPIO.setup(touch_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)
def debounce(func):
    def wrapper(args, kwargs):
        timestamp = time.time()
        if timestamp - wrapper.last_call > 0.2:  # Debounce time of 200ms
            func(args, kwargs)
            wrapper.last_call = timestamp
    wrapper.last_call = 0
    return wrapper
@debounce
def touch_detected():
    print("Touch detected!")
while True:
    if GPIO.input(touch_pin) == GPIO.LOW:
        touch_detected()
    time.sleep(0.01)
```
In this code, we use the `RPi.GPIO` library to read the digital output signal from the TTP223B module. We define a debouncing function `debounce()` to reduce false triggers. The `touch_detected()` function is decorated with the debouncing function and prints a message when a touch event occurs.
Note: In both examples, the power supply and ground pins of the TTP223B module should be connected to the power supply and ground pins of the microcontroller or single-board computer, respectively.
Conclusion
The TTP223B Capacitive Touch Sensor Module is a versatile and easy-to-use component that can be used in a variety of IoT projects. With its high sensitivity and low power consumption, it is an ideal choice for applications such as smart home automation, wearable devices, and interactive installations.