ohmio

Circuits / Sensors

Touch module toggles an LED

In toggle mode each touch flips the TTP223's output; its pin can drive a small LED directly, if the resistor keeps the current under the 4 mA its high level is guaranteed at

Touch module toggles an LED, simulated on a breadboard

Tap a part to see its voltages and currents. It is a model, not a measurement.

What do you need?

The AliExpress links are affiliate links: if you buy through them ohmio.dev gets a commission, at no extra cost to you. Affiliate links

This page is a guide: the numbers come from a simulation, and real parts vary. Check your parts before you power the circuit. Safety and responsibility

How does a touch module turn an LED on and off?

The TTP223 chip senses the tiny change in capacitance when a finger nears its pad. In toggle mode each touch flips its output and letting go does nothing: touch once and the LED lights, touch again and it goes out. In the model the output answers about 0.22 s after the touch, and it sits at 0 V at rest. The output pin is weak, and its high level is only guaranteed up to 4 mA at 2.4 V (datasheet, at 3 V), so the resistor matters. On 3.3 V, with R1 at 470 Ω the red LED takes 2.7 mA and the pin holds 2.89 V, above that 2.4 V. With 330 Ω the model gives 3.45 mA and 2.78 V: still inside the limit, with less margin. On a real board, keep your finger off the pad at power-up: the chip calibrates in its first half second.

Values from the Protoboard ISO simulation: a model, not a bench measurement.