Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: advice about touchsensor setup

  1. #1
    Senior Member
    Join Date
    Dec 2016
    Location
    EU
    Posts
    217

    advice about touchsensor setup

    Hi

    I'm using the touch sensor capacity of the teensy LC and also plan to use an adapted version of fasttouchRead for extra pins.
    I have some questions about pulling the touchpads to ground and a ground pad to ground. All sensors have a plastic foil over them, no direct bare touch. Teensy is embedded in a plastic enclosure.
    The system is connected by USB keyboard emulation and USB cable to a computer, which can be a battery powered laptop.

    A) FastTouchRead uses :

    pinMode(pin, OUTPUT_OPENDRAIN);
    digitalWrite(pin, LOW);

    --> I suppose that this gives a short peak current which is way above 5mA. Given the low capacity of the pads this doesn't seems to given problems. Works without resistor and I also tested it with a 100 Ohm resistor in series directly on the Teensy.

    B) When using touchRead() I use :

    pinMode(pin, INPUT_PULLDOWN);
    delayMicroseconds(5); // Test gave about 5T= 3Ásec for not touched sensor and about double for a touched one (2T is about 13% V)

    Slower, but still very fast for a HMI device. (I want the not sensing pad to be pulled to ground instead of floating.)

    C) I have also a ground "pad/surface" connected directly to ground.

    My questions :

    1) Is it safe -for the Teensy- to keep using the output open drain method without a resistor in series to limit the peak current? If not any suggestion about the size, 660Ohm seems a bit over secure?

    2) after the initial pull down, which is safest : A) or B) and would adding a small resistor in series give significant extra protection?

    3) Should I add a resistor in C) aka between the ground pad/surface and the Teensy ground pin?

  2. #2
    Senior Member
    Join Date
    Dec 2016
    Location
    EU
    Posts
    217
    Has someone expirience?
    I know not enough of the hardware side of things.

    I founds some references to adding a 50 Ohm resistor as protection for touchpads...

  3. #3
    Senior Member
    Join Date
    Dec 2016
    Location
    EU
    Posts
    217
    Unfortunately no answers. Is this so exotic?

  4. #4
    Member
    Join Date
    Nov 2012
    Location
    Portland
    Posts
    67
    Anecdata: I have done a few touch keyboard interfaces (PCB with solder mask, no resistors) and I have never had a pin go wonky from static discharge or having to source "high currents" to bring the pin up to the reading state. I'm sure one could design a case study for any micro involving kids, scuffed feet, and wool carpet in a 0% humidity environment (or Tesla coil adjacent) which would require more ruggedization. One could also design any PCB with a spot for a resistor, then place 1 ohm resistor or a wire if it turned out not to be needed.

    I used this library; it is hardware generic, doesn't specify external resistors, and responds fast enough that I don't have to faff with any board-specific libraries if I change the underlying micro: https://github.com/adrianfreed/FastTouch

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •