touch sensor/Wiring it/06. VCC sets the HIGH
Wiring it · 06 of 9

VCC sets the HIGH

SIGNAL is the chip's own output, driven from VCC, so touched it sits at about the voltage on VCC. Beside an ESP32, an ESP32-S3 or a Pico that has to be 3V3. Beside an Uno, 5V: from 3V3 the Uno still reads HIGH, but by about a tenth of a volt.

SIGNAL is an output, from VCC

Some input blocks give your pin a switch and a resistor. This one gives it a chip's output pin. The TTP223 drives SIGNAL both ways: to VCC when the pad is touched, to GND when it is not. That is called a push-pull output, and it means the HIGH your pin receives is whatever the chip runs on.

So VCC is not only the block's supply. It is the voltage your pin sees on every touch.

VCC sets the HIGH
Your board
The block's VCC pin goes to
Untouched
0 V
Touched, about
3.1 V
LED
about 1.1 mA
Chip runs on
2.0–5.5 V
Touched, SIGNAL sits at about 3.1 V: VCC, less a little the chip's output loses lighting the LED. That is inside the ESP32-S3's range and clear of the 2.475 V it needs to read HIGH. Untouched, the chip drives it to 0 V. This is the wiring.

The bar sits a little under VCC. The chip's output is also lighting the LED, about 1 mA on 3.3 V, and a small output transistor drops a little voltage carrying it. The figure works that out from the one output figure the datasheet gives, 4 mA at 2.4 V from a 3 V supply; it is an estimate, not a measurement.

3V3 beside a 3.3 V board

An ESP32, an ESP32-S3 and a Raspberry Pi Pico run their pins at 3.3 V, and none of them is built to take 5 V. Pick 5V in the figure with one of them selected: it reads HIGH, the touch works, and the pin is past its rating every time. That damage is slow and it does not announce itself.

Connect VCC to 3V3. The chip is rated for 2.0 to 5.5 V and behaves the same from it; the LED is a little dimmer.

5V beside an Uno

The Uno's pins run at 5 V, so its 5V pin is the right supply. 3V3 is the one case where the output's small drop matters: the Uno needs 3.0 V to be sure of HIGH, and SIGNAL reaches about 3.1 V. It should read HIGH, with nothing to spare. Use 5V.

VCC left off

With VCC unconnected the chip is not running and nothing drives SIGNAL. The pin usually reads LOW, though a line nothing drives can wander, and the LED stays dark whatever you do, which is the quickest way to tell this apart from a sketch problem.

When it does not work

Can I power it from 5V next to an ESP32?

No. Touched, SIGNAL carries nearly 5 V to your pin, and the ESP32's pins are built for 3.3 V. It will seem to work, which is the problem: the pin is past its rating on every touch. Connect VCC to 3V3. The chip runs on anything from 2.0 to 5.5 V and works just as well from it.

Will it work on an Uno from 3V3?

It will usually read HIGH, but only just. The ATmega328P needs 3.0 V to be sure of HIGH, and with the LED lit SIGNAL reaches about 3.1 V from a 3.3 V supply, worked out rather than measured. Use the Uno's 5V pin and the margin is well over a volt.

I left VCC unconnected and it never reads touched.

That is what should happen. The chip has no power, so nothing drives SIGNAL HIGH and the LED never lights. Connect VCC and it works.

Can the 3V3 pin of my board supply it?

Easily. The chip draws a few microamps and the LED about a milliamp while the pad is touched. Any board's 3V3 pin has far more to spare than that.

Where this goes next

Three wires and a sketch that prints what the pad says.

The first touch →

Edit this page — content/books/tp223-touch-sensor/vcc-sets-the-high.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 →