Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

For a common three-pin TTP223 touch-sensor breakout, connect VCC/VIN to a supported supply (5 V is the usual Uno example), GND to Arduino GND, and SIG/OUT/I/O to a digital input such as D2. In the common default mode, the signal reads HIGH while touched and LOW while idle. Check the labels and jumper configuration on your particular board before applying power: breakout layouts and settings vary.

Connections at a glance

TTP223 breakout pin Arduino connection What it does
VCC or VIN A supply pin supported by the breakout; 5 V for the common Uno example Powers the module
GND GND Provides the shared ground reference
SIG, OUT, or I/O A digital input, for example D2 Carries the touch sensor’s logic-level output

D2 is an example, not a requirement. The sketch must use the same digital pin you connect to the output. The ShillehTek TTP223B manual describes this three-wire arrangement; other boards may use different pin order or labels, so follow the markings on the board rather than assuming a familiar layout.

Think of the signal connection as a simple status line: the module detects touch and presents a digital logic level, while the Arduino reads that level. The Arduino does not need a special analog measurement for the basic example here. You need three connections—power, a shared ground reference, and signal—then a sketch that reads the chosen input.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check the board and supply before wiring

Identify the three connections

Read the silkscreen labels on your exact breakout. Locate its power input, ground, and signal output, and determine the pin order from those labels. Do not assume that two boards with the same sensor name have the same physical layout. If the labels are missing or unclear, consult the documentation for that specific board before connecting it.

#1 Best Overall
5PCS TTP223 Capacitive Touch Switch Module TTP223B Digital Touch Sensor Module Capacitive Touch Sensor Switch
  • Capacitive type touch switch module The module is based on a touch detection IC (TTP223B)'s. Under normal conditions, the module output low, low-power mode to mode; touch of a finger when the corresponding position, the module will output high, the mode is switched to fast mode; when for 12 seconds without touching, the mode and switch to low power mode.
  • For Jog type: the initial state is low, high touch, do not touch is low (similar touch of a button feature)
  • Power supply for 2 ~ 5.5V DC
  • Control Interface: A total of three pins (GND, VCC, SIG), GND to ground, VCC is the power supply, SIG digital signal output pin;
  • Power Indicator: Green LED, power on the right that is shiny;

Breakouts are sold in different layouts, and even a familiar-looking three-pin row is not enough to establish which pin is which. Look for markings such as VCC or VIN, GND, and SIG, OUT, or I/O. Match each wire to its label, not to a remembered order from a photograph of another module. A wrong assumption about the power and ground pins is a more basic problem to eliminate before trying code changes.

Choose a supported supply

Tontek Design Technology Ltd. specifies an operating supply range of 2.0–5.5 V for the TTP223-BA6 controller. That is the controller’s specification, not a guarantee that every breakout board has identical supporting circuitry or accepts the same connections. Use the breakout’s own documentation to determine its supported supply.

For a compatible breakout connected to a 3.3 V logic board, powering it from 3.3 V keeps its output at the supply level. Confirm that the particular breakout supports that supply before using it. Likewise, the common 5 V Uno connection is an example for a compatible module, not a reason to apply 5 V to an unknown board.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The distinction matters because the number applies to the TTP223-BA6 controller, while you are connecting a complete breakout. The board may include additional circuitry, and the available product information does not establish that every seller uses the same design. Treat the controller range as useful context, then confirm the allowable supply for the module you actually have. Do not infer compatibility from the sensor name alone.

Know whether the board has configuration jumpers

Some TTP223 breakouts have solder pads or jumpers on the back that alter output mode or polarity. The ShillehTek manual describes such options for its module, but jumper markings and pad positions are not universal. Identify the settings from the documentation for your board; do not copy a jumper position from another layout by appearance alone.

For a first test, it is helpful to know whether the board is in its default momentary active-HIGH configuration or has been changed. In the common default described by the module manual, touching produces HIGH and idle produces LOW. If a board is set for toggle operation, the output can remain in its changed state after you remove your finger. If polarity is active-LOW, the active touch state is LOW instead of HIGH. Establish those settings before deciding that the sensor or sketch is failing.

Wire the sensor to an Arduino

  1. Disconnect power. Keep the Arduino unpowered while making the connections.
  2. Connect ground. Wire the module’s GND pin to an Arduino GND pin.
  3. Connect the supply. Wire VCC or VIN to the supported Arduino supply pin. For the common compatible Uno example, use 5 V.
  4. Connect the signal. Wire SIG, OUT, or I/O to a digital input such as D2. Note the pin number for the sketch.
  5. Inspect the wiring. Check that each wire matches the board labels, that the supply is within the breakout’s supported range, and that the signal is not connected to a supply pin.
  6. Apply power and test. Upload the sketch below, open the Serial Monitor, and touch the module’s sensing surface.

A breadboard and male-to-male jumper wires can make connections easier with a bare breakout, but are optional; the third-party module guide lists them as example assembly items. Use connections appropriate to the board’s physical form and pin spacing.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
hiBCTR 10-Pack TTP223B Capacitive Touch Switch Module, 2-5.5V
  • Momentary Touch Control​​: TTP223B chip enables instant on/off response (60ms touch mode) with auto low-power switching after 12s idle.
  • ​​Wide Voltage Compatibility​​: Operates at 2-5.5V DC (3V typical) with 0.8VCC high/0.3VCC low TTL output for Arduino/Raspberry Pi integration.
  • ​​Non-Metallic Installation​​: Detect touch through glass/plastic/paper (≤3mm) via 24×24mm PCB with four M2 screw holes for secure mounting.
  • ​​Ultra-Low Power Design​​: Consumes <1.5μA in standby mode (220ms wake-up time), ideal for battery-powered IoT devices.
  • Bulk DIY Bundle​​: 10x touch modules (24×24×7.2mm each) for stair lighting, smart mirrors, and capacitive control panels.

The essential parts for this example are a compatible TTP223B touch-sensor module and an Arduino-compatible controller with a usable digital input. An Uno is a convenient example, not a requirement: the connection pattern is the same on a compatible controller, provided you use its supported supply and select a digital input it can read. A breadboard and jumper wires are convenience items when the module needs them; they are not part of the sensor’s required electrical behavior.

Before applying power, compare the three wires against the table once more. The ground wire should end at Arduino GND, the supply wire at a supported power pin, and the signal wire at the digital input named in your sketch. This quick check keeps two separate questions clear: whether the module is powered correctly, and whether the program is reading the pin that is actually connected.

Read the output with a minimal sketch

The beginner examples in the Freenove TTP223 tutorial use a digital input and digitalRead. A dedicated sensor library is not established as necessary for this basic digital-output use. This illustrative sketch prints a message when the input changes, rather than flooding the Serial Monitor with the same state on every loop pass.

const int touchPin = 2;
int previousState = LOW;

void setup() {
  pinMode(touchPin, INPUT);
  Serial.begin(9600);
}

void loop() {
  int currentState = digitalRead(touchPin);

  if (currentState != previousState) {
    if (currentState == HIGH) {
      Serial.println("Touched");
    } else {
      Serial.println("Not touched");
    }
    previousState = currentState;
  }

  delay(10);
}

Connect the module output to D2 for this exact sketch. If you use another input pin, change touchPin to match. Open the Serial Monitor at 9600 baud. In the common momentary active-HIGH mode, touching the sensor changes the reading to HIGH and releasing it returns the reading to LOW. The Freenove tutorial and Handson Technology example use this general digital-input pattern, including serial output or an indicator LED.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The first line selects the Arduino pin being monitored; pinMode(touchPin, INPUT) configures that pin as an input. In the main loop, digitalRead(touchPin) obtains the current HIGH or LOW state. The comparison with previousState makes the serial message appear when the reading changes, so a single held touch does not print the same message repeatedly on each loop pass. The short delay is part of this illustrative example, not a special requirement of the module.

To try the sketch, connect the signal to D2, upload it, and open the Serial Monitor with its baud rate set to 9600 to match Serial.begin(9600). In the default momentary active-HIGH case, you should see “Touched” when the reading changes to HIGH and “Not touched” when it returns to LOW. This is an example of the expected logic, not a claim that a particular module or wiring has been physically tested.

The sketch assumes the input has a defined LOW idle state and that the module uses active-HIGH output. If your board’s documentation calls for a different input arrangement, follow it. The module guide’s common default is active-HIGH; this illustrative code should not be treated as proof of behavior on an unverified breakout.

Rank #3
Ferwooh 10PCS TTP223B Digital Touch Sensor Capacitive Touch Switch Module Inching Tact Switch DIY
  • This module is capacitive type jog mode touch switch module that is based on a touch detection IC (TTP223B). Allows you to remove the worry of conventional push-type keys.
  • In the normal state, the module output low, low power consumption, but when a finger touches the corresponding position, the module output high, if not touched for 12 seconds, switch to low-power mode.
  • Positive and negative can be used as a touch surface,can replace the traditional touch button.
  • Low power consumption.Power supply: 2-5.5V DC.
  • Four M2 screws positioning holes for easy installation.Module can be installed in such as surface plastic, glass of non-metallic materials.

If you prefer to use an indicator rather than the Serial Monitor, the cited beginner examples also demonstrate the general idea of using a digital input to control an indicator LED. The key remains the same: read the sensor output as a digital state, then make the chosen response depend on that reading. This guide’s serial sketch keeps the wiring and output easy to inspect while you establish the module’s behavior.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Understand momentary, toggle, active-HIGH, and active-LOW

Mode and polarity describe different aspects of the output. Momentary versus toggle describes how the state responds over time; active-HIGH versus active-LOW describes which logic level represents the active state. Some boards allow one or both to be changed with jumpers.

Configuration Typical reading behavior What to change in code
Momentary, active-HIGH HIGH while touched; LOW while idle. This is the common default described by the ShillehTek manual. The example sketch treats HIGH as touched.
Momentary, active-LOW The active touch state is represented by LOW rather than HIGH. Reverse the state test so LOW is reported as touched.
Toggle, active-HIGH The output changes state on a touch and retains the resulting state until another change, as configured by the module. Interpret the output as a retained state, not simply as “finger is currently on the sensor.”
Toggle, active-LOW The output uses the opposite polarity while retaining toggle-style behavior. Account for both the retained state and active-low polarity.

These are configuration possibilities documented for some modules, not settings available in an identical form on every TTP223 breakout. Read the specific board’s jumper instructions before changing pads. If the observed readings do not match the sketch’s assumptions, first establish the module’s actual output mode and polarity rather than treating the sensor as defective.

These two choices answer different questions. Momentary or toggle tells you whether the output follows the present touch or keeps a state after a touch event. Active-HIGH or active-LOW tells you which logic level the board uses to represent its active state. A toggle module can therefore be active-HIGH or active-LOW; changing one setting does not, by itself, tell you what the other is.

For momentary active-HIGH, the code’s currentState == HIGH check labels the active state “Touched.” For momentary active-LOW, reverse that interpretation: LOW is the active state and HIGH is idle. In toggle mode, avoid labeling every active reading as a finger currently on the sensor, because the output may have been retained after the touch. Interpret the reading according to the configured behavior instead. Follow the board-specific jumper guide if you want to change the configuration; there is no universal jumper location or letter to quote for all boards.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Test and troubleshoot the connection

No messages appear when you touch the sensor

  • Verify the module’s signal wire goes to the same input number as touchPin in the sketch.
  • Confirm the module is powered from a supply supported by its breakout documentation and shares ground with the Arduino.
  • Check that the module’s pins were identified by their labels, not by an assumed left-to-right order.
  • Confirm the board is configured for the output mode your sketch expects. A changed jumper setting can alter polarity or behavior.

Also confirm that the Serial Monitor is open at 9600 baud for the supplied sketch. If the serial display is not set to the baud rate used by Serial.begin(9600), the monitor may not present the expected readable output. If the sketch uses a different input pin, verify both ends of the signal wire and the value assigned to touchPin.

The reading seems reversed

If the input is LOW while touched and HIGH while idle, the board may be configured for active-LOW output. Change the test in the sketch to treat LOW as touched. Verify the actual idle and touched readings before changing code; a polarity mismatch and a wiring error can look similar.

Rank #4
HiLetgo 10pcs TTP223B Capacitive Touch Switch Module Touch Sensor Switch Digital Capacitive Touch Sensor Switch DC 2~5.5V
  • This is the "momentary" variety of the touch sensor - touch and it turns on, release and it turns off.
  • Positive and negative can be used as a touch surface,can replace the traditional touch button.
  • Four M2 screws positioning holes for easy installation.Module can be installed in such as surface plastic, glass of non-metallic materials.
  • In addition to the thin paper ( non-metallic ) covering the surface of the module , as long as the correct location of the touch , you can make hidden in the walls, desktops and other parts of buttons.
  • The module is based on a touch-sensing IC (TTP223B) capacitive touch switch module. In the normal state, the module output low, low power consumption; When a finger touches the corresponding position, the module output high, if not touched for 12 seconds, switch to low-power mode.

Do not change jumper pads just because the messages appear reversed. First compare the actual HIGH/LOW behavior at idle and during touch with the board documentation. Then either use code that matches the configured polarity or, if the board supports it and you intend to change it, follow its instructions for the jumper configuration. That keeps the software interpretation and the hardware setting from being confused.

The output stays on or does not behave like a press

A toggle-configured module can retain its output state after a touch instead of returning to idle when the finger is removed. Check the module’s configuration documentation and jumper settings. Do not assume that every touch breakout uses the same solder-pad labels or placement.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

That retained output is different from the common momentary behavior, where the signal is HIGH only while touched (for active-HIGH) and returns LOW while idle. If you want the sketch to report contact as it happens, confirm the module is in the momentary mode. If toggle mode is intentional, treat the signal as an on/off state rather than a live indication of whether a finger is currently present.

Power or wiring is uncertain

Remove power and recheck VCC/GND orientation and the board labels. Confirm the breakout’s permitted supply rather than relying only on the TTP223-BA6 controller’s 2.0–5.5 V specification. The controller range does not establish the input requirements of every board-level circuit.

If you are using a 3.3 V logic board, confirm that the breakout is compatible with a 3.3 V supply and use that supply when appropriate; on a compatible board this keeps the signal at the supply level. If you are using an Uno, the common example uses 5 V only for a compatible module. In either case, the board’s own specifications—not a generic pin order or controller figure—decide the safe connection.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What this connection does—and does not require

The TTP223 breakout supplies a digital signal that the Arduino reads as an input; for the basic touch indication in this guide, the documented examples use pinMode and digitalRead. A simple test can report touch state over serial or drive an indicator response. The exact behavior depends on the breakout’s configuration, and no single pin order or jumper layout should be assumed across all sellers’ boards.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For this basic digital-output use, the cited beginner examples do not establish a need for a dedicated TTP223 library. The sketch uses standard digital input operations: set the selected pin as an input, read it, and act on HIGH or LOW according to the module’s mode. You can build a simple first test around serial output, then adapt the response to an indicator LED or another application that reads a digital state.

Best Value
6Pcs TTP223B Digital Capacitive Touch Sensor Switch Module DC 2~5.5V for Arduino Raspberry Pi DIY
  • 【TTP223B Digital Capacitive Touch Sensor Switch Module】:Positive and negative can be used as a touch surface,can replace the traditional touch button.
  • 【Supply Voltage】:2~5.5V DC
  • Support low power consumption, In the normal state, the module output low, when a finger touches the corresponding position, the module output high, not touched for 12 seconds, switch to low-power mode.
  • Support module is mounted in the surfaces of non-metallic materials such as plastic, glass, acrylic, you can make the keys hidden in the walls and desks.
  • Support Positive and negative can be used as a touch surface,can replace the traditional touch button.

For additional context, DigiKey’s TTP223B-with-Arduino guide corroborates the module-connection approach, while Tontek’s product page is the source for the controller supply range. Those controller-level figures and example wiring should not replace the specifications for the particular breakout in hand.

The practical limit of a generic wiring guide is the variety of breakout boards. The common three-wire arrangement and default active-HIGH behavior are useful starting points, but they are not proof that every board has the same labels, pin order, supported supply, or solder-jumper options. The board markings and its own documentation take precedence whenever they differ from this example.

Frequently Asked Questions

How do I wire a TTP223B to an Arduino?

For a compatible three-pin breakout, connect VCC or VIN to a supported Arduino supply, GND to Arduino GND, and SIG/OUT/I/O to a digital input such as D2. The common Uno example uses 5 V, GND, and D2. Check your module’s labels and documentation before powering it because pin order and board design can vary.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What does the TTP223 output do when I touch it?

The common default described by the cited module guide is momentary active-HIGH: the output is HIGH while touched and LOW while idle. Some boards can be configured for toggle behavior or active-LOW output, so check the specific board’s jumper settings.

Do I need an Arduino library for a TTP223 touch sensor?

The documented beginner examples use a digital input and digitalRead for the module’s output. The cited beginner examples do not establish that a dedicated library is necessary for this basic use.

Can I connect the TTP223 to a 3.3 V Arduino-compatible board?

The TTP223-BA6 controller specification gives a 2.0–5.5 V operating supply range, but that does not guarantee every breakout has the same circuitry. Confirm that your particular module supports 3.3 V; on a compatible breakout, powering it at 3.3 V keeps its signal at the supply level.

Why does the output stay HIGH after I stop touching the sensor?

The board may be configured for toggle behavior, which retains its state after a touch rather than returning to idle immediately. Check the breakout’s documentation and jumper configuration. Jumper markings and positions are not universal across boards.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What should I check if the sensor does not respond?

Recheck VCC and GND orientation, confirm the supply is supported by the breakout, verify that the signal wire and touchPin use the same digital input, and check the module’s output mode and polarity. For the example sketch, also open the Serial Monitor at 9600 baud.

The Bottom Line

For a compatible TTP223 breakout, connect its labeled supply and ground pins to supported Arduino power and GND, then connect its signal to a digital input such as D2. Read that pin with digitalRead; the common default is HIGH while touched and LOW while idle. Verify the exact board’s supply, pin labels, and jumper settings before powering it, since breakout layouts and output configurations vary.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.