In this article I have explained how to connect and use the TTP223 capacitive touch switch module. These modules work using 2.5V to 5V. They are all pre-debounced, all you need is to provide the DC supply across the VC and GND terminals, and you get an output in the middle.
So it is really that simple, you just have to give a +5V and ground, and touch the touch pad, and the output responds to your touch operations.
Main Electrical Specifications
- Operating Voltage: 2.0V to 5.5V DC
- Operating current: @VDD=3V, no load, SLRFTB=1. At low power mode typical 1.5uA, highest current usage is 3.0uA. At fast mode this is around 3.5uA and maximum current around 7.0uA@VDD=3V, no load, SLRFTB=0. At low power mode the current consumption could be around 2.0uA and a maximum of 4.0uA. While working at fast mode current intake is around 6.5uA and maximum is 13.0uA.
- Output Type: Digital (open-drain or push-pull)
- Sensitivity Adjustment: Sensitivity can be adjusted by attaching an external capacitance(0~50pF).
- Response Time: max ~ 60mS in fast mode, ~220mS at low power mode @VDD=3V
- Output Pulse Length: Specified in the datasheet
- Power Consumption: Low
- Dimensions: 15mm x 11mm
- Operating Temperature: -20 ~ +70 ℃
- Trigger Mode: Toggle or momentary
- Noise Immunity: May have noise reduction features
- Interface: VCC, GND, OUT
It Works Capacitively without Physical Touch
Actually, you don't even have to make a direct contact with the touch pad. If you put your finger pretty close to the touch pad, the output toggles ON or OFF.
That means you are able to put it behind a case, or an external cover and still switch the device ON/OFF by touching the case just above the touch pad externally, without making a physical contact with the touch pad.
TTP223 Pinout Function
Now let's take a closer look at this TTP223 capacitive touch switch module, and understand its Pinout functioning in details.
As shown below, on the flip side of the board we can see a touch pad.

Next, as shown in the next image below, if you turn the board around, it shows the labels for the various pinouts for the relevant connections.

So as we can see, we have a ground supply terminal, an output terminal in the middle, and a VCC input terminal on the left side.
The VCC pinout will need a +2.5v to +5V power. The I/O output pin by default will generate a low signal or a 0V signal, until you touch the pad on the other side of the board.
As soon as you touch the pad, or bring your finger close to the pad, the I/O pinout will give you a high signal, which will equal to +5V or the voltage that's supplied on the VCC terminal.
We also see a resistor and an LED soldered on the TTP223 board. This resistor is marked as 121, which means it is a 120 ohm resistor.
The LED is a red LED which is actually quite useful as it quickly lets you know when the I/O output changes state and goes high, in response to a touch on the touch pad.
We can also see pads labelled A, B and another empty pad on the right side without any label.
These serve as additional functionality for the TTP223 module.
So I have explained how these jumper pads can be used to modify the working attributes of the module.
How to Connect A and B Pads
When you join or short the pads labelled A, then the output I/O will always be high once power is switched ON. It will turn low or 0V as soon as the touch pad is touched.
It will stay low as long as the touch pad is in contact with your finger, and will turn high once the touch is removed.
So basically it reverses the default I/O output specification of the module in the opposite direction.
Shorting the pads B converts the TTP223 module output into a flip-flop toggle mode.
Therefore, now when the module is powered and you touch the pad, the output will alternately turn ON and OFF (flip/flop) in response to subsequent touching of the touch pad.
The third jumper pads on the right side without any label can be used to reduce the touch sensitivity of the TTP223 module.
You can try connecting any ceramic capacitor below 5nF across these pads and reduce the sensitivity to some degree.
This means, now the touch pads sensitivity will reduce and will not respond if your finger is at some distance away from the pads.
Use TTP223 with a 12V Relay and 220V Loads
If you want to connect a 12V relay with a TTP223 output, you can configure a relay and the TTP223 module as shown in the following diagram. Using this setup you can easily switch any 220V load ON/OFF with a TTP223 module.

The 12V DC is reduced a 4.7V DC for powering the TTP223 module through a 4.7V zener diode and a 4.7k limiting resistor.
The I/O output is configured with a BC547 transistor which drives a relay on its collector side using the 12V DC.
If you want to use a 5V relay, then you can eliminate the upper 4.7k resistor and the 4.7V zener diode, and connect a +5V supply directly to the relay and the VCC of the TTP223 module.




Comments
Please give calculations of base resistor of 4.7k and also of power supply rail resistor of 4.7k
Transistor base resistor can be calculated as explained in the following article:
https://www.homemade-circuits.com/how-to-make-relay-driver-stage-in/
The zener diode resistor is not critical and can be any value between 1k and 4.7k. More details are given in the following article:
https://www.homemade-circuits.com/how-to-calculate-zener-diode-resistor/
and if I check voltage without ttp223 at the vcc and gnd its 5.3 and at i/o and gnd its 0.7v and if I connect multimeters red wire with the i/o and gnd its stars and it won’t turned off until I remove the red wire from the i/o pin !!!
No need to check the voltages, just check the working of the circuit with a load. You can provide me the link of the circuit diagram which you ae using I will try to suggest.
https://www.homemade-circuits.com/wp-content/uploads/2024/07/48V-heater-controller-circuit.jpg
no no sir you are getting it wrong it’s getting 5v or some but in 24v it’s working perfectly but in 48v it’s not ! in both cases we have 5v for the ttp223 module with the help of 5v zener diode and 10k resistor which is directly connected to the 48v or 24 v positive line ! and as you can see 10k is connected to the i/o to the bc546 is changed with the 1k and at the vcc we have changed 1k to the 10k and connected to the 48v or 24v directly so this helps to step down 5v for the ttp223 module ! we don’t need external module for it ! right now we are facing issue which is nonsense to me like we are getting same voltage and all the things in 48v version but it’s not responding as it was doing it with 24v . !!!!!
Neeraj,
I think the 10k resistor is limiting too much current to the TTP223 module, and that is why it might not be working correctly.
Please try powering it separately from a USB 5V and check the response.
automatic on is happening with ttp223 and what’s the cmos !?
who can I enable it ? what’s the circuit
specifications?
Then the problem is with the TTP223, it is not stable with 48V supply step down.
CMOS ICs are ICs which begin with 40xx for example 4017 IC:
but these circuits also work with 12V only.
Keep trying with TTP223, connect a 100uF across its +/- supply inputs or the 4.7V zener diode and check the response.
yes sir i have connected zener diode but i have a question right now I have connected several resistor to make it 24.7k and now I wanna use only one resistor in vcc should I go for 25k ? resistor?
Sure, the combined resistor value can be made into a single resistor. You can start with a 22k resistor first and then increase it slowly until you find the most optimal one.
sir there might be mistaken in my previous comment ! it’s 24.7k at the vcc which have connected directly to the 48v and at the i/o and base of the bc546 it’s 4.7 k !
Neeraj, that’s great, glad it is somehow working now. Did you connect the 4.7V zener diode also?
sir I think I have seen a pattern of i connect this TTP223 module with the 5 v supply and also with led in series and if I carry it closer to the temperature circuit then mysteriously it’s turnd on almost 7cm far how ? i have not connected it’s connection to the temperature circuit but still it’s turns on !???! and also if I take it to the closer to the SMPS !
Neeraj, please connect a capacitor between the base/emitter of BC546 in your temperature controller circuit and now check the response again, the automatic switch ON should stop happening.
nope nothing worked same as before i have tried every scenario and the effects are same as before now I’ve decided to get rid of this touch module and go for metal which will be directly connected to the base for bc546 ! do I need any resistor between metal and base of bc546 ?
The BJT method which I had suggested is 100% correct, but not sure why it is not working for you…Whenever something looks doubtful, always verify it by connecting a series LED.
You can try the metal plate with the base of BC546 but it can give false triggering due to noise interference in the atmosphere.
Make sure to connect a 0.1uF capacitor between the BC546 base and ground. You can add a small value resistor, like between 10 ohm and 30 ohm in series with the plate connection…
sir can we use bd140 because it’s a pnp bjt with the 80v capabilities if yeah then tell me the connections !
First try with TIP122 and check the results as explained in my previous comment, then next we can try BD140..
can I use tip122 transistor because this have 100v and 5amp capacity !? if yeah then how to connect it !?
Actually it should be PNP BJT, but you can also try with TIP122 which is NPN….also because TIP122 is too big, you can replace it with some other smaller 100V BJT afterwards.
Connect collector to the +48V supply, base to the 10k from TTP223, emitter to the base of BC546 through a 1k resistor…
and also sir if I check voltage at vcc and gnd only if I connect i/o pin to the bc546 with series of 10k resistor I got 1.3 v ! remember I have not given any voltage to the ttp223 and only connected it’s i/o pin and this works but only if I touch it’s pads
That is completely wrong method and should not be tried…
nope sir it didn’t worked at all the ttp223 behaviour is same as before and now it’s not been able to switch bc546 ! I have a idea can we get rid of this ttp 223 ? because whenever I touch bc546 base with the twizzers it’s stars and also if I only connects i/o pin of this ttp223 and touch it this works and switches the bc546 even if I don’t connect vcc and ground of it !
Neeraj, sorry, it should be actually BC557 and not BC547. Pleas connect the 10k end to the base of the BC557, emitter to the +48V supply and collector to base of BC546 through another 10k resistor. But BC557 cannot handle 48V so I think you should use some other PNP BJT with this configuration rated at over 48V…
If you think just by touching the BC546 base you can switch ON your controller, then you can try that…we had earlier already discussed about this method before but due to some reasons you changed the decision and decided to use TTP223.
sir I have tried external 5v supply and the results were like this !
* after connecting i/o pin with the series of 10k resistor to the bc546 touch module stayed on and it won’t let the circuit turned off after some minutes later the touch module led turned off but still it won’t let temprature control circuitry off and the range of capacitive have increased automatically so much and some times this touch module turned on automatically and off automatically! i also have connected 100uf capacitor to the ground and vcc of the ttp223 but still issue remains unsolved
OK, in that case we can try an external BC547 configured between the 10k end and the BC546 base. But now the ON/OFF touch response will become opposite, which I think is not an issue.
Connect the 10k end to the base of the BC547, emitter of BC547 to the common ground of the 48V system and the TTP223 board, and the BC547 collector to the base of the BC546….now check the response…
I hope you have connected the grounds of the TTP223 and the temperature controller board together in common…which is a must..
sir I have seen youtube videos that you can also add bc547 transistor to make it more stable ! is that true ? and if we connect it’s output pin directly to the bc546 base then ? or we can connect bd140 transistor also for switching if bc546 won’t work?
Neeraj, We already have the BC546 in your design so where will you add another BC547?
If you the output directly to BC546 base, the BC546 will burn due to absence of current limiting…
BD140 is already configured with the B546 in your design…
did you test TTP223 response with an external 5V supply after configuring it with your 48V system?
sir nothing changed same as before! actually to clear all the doubts I have separately made a circuit with 5v zener and 4.7k resistor and capacitor and connected it with the 48v directly and i/o pin to the. bc546 base with the 4.7k resistor but this was same as before same issues!!!! can we make something which can literally reduce voltage and make it more stable and easy to switch? we only need a fraction of the voltage just to start the temperature module it’s working even with the touch of the finger to bc546 base !
Neeraj, to reduce voltage efficiently, buck converter is the only option, there’s no other easy way…
Did you check your circuit with 5V from an external power supply, without using the 4.7k and zener…is it working??
and if I use 10k at the vcc and 4.7k at the base of the bc546 then this module works 80 percent good but still automatically on is a problem
automatic ON is happening without TTP223 connected or with TTP223 connected??
actually yeah I think we are exeding it’s voltage level because we are giving it 5.4 v and idk how much amps ! and also it’s maximum limit is 5.5v ! and also there might be some issue with the bc546 resistance value which is connected to the i/o pin ! in my opinion we can reduce voltage by changing 10k and 5v zener diode and to change its madly behaviour we can implant some between i/o and bc546 or as you said earlier change the whole stuff !
You can try reducing the supply 10k resistor to 4.7k or 2.2k 2 watt and also make sure to connect 100uF capacitor across the zener diode…it should do the trick…
there’s no other easy option than TTP223 in my opinion…
and somehow it’s starts working with the 48v after the desired temperature reaches the temperature circuits turns off and the this happens like it’s switchs rapidly automatically without any touch until its on again
good morning sir as you said to use 5v i did but still the same issue at the 5v with the phone adaptor ttp223 worked perfectly but then I connected the i/o pin to the circuits i/o it didn’t worked at all I don’t know why ! and then I tried some experiments like i replaced directly connected 10k to the 4.7k and then I also replaced 1k which was connected to the base of the bc546 to the 4.7 and now it’s working but not perfectly at all some of the modules works but most of them fails and the issue with the self switch on is not resolved at all whenever I turn on the circuit the ttp223 on automatically!!
Good morning Neeraj, It is difficult for me to troubleshoot your TTP223 problem because I cannot test it myself, and also because you are using a 48V as the supply.
If you are using a separate 5V for the TTP223 module and still the circuit is having problems with the temperature controller circuit, then it is difficult to judge the issue without a practical checking.
You can try using an opto coupler between the TTP223 output and the base of BC546 a check the results, or simply quit the TTP and create a CMOS IC based touch switch circuit.
sir as you said how to connect led and check ttp223 can you tell me again! because your previous comments is not visible in lm35 temprature control blog ! sorry!
Neeraj,
The comments might take 4 hours to become visible… due to caching, sorry about that.
Connect LED anode to OUT of the TTP223, cathode to 1k resistor, and resistor end to ground. Now check the response by touching the touch pads.
and when this blinking was happening the voltage between vcc to gnd was 3.8v and vcc to i/o was 2.6 to 2.8 v ! and it’s blinking all the time !
hello sir I hope your remember our lm358 temprature control circuitry with lm35 temprature and also with ttp223 touch module which was connected to the bc546 but now when I replaced the old ttp223 with the new one it’s became a nightmare for me its responses because worst now it like if I touch my fingers to its surface then it’s starts the circuit but after few seconds it’s led blinks madly don’t know why and also if the desired temperature have been reached this ttp223 won’t let the circuit turned off because of its blinking and also I have tried several ttp223 all of them have the same responses why ? I have connected 1k in series to the bc546 and i/o pin and the supply voltage for the touch module if 5.4 v sir please help pura circuit ho gaya tha but ye touch module ne sab bigad diya please help
sir it’s weird some of the touch module was faulty but some of them were in a good shape and worked perfectly but the catch is they are working perfectly only on 24v input at the temperature circuit and if I use 48v which is required for the heater this touch module won’t work at all I don’t know why ?! in 48v modules reaction was like automatically on and off all the time even if you won’t touch it !!! how can I solve it ????
Neeraj, the TTP223 are designed to work with 5V DC and so you must step down the 48V to 5V. Maybe this is the main issue why your TTP is not working correctly.
For converting the 48V to 5V you can try the following circuit:
https://www.homemade-circuits.com/adjustable-1-2v-to100v-dc-buck-converter-circuit-using-lm5164/
Hi Neeraj,
Yes I remember…
Did you check the two circuits separately?
Please check the working of the two circuits separately and check their responses, and then join them carefully and check again at what point the touch switch stops responding?
there’s only one circuit sir !!! not two ! and can I have simple circuit to check the ttp223 ?
One circuit is your temperature controller circuit, the other one is the TTP223 circuit…so you circuit which you must confirm separately first.
The TTP223 is a simple circuit itself, what is difficult in it?
Hi Swagatam, Connected a 10 K resistor to pin 3 of TTP223 and the other end of resistor to ground. Connected VCC of TTP223 to +5v and ground pin of TTP223 to ground. Momentary +5v to pin 3 of TTP223. Nothing happens. Momentary +5v to ground side of 10K resistor. Nothing happens.
Thanks Norman,
Then how do we use the pin#3 to manually toggle the IC output? If it is not working through a manual option, then how can be expect it to work through an external source?
So finally it seems it is better to go for the 4017 option.
Thanks Norman, what happens if you toggle the pin#3 with +5V through an push-switch manually, with a 10k resistor connected between pin#3 and ground?
It would be interesting to know what is causing the timeout?
The 4017 option could be used ultimately to solve the issue, afterwards…