At 12:17 PM 10/11/01 -0700, Alan Shinn wrote: >Does anyone have any good clues as to how to impliment touch switches? I >rigged something with the output of a 555 on one side of a grid and a >CMOS flipflop on the other grid, worked OK but it still worked when I >turned off the 555 (in some locations but not others) - it was just >reacting to the 60Hz stuff. By the way, I am trying to make it work >through a layer of plastic (scotch tape) for some immunity from ESD >destruction. >-- >Looking forward: >Alan Shinn I have one that I use for museum and interpretive centres - it seems bulletproof (so far). Its based on free-running 555 oscillators with pins 2&6 tied together and fed with a 470K resistor from pin 3. Each sense pad is two 0.75" square pads on the PCB, one on each side. There are no vias between the 2 pads. The frequency is measured and averaged over a fairly long period. Touch is detected when the instantaneous frequency changes dramatically from the averaged period. A single 12c508 handles 3 touch pads and 6 programming jumpers easily. The following notes are taken from the source: ;* Touch switch based upon frequency change in a 555 oscillator caused by ;* human body intrinsic capacitance when touch sensor is contacted. Touch ;* pad is 0.75" square on both sides of a 0.062" FR4 circuit board - acts ;* as a low value coupling capacitor and provides ESD protection. Top side ;* ground plane has 0.05" clearance from touch pad and acts as spark gap. ;* Bottom side of touch pad capacitor is isolated from 555 pins via 10k series ;* resistors and the feedback resistor. ;* ;* Touch pad capacitor is about 2 pF, stray capacitance estimated at 2 pF, ;* human body intrinsic capacitance is 200 to 400 pF (depending upon total ;* area). Because the human body intrinsic capacitance is so much larger than ;* the touch sensor coupling capacitance, the net effect of touching the sensor ;* is to increase the oscillator timing capacitor by the value of the touch ;* sensor capacitance. This results in a dramatic change in oscillator ;* frequency. Touch is sensed by measuring the change in frequency. ;* ;* Shortest possible 2 instruction delay loop takes 767 cycles to execute ;* and is used as the gate timer to allow TMR0 to measure frequency. 555 osc ;* feedback resistor is picked so that TMR0 does not wrap even with 30% ;* component variation. Resistor value of 470k chosen so that free running ;* period is about 6 uS, increasing to 12 uS when pad is touched. Counter ;* wraps if period drops below 3 uS with gate time of 770 uS - good headroom. ;* ;* Switch TMR0 to ext input and clr TMR0. Enable one oscillator for 770 uS. ;* Read TMR0, average with old reading (256 samples). Repeat for remaining ;* oscillators. ;* ;* Each Osc section accommodates reading 2 programmable jumpers (midgies). ;* 1st jumper pulls a 10k resistor feeding the osc enable pin either HI or LO ;* and is read by turning that pin on the PIC into an input. 2nd jumper feeds ;* the osc enable to pin GP3 via a diode or resistor and is read by enabling ;* that oscillator. ;* Hope this helps! dwayne Dwayne Reid Trinity Electronics Systems Ltd Edmonton, AB, CANADA (780) 489-3199 voice (780) 487-6397 fax Celebrating 17 years of Engineering Innovation (1984 - 2001) * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Do NOT send unsolicited commercial email to this email address. This message neither grants consent to receive unsolicited commercial email nor is intended to solicit commercial email. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.