TTP223 Arduino wiring illustration; consult pin connection table for verified wiring

Want to try a small electronics project without complicated circuits? In this beginner tutorial, we’ll build make a touch-controlled led using arduino and ttp223. You’ll connect one sensor, upload a short Arduino IDE sketch, and see the result. No Wi-Fi account or cloud service is required.

Wiring illustration for Arduino TTP223 touch sensor; use the wiring table for verified connections

What does it do?

The TTP223 senses a finger near its capacitive pad. On a typical active-HIGH module, touching makes the output HIGH, which turns the LED on.

Parts you’ll need

Arduino Uno, TTP223 touch sensor module, LED, 220-ohm resistor, jumper wires. You will also need a computer with the free Arduino IDE installed.

Wiring connections

Disconnect USB power before moving any wires. Make these connections carefully:

Sensor / component pinConnect to
Touch module VCC5V (if supported by module)
Touch module GNDGND
Touch module OUTD2
D8220-ohm resistor → LED anode
LED cathodeGND

Important: ESP32 GPIO pins work at 3.3V. Do not connect a 5V output directly to an ESP32 input. Board and sensor-module pin labels vary, so double-check the markings on your hardware.

Arduino IDE code

Select the correct board and USB port in Arduino IDE, paste the complete sketch below, and click Upload.

const int touchPin = 2;
const int ledPin = 8;
void setup() {
  Serial.begin(9600);
  pinMode(touchPin, INPUT);
  pinMode(ledPin, OUTPUT);
}
void loop() {
  bool touched = digitalRead(touchPin) == HIGH;
  digitalWrite(ledPin, touched ? HIGH : LOW);
  Serial.println(touched ? "Touched" : "Released");
  delay(100);
}

Expected result

Place a finger on the pad: LED turns on; release: LED turns off. Open Tools → Serial Monitor and set the baud rate shown in Serial.begin() in the sketch.

Troubleshooting

Some TTP223 modules have toggle/hold modes set by solder bridges. This project assumes momentary mode. Confirm the board’s supply-voltage rating.

If nothing appears, first check the USB cable, correct board and port, sensor power and ground, and the Serial Monitor baud rate. Recheck every wire against the connection table before changing code.

What to try next

Once this simple example works, try changing the measurement interval or using the sensor reading to control an LED. This is an easy way to learn inputs, outputs, and basic programming.

For more hands-on electronics tutorials, explore CircuitMagic. If you later want to control Arduino or ESP32 projects from a phone over Bluetooth, see our BLE Controller app tutorial. This project itself does not need Bluetooth.

0 Comments

Leave a reply

Your email address will not be published. Required fields are marked *

*

or

Log in with your credentials

Forgot your details?