View Full Version : Making pin 'virtual ground'

04-13-2007, 04:35 PM

Is there a way to tie an IO Pin on the STAMP to ground? (through coding, not a physical connection http://forums.parallax.com/images/smilies/smile.gif )

I am trying to control a device using the basic stamp that requires I short two wires. After some thinking, I realized this is not possible on the stamp without the use of a relay. I investigated the device I am controlling and found one of the wires is the same as ground.

So, this means that if I can ground the other wire, I make the 'connection' that I need, and activate the corresponding function on the device.

So, long story short, is there a way to make one of the STAMP's pins look like ground?

I am not in my lab at the moment, so I apologize about posting this idea without testing it first, but:

If I set a pin on the STAMP as an input, will it look like a virtual ground that flows very little current?

Is there some other way I could do this without the use of a relay?

Thank you in advance,

04-13-2007, 05:09 PM
LOW,0 'makes pin 0, ground
HIGH,5 'makes pin 5, 5 Volts
INPUT,3 'makes pin 3, open

04-13-2007, 06:37 PM
Keeping in mind you cannot allow too much current to flow. As long as the controlled device draws something in the order of 20 mA everything should be fine.

Tom Sisk


Chris Savage
04-13-2007, 09:32 PM
Why not use a transistor to ground the signal? An NPN transistor or N-Channel MOSFET could be controlled from the Stamp I/O pin using a HIGH command to “ground” the other signal, depending on its properties.

Chris Savage
Parallax Tech Support

04-14-2007, 12:38 AM
Thank you for the replies.

It looks like the STAMP can't do it on its own. I tried making a pin low, but it does not activate the device when connected to it - probably not enough current.

I was hoping not to need any other components, but your suggestion seems to be the easiest Chris. Looks like I have to go scavenging for a transistor array!


04-14-2007, 02:24 AM
did you tie the other wire to the stamps supply ground? if the device works by touching the two wires together and one wire is ground then using a stamp to ground the active wire would entail making sure that the devices ground(the one you think is ground)·is connected to the stamp ground for it to work.