touch sensor/Using it/09. When a touch does nothing
Using it · 09 of 9

When a touch does nothing

Look at the red LED first. It lights from the chip's own output with no code involved, so lit means the chip saw the touch and the fault is between SIGNAL and the sketch, and dark means the chip never saw it. Most of the rest is something on the pad at the wrong moment.

The LED splits the problem in two

The red LED and its 1 kΩ hang off SIGNAL, and SIGNAL is driven by the chip. So the LED lights whenever the chip has decided the pad is touched, whether or not anything reads it. That makes it the first thing to look at.

When a touch does nothing
What it does
The LED lights from the chip's output with no code involved, so a dark LED under your finger means the chip is unpowered or did not see the touch. Check VCC and GND first, counting from the square pad. Then power-cycle with nothing near the pad: whatever was on it in the first 0.5 s became its idea of nothing.

Pick what the block is doing. The first check in each list is the one that is usually the answer.

Dark: the chip did not see it

Power first. Count from the square pad, GND, VCC, NC, SIGNAL, and check VCC reaches your board's 3V3 or 5V. A cable plugged one hole over moves every wire along by one, and nothing works.

If the power is right, think about the first half second. The chip spends it learning what the pad reads with nothing on it. A thumb holding the board by its pad, a case pressed against it, a cable lying over it: whatever was there became nothing, and a real touch may not rise far enough above it. Unplug, keep clear, plug in again. The first half second has the details.

Lit: the sketch is looking elsewhere

The chip did its part. The usual fault is the number: TOUCH_PIN naming a different GPIO from the one SIGNAL is on. Next, the wire on NC instead of SIGNAL: they are neighbours, and NC reaches nothing. Last, a missing ground between the two boards, which leaves your pin nothing to measure SIGNAL against.

Stuck HIGH, or touches nobody made

Stuck HIGH is something on the pad. This version of the chip has no timeout that gives up on a long touch, so the thing has to move. Touches from nowhere are usually the supply or the leads: the chip compares tiny changes, and a supply that jumps when a motor starts looks like a finger.

When it does not work

The LED is dark when I touch the pad.

The chip is unpowered or did not see the touch. Check VCC and GND, counting from the square pad. Then unplug, keep clear of the pad, and plug in again, because whatever was on the pad in the first half second became the chip's idea of nothing.

The LED lights but my sketch reads LOW.

The fault is after the chip. Check the pin number in the sketch, that the wire is on SIGNAL (fourth hole) and not NC (third), and that the block and your board share GND.

SIGNAL is stuck HIGH.

Something is on or near the pad, and this chip never times a touch out. Look for a cable across the pad, a hand on the case, a metal part close by. Clear it and power-cycle.

It fires on its own.

Something is changing the supply or coupling onto the pad. Tontek warns that a drifting or jumping supply causes false detections. Keep the leads short and away from the pad, and do not share the block's supply with motors or relays.

It only works with a hard press through my panel.

The panel is too thick, or has metal or metallic paint in it. Try thinner material. If the panel is fixed, a smaller C5 than the fitted 22 pF makes the pad keener.

Alongside this page
Where this goes next

A mechanical switch on the same four pins, with a pull-down and contacts that bounce.

For a click: the TK04 Push Button →

Edit this page — content/books/tp223-touch-sensor/when-a-touch-does-nothing.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

This page covers several products. Choose yours to see the right discussions.

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Modules and blocks on the forum →