PDA

View Full Version : Bs2 i/o



Johnny-5
04-15-2007, 12:08 AM
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?

Mike Green
04-15-2007, 12:18 AM
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.

skylight
04-15-2007, 12:22 AM
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 Green
04-15-2007, 12:41 AM
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 (http://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 (http://www.bytecraft.com/Touch_Sensitive_Switch).

Post Edited (Mike Green) : 4/14/2007 5:46:58 PM GMT