touchRead values going backwards?

Status
Not open for further replies.

dgarcia42

Well-known member
I'm playing around with touchRead - one thing i'm noticing is that my values are going -down- when I touch the wire, not up. I have a wire attached to pin 23, and if i have a 10pf capacitor between the pin and ground, and my reads are consistently around 1400, and when I touch the wire, the reads go down to about 400.

Also - any recommendations for being able to sense touch through ~1/8" clear plastic - the wire seems to want physical contact? (Possibly with an led placed in the same spot).
 
Is this thing powered by a laptop that's running from batteries?

Capacitive sensing depends heavily on grounding. I've never seen the reading go down... but then it might be possible if there's no ground connection. Still, seems pretty strange.

Anyway, the first thing I'd look at is the grounding. Generally, you either need Teensy to be connected to an earth ground (which is usually the case with any desktop computer while the USB cable is plugged in), or you need Teensy's ground connected to metal the user is touching (like the back surface of an hand-held enclosure).
 
Weird - the usb is plugged into a laptop, however it is by way of a powered hub. When I plug in an external power supply as well, I still get the values going down - I just grabbed the latest teensy build this morning. Also tried some other pins, same thing.

Is there anything else that I need for the hookup beyond just a wire (and possibly, a capacitor?)
 
I was seeing this backwards behavior as well in a setup where I have the Teensy connected via USB and powered by a DC adapter. I have a capacitive touch sense board I designed for testing Atmel's QTouch library a while back that I thought would work fine with the Teensy as well. It's basically a test bed consisting of a bunch of circular electrodes of different sizes, some surrounded by a ground plane at various distances and others not.

To isolate the problem, I downloaded the latest Teensyduino and simply connected a short wire to one of the Teensy's touchSense pins. However, the values returned from touchRead don't differ too much before and after holding the unconnected end of the wire, although they do change in the correct direction:

Code:
551
550
560
787  <-- touched
797
803
811
757  <-- released
550
550
550
551

This is nowhere near as drastic as I saw in another post, where the values varied from 2000 to 4000 under similar conditions. Grounding myself or changing pins doesn't seem to do a whole lot to these values. Does anyone have any ideas why this would be happening?

Thanks!
Vishal
 
Status
Not open for further replies.
Back
Top