Shop OBEX P1 Docs P2 Docs Learn Events
Touch Sensing — Parallax Forums

Touch Sensing

JasonDorieJasonDorie Posts: 1,930
edited 2011-02-27 09:04 in Propeller 1
While playing with the RCTime code in my cutting board clock project (see here) I noticed that when I touched the LED I was using as a light sensor, the time values jumped around a lot.

I then tried removing the LED altogether and just told the RCTime code to spit out values as I touched a bare, ungrounded pin on the Prop. I assume that the Prop pin will hold a charge for a short time if you set it as an output and then try to read it back, and that me touching the pin was bleeding off that charge, because there was a very clear difference in the output times when I touched the pin vs when I didn't.

For my cutting board clock, I bought a capacitive touch-sensor IC. I want to make the bolts holding the case together act as the buttons for setting the time. The IC I got is obviously made to do exactly this kind of thing, so my question is, do I need it, or could I just run wires from the Prop pins to these bolts and use the RCTime method to detect contact? It appears to work, but how safe is it for the Prop? I assume I need to worry about ESD, and if so, would putting a simple resistor inline with the pin protect it?

I'm all curious now.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-02-26 17:42
    I posted touch sensing code in the Completed Projects forum some time ago, both in Spin and in assembly (here). This uses a 1 Meg resistor between two Prop pins. The capacitance sensing occurs on one pin (with no protective resistor), but you could use a 10K resistor easily. Remember that the sensing wire is insulated except for where it's connected to the Prop pin and anything it's connected to should be insulated
  • bill190bill190 Posts: 769
    edited 2011-02-27 08:56
    Here is a paper (for another micro) which discusses cap touch button/trace design...

    Layout and Physical Design Guidelines for Capacitive Sensing...
    http://ww1.microchip.com/downloads/en/AppNotes/01102a.pdf
  • AleAle Posts: 2,363
    edited 2011-02-27 09:04
    I have been asking myself if the propeller could be used for touch sensors. There are several methods and the one I'am interested in is the matrix. It needs an analog comparator according to the info I saw for uChip and Atmel. Maybe the threshold of the input can be used... some testing is definetely needed as well as a board with a usable matrix.
Sign In or Register to comment.