Detecting Touch with CapSense

I am using the CapSense library to detect in a hand is in contact with a metal coated plastic handle. Although things work generally, the detection is not robust. Sometimes I can touch the handle and is is detected every time. Other times, it fails to detect anything. I only need to detect absolute touch. I do not want to detect something close to the handle.

I have the lead to the handle configured as documented in the CapSense web page. The back side of the handle is grounded and attached to ground on the Arduino. This is not a true ground.

I am using a 1MOhm resister and at this point I don't have a capacitor to filter the input.

Right now I am using a breadboard to prototype. It seems that just lifting the bread board off the table is sufficient to get it to make the detection work.

How can I improve the detection?

Ian

oops

ijourneaux:
Right now I am using a breadboard to prototype. It seems that just lifting the bread board off the table is sufficient to get it to make the detection work.

Do you mean lifting the breadboard off the table trips it, or it works more reliably off the table? If it is a metal table, that would foul up matters with a breadboard.

As far as you are concerned, the Arduino ground is the "true" ground.

xitami:
oops

You can delete your own answers. Just not whole threads.

It is possible that my breadboard has some bad connections. I tightened everything up and things got somewhat better. Unfortunately not perfect yet. I guess I am wondering if there are any design guidelines to optimize the circuit that would feed CapSense (Resistor and capacitor sizes). This will be used in a relatively high humidity environment and I need to guarantee consistent detection of when a hand is touching the handle regardless of how much of the hand is touching.

Right now, if I grip the handle with my entire hand, the detection is usually good. If I just touch the handle with a finger, the detection is less reliable.

Appreciate any guidance.

First, answer Paul__B's questions.

Sorry. As I indicated, it is possible that I had a bad connection in one of my breadboard rows. I veried all of the connections and they are now solid. I wasn't using a meta table. The device was either on my lap or on a glass top table.

My call to ccapacitveSensor is

long total =cs.capacitiveSensor(10);

That seems to producevalue sless that 20 when the handle is not being touched and value s> 150 if it is being touched. I set a theshold of 50 to determin if it is being tocuhed.

That seemed to work ok but when I transitioned to battery power had to grib the handle really hard to get the arduino to detect that it was being touched.

I have read comments that disconnecting from a computer can change the detection but how do you handle the transition.

I think the touch antenna is pretty well designed, The underside of the handle is grounded so that should improve performance.

Ian

Your lap is conductive.

Capacitive sensing is measuring the capacitance between you and the handle, and you and the ground side of the circuit.

When plugged into your computer, the Arduino is grounded to at least an entire computer, and if a desktop, the actual Earth. That is a lot of conductive surface, and so a relatively larger capacitance between it and your body. With the Arduino on battery power, there is very little metal on the ground, so very little capacitance between you and the ground/common of the circuit.

Capacitive touch screens work by measuring the capacitance between conductive transparent traces, not to ground.

What do you mean, the underside of the handle is grounded? If something is electrically connected to the handle and is grounded, then the handle is grounded.

If this is in a box, this is an excellent reason to add a shield connected to circuit ground/common.

It would be more sensitive if the handle were not insulated, because then you'd just have a resistive connection between you and the handle.

Try adding a piece of metal to the circuit ground. A piece of aluminum foil will do for testing.