View Full Version : touchRead values going backwards?

03-13-2013, 04:23 PM
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).

03-13-2013, 06:20 PM
Well this video shows it's possible, though it's a different product. I think they're trying to sell their ucontrollers so there aren't a lot of details. My guess is the conductive adhesive is probably the key to making it work through relatively thick plastic.


03-13-2013, 07:13 PM
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).

03-13-2013, 07:54 PM
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?)

03-15-2013, 01:00 AM
Ok - I managed to get it working - all i had to do was put a metal plate underneath my attempted capacitive buttons and then tie that to ground. For reference some of the notes here - http://www.planetanalog.com/document.asp?doc_id=527410 - were helpful, and now I have something that appears to decently self-calibrate and capture presses/releases.

03-26-2013, 10:05 PM
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:

787 <-- touched
757 <-- released

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?