Shop OBEX P1 Docs P2 Docs Learn Events
Pressure Sensitive Touch sensor — Parallax Forums

Pressure Sensitive Touch sensor

silverbacksilverback Posts: 40
edited 2010-04-14 21:46 in Accessories
If you need a quick (relatively easy) pressure sensitive touch sensor here is one that worked for me:

I found this sensor detects the following :
no contact
light contact (touching each pad)
higher contact (holding each pad)
highest contact (squeezing each pad)



Code
' {$STAMP BS2}
' {$PBASIC 2.5}
'
' -----[noparse][[/noparse] Program Description ]---------------------------------------------
' Code to use the pressure sensitive RCTime sensor
'
' -----[noparse][[/noparse] Constants and Variables ]-----------------------------------------
'
'
time VAR Word
'
' -----[noparse][[/noparse] Program Code ]----------------------------------------------------
'
 
DO
  HIGH 0
  PAUSE 1000                  'charge the Capacitor
  LOW 0
  RCTIME 1,1, time
  time = time - 10000 / 100  'this is for formatiing of the DEC
  DEBUG DEC time, CR         'used for StampPlot graphing
  PAUSE 500

LOOP

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you convince yourself that something is impossible before you even try; you are sure to prove yourself right.
912 x 684 - 264K
912 x 684 - 297K
912 x 684 - 321K
912 x 684 - 295K
1015 x 600 - 154K

Comments

  • Don MDon M Posts: 1,652
    edited 2010-04-14 12:10
    What program are you using that is producing the oscillograph on your pc?
  • Spiral_72Spiral_72 Posts: 791
    edited 2010-04-14 14:31
    Sweet! Thanks for sharing!

    I'm gonna try it [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "puff"...... Smile, there went another one.
  • silverbacksilverback Posts: 40
    edited 2010-04-14 21:46
    Don, the program is Stamp Plot Pro



    -general circuit update-

    I noticed a fair amount of reverse voltage would show up on the base when I would release pressure on the touchpad that connects to it, so I added a diode (1n4001) in line with the touchpad·to block reverse voltage.






    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you convince yourself that something is impossible before you even try; you are sure to prove yourself right.

    Post Edited (silverback) : 4/15/2010 10:24:44 AM GMT
Sign In or Register to comment.