• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Touch sensor circuit

Not open for further replies.


New Member
I would really like to know how to make a circuit that consists of 4 LED's that must toggle on/off when the TTP223 capacitive touch sensor is touched. I am trying to perform this task without using a Uno mother board but I am stuck.

I am currently trying to use this sensor



Last edited by a moderator:


Active Member
Can not see the image for the type of board, is it the blue one or the red board?

The blue one I've found has LC on the development boards sensor pad.

The red, Touch printed on the sensor pad on the back of the board?

Tho both use a TP223 chip.

TTP223 Pin setting.jpg

Note this chip directly is limited to 8mA sink and 4mA source, not enough to drive a single LED that would require 10mA current minimal.
External transistor would be required to handle the process of current driver.

The TTP223 has a pin setting that can set the output to either sourcing when active (switching on)
or low when switching on.
Meaning that the chip is idle (Off) low, then contact is made that sends the output high, sourcing.


Chip is idle (Off) sending a high value close to the power rail input (near VCC) then contact is made that results in the output going low, sinking.

The 2 pins that do this are the TOG and AHLB pins.

These pins also function the Toggle feature. These 2 pins are integrated functions to the IC. They are combination pins.

TTP223 setting output modes.jpg

0= common GND / Low statement.
1= VCC / High statement.

For toggle mode. ther are two options, initiall sink or source.
This mode is for sourcing a device when the chip switches on. Goes from low to high.
Pin TOG connected to VCC, Device total power is less than 5V.
Pin AHLB connected to GND.

N-Channel BJT or a logic level MOSFET applies here.


This mode is for open drain sinking when the chip switches on. Goes from high to low.
Pin TOG connected to VCC.
Pin AHLB connected to VCC.

P-Channel BJT or MOSFET applies here.

Note that the opposite values when what ever mode selected are high impedance.
there off just with a voltage value possible that could still turn on an external device. these TTPP223 chip types are not rail to rail functional by design.

Example, I choose sourcing in order to drive an N channel logic level MOSFET as this devices output is CMOS.

Setting the jumper pins on the board (that should have them) or may have to acquire them.
Pin TOG to VCC and pin AHLB to GND.
The Q pins output through a 1K Ohm resistor to the MOSFETS Gate, and a 100k Ohm pull down resistor at the MOSFETS Gate to power supplies GND point on the TTPP223's board connection point. The N-Channel MOSFET Drain would be connected to the LED's Cathodes wired in parallel with a current limiting resistor connected the the VCC rail. And the MOSFETS Source pin connected to the GND on the TTP223 board. same place as the 100K Ohm resistor.

I am assuming 20 mA each LED? 80 mA total. a standard 2N7002 would function this, reaching up to 200mA potential per MOSFET Transistor,


==================== This device TTP223 is not best suited for driving a BJT. Unless CMOS levels are maintained. LED driving leaves CMOS levels. The Base drive current would need to be high for a total drive only of 2 LED's The TTP223 would be floored at sourcing, sinking could drive only 3 LED via a P-channel BJT. MOSFETS play out better with this TTP223 chip.

TTP223 power conditions.jpg Note the Input pin Pull high and Low resistor. As far as I can gesture this is supposed to be for the chips pins for proper (no floating pin operation). It covers what pins should have what value of resistor based on which rail that pin would be tied to when selecting options.
However an external device would require an opposing pull up or down resistor to get a stable output from the TTP223.

Caution, the datasheet states that the TOG and AHLB pins should be (when selected LOW) be passed across a resistor of at least 28K Ohm. This may mean that these pins are directly connected P-channel Logic within the chip.

These resistors should be on a development board all ready.

CMOS is lower current functioning in many cases. This TTP223 is a CMOS.
With a BJT, I would need a Transistor with a high forward transfer ratio amplification. Not directly simple.

Now to see if the images formed out correctly.
Not open for further replies.

EE World Online Articles