Capacitive touch on a handheld device?

Status
Not open for further replies.

djsz

Well-known member
I am working on a project with T3 that will ultimately be handheld and battery-powered in a plastic case. I'd like to add a capacitive button to the case via the T3's TouchRead pin/function, and I'm having trouble figuring out how/where to place the ground plane to enable true capacitive sensing. When this device is connected via USB to a computer the sensing works pretty well (since ground eventually makes it to the power line's ground--Paul noted this in an earlier post). However, I don't know how to avoid floating input when the user is holding the device, preferably without exposed metal.

Any suggestions? I'm far from an EE and exhausted my own knowledge once I plugged in the wire...

Thanks!

Dave
 
I assume the user would be holding the device in one hand, and touching the button with the other hand. So you would supply a large-ish area of "ground" underneath the plastic as close as possible to wherever the user will be holding it. But actually you want to have AC-ground just about everywhere except for the touch pad area itself, otherwise you have a radio antenna and it will be more subject to noise and RF interference. I say "AC-ground" because for the purposes of touch sensing, anything that is well capacitively coupled to ground is effectively ground. So the +Vcc power supply works like ground in this case (what counts is ground for AC signals, not for DC).

Touch sensor layout is something of an art form, google for "touch sensor app note" to see some more advice.
 
Last edited:
A quick look at body capacitance when body is floating electrically, approx 125 pF.

Dave,

I just did a quick look at how much capacitance increases when I touch a wire connected to a touchPin vs. when I don't touch it. If I'm remembering my physics, a conductor, even one not close to another conductor to form a traditional capacitor, has some capacitance -- essentially with respect to the rest of the universe. Here's wikipedia's entry for self capacitance http://en.wikipedia.org/wiki/Capacitance#Self-capacitance
That entry gives a formula for the self capacitance of a sphere. With the constants plugged in, the calculate 20 pF for an ideal conductive sphere 20 cm in radius. Apparently I am reasonably approximated by six such spheres. Who knew?

Here's what I got from touchRead():

before = (before touching the wire, I had the protoboard, the wire and a 22 pF (nominal capacitor to gnd.)

1961
1962
1963
1963
1961
1960
1964
1964
1965
1965
1969


(Conditions as before, except now I'm holding the bare end of the wire firmly between finger and thumb, and the rest of me is farther away from the wire, teensy3, etc. and I'm not touching ground -- plastic chair on a wood floor)

after =

4019
3943
4495
4319
4593
4633
4666
4869
4791
4640

octave-3.6.2.exe:19> (mean(after) - mean(before))/20

ans = 126.67 (in picoFarads)

You should try some measurements yourself, but you may be able to get away without a groundplane if you can use bare conductors, like the heads of pan-head screws in a plastic case. Expect more noise, but that might be tolerable for your application.

Hope this helps,

Larry
 
Status
Not open for further replies.
Back
Top