Looking for capacitive touch sensor

Hi, I am Lily. I would like to know is there any capacitive touch sensor works for my project?

For my project, the touch sensor need to be able to detect the user’s palm from a distance around 20-30mm through the 2-4mm plastic housing. In this case, the touch sensor should be sensitive enough rather than only work when touching it. Does anyone have any recommendations? Thanks in advance.


Hey Lily, welcome!

I have a number of capacitive sensors and they all seem to do as you want, that is they get some signal prior to being touched.
I think that you will want to get one that just spits out a capacitance value, then you can fine tune for your application.

I dont have any recommendations on a product, I’m sure Liam or others will offer examples, I just wanted to say that you should be able to achieve what you want.

I built a capacitance based light switch mechanism where, in the dark, if you brought your hand close-ish to the switch it would illuminate the touch sensor so that you could see it to touch the right spot as I had multiple sensors for multiple lights.


Alternatively, is there anyway to increase the sensitivity of TTP223 touch sensor (that’s the sensor I have for now). Because it’s kinda to find any code tutorial for increasing sensitivity. Thanks.

1 Like

Thanks for reaching out. Now I have TTP223 touch sensor. Do you reckon it has the potential to work as I expected? Currently I can only make it work when touching it.

If possible, I’d like to learn more about how can I achieve this for my sensor. (Sorry to ask such a simple question I am really new to Arduino.)

I am interested in the project you mentioned. Would you mind sharing more details with me? Like what touch sensor did you use? Anything would be helpful. Thank you so much.

1 Like

Hi, What module is the TTP223 on? Looking at the data sheet https://files.seeedstudio.com/wiki/Grove-Touch_Sensor/res/TTP223.pdf or https://datasheet.lcsc.com/szlcsc/TTP223-BA6_C80757.pdf it looks like the sensitivity is adjustable based on the sample time and the capacitance between the I pin and the electrode:

The capacitance Cs can be used to adjust the sensitivity. The value of Cs use smaller, then
the sensitivity will be better. The sensitivity adjustment must according to the practical
application on PCB. The range of Cs value is 0~50pF.

But without knowing the board it’s on it’d be hard to tell.

1 Like

No very helpful, I know, but I decommissioned that project years ago, and I have a number of capacitive sensors in my workshop, so cant say for sure what one I used.

Do you have a way that output a capacitance value from your sensor?
That is what I did, I had a raw capacitance reading and I hard coded the capacitance values to perform the actions based on those values.
ie 10,000 to 100,000 was a proximity and <100 was a touch.

1 Like

Thank you for reaching out! Really appreciate it.
I am using the arduino uno board. Is it possible to do so with Uno?

1 Like

That’s totally fine! This is super helpful already.
I haven’t tried any way that output a capacitance value from my sensor. Maybe I should give it a try.
Thank you so much :slight_smile:

1 Like

Hi Lily,

Welcome to the forum!!

I had a quick look at the TTP223 and couldnt find anywhere to change the sensitivity in software, Doug found the part Re: changing around the hardware side of things

I’ve used the PiicoDev Capacitive touch sensor (With an RPi Pico, not an Uno) on a couple of projects - it features software-controlled sensitivity, though I’m not certain if it’s able to detect a hand from around 30mm through the plastic.

Do you have a link to the sensor you currently are using? Note - you can also solder a wire to the touch pad to navigate it through your project, this can affect the sensitivity though!

Sorry, I meant the actual touch sensor board. Depending on the touch sensor board it may not be possible to make it work.

It might help is you include a drawing or photo of your setup

Thank you so much Liam.

Yes, I probably can give a try.

I purchased my touch sensor on eBay. Here is the link:

Sorry I misunderstood it lol

Here is the touch sensor I have for now:

The link to datasheet:

That’s how the whole circuit looks like:

Please tell me if need any further informations.

OK, I think I I understand. There’s nothing you can do in code, it’s only got power, ground and data out. All the configuration is in hardware.

I found these that look like exactly the same sensor:


The image you shared looks like it doesn’t have a capacitor on it so I think that means maximum sensitivity, but the data sheet isn’t clear:

Under other conditions are fixed. When do not use the Cs to VSS, the sensitivity is most sensitive. When adding the values of Cs will reduce sensitivity in the useful range (0≦Cs≦50pF)

The second page does give some useful info on what the “A” and “B” jumpers do.

1 Like

Thank you. It seems that I have nothing to do with the code and the capacitor. But I still can try to extend the touch area with conductive material to increase the sensitivity hopefully?

A & B seems to control the working mode. I may just leave as it is since I want it be like:

A and B both open: The default value of the output pin is LOW. When the sensor is subjected to touch, the output is HIGH, and when no touching detected, it becomes LOW again.

Thank you so much again : )