Shop OBEX P1 Docs P2 Docs Learn Events
Bs2 i/o — Parallax Forums

Bs2 i/o

Johnny-5Johnny-5 Posts: 34
edited 2007-04-14 17:41 in BASIC Stamp
The BS2's I/O pins accept High and Low input right? So why is it that you cant just wire a switched 5v to an input and read the switch activity? The whisker schematci from the boe-bot book uses 2 resistors and send a High (5V) signal constintly and the whisker actually shorts this curcuit to bring it Low.... Why couldn't it be Low all the time and go High when switched?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-04-14 17:18
    You could reverse the switch circuit so that the I/O pin is low normally and switched to high. That works just as well. You do need the resistor attached to the "off" voltage because the I/O pin "floats" if its not connected to some voltage source and it becomes very sensitive to induced voltages like static charges and very low levels of AC induced in adjacent structures or nearby wires. If you bring your finger nearby to a wire connected to a Stamp pin set as an input, the Stamp might see some on/off pulses.
  • skylightskylight Posts: 1,915
    edited 2007-04-14 17:22
    Mike Green said...
    You could reverse the switch circuit so that the I/O pin is low normally and switched to high. That works just as well. You do need the resistor attached to the "off" voltage because the I/O pin "floats" if its not connected to some voltage source and it becomes very sensitive to induced voltages like static charges and very low levels of AC induced in adjacent structures or nearby wires. If you bring your finger nearby to a wire connected to a Stamp pin set as an input, the Stamp might see some on/off pulses.
    Could be useful as a touch switch? with correct size plate.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-04-14 17:41
    There are some DIY touch switches based on CMOS gates that work that way. You do need a high value (100K to 1 meg) resistor to protect against static discharge. Try doing a websearch for touch switch circuits. Here's one example. It doesn't include a schematic, but you can derive it from the PCB and parts layout: www.ramseyelectronics.com/downloads/manuals/TS1.pdf

    Here's a link for a different idea using capacitance from an insulated touch plate rather than induced voltages: www.bytecraft.com/Touch_Sensitive_Switch.

    Post Edited (Mike Green) : 4/14/2007 5:46:58 PM GMT
Sign In or Register to comment.