Shop OBEX P1 Docs P2 Docs Learn Events
Pushbutton Trigger Distance — Parallax Forums

Pushbutton Trigger Distance

T2T2 Posts: 7
edited 2008-08-24 21:05 in BASIC Stamp
I am using a Basic Stamp to control a halloween prop. Want to use a handheld pushbutton to trigger the prop. I want the prop to be approximately 30 yards away. How should I build this circuit? Should I have the input high and when I push the button it goes low or vice versa? Can I run it off the 5 volts powering the stamp? Any help in understanding what to do and why is appreciated.

Terry

Comments

  • JonathanJonathan Posts: 1,023
    edited 2008-08-24 15:55
    Terry,

    Should be simple. You need a current limiting resistor and a pullup resistor.

    ·Check out the "button" command in the PBASIC help for a schematic and more info.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • Mike GreenMike Green Posts: 23,101
    edited 2008-08-24 16:04
    30 yards is a bit of a distance and you'd like some isolation and protection from noise. The simplest thing to do would be to use a green LED with a forward voltage of around 2 to 2.5V and connect this from a Stamp I/O pin (LED anode) to ground (LED cathode). You'd use a 100 Ohm resistor from the Stamp I/O pin (and LED anode) to the pushbutton cable and another 100 Ohm resistor from the pushbutton cable to +5V. When the pushbutton is open, the Stamp pin will read LOW and there'll be some protection against noise. When the pushbutton is closed, the LED will turn on and the Stamp pin will read HIGH. The LED will ensure that there's some current going through the pushbutton (10-20mA) and will give you an indicator.

    Make sure not to try to light the LED using the Stamp pin as an output. There's no current limiting resistor for the LED that way. You normally want the resistors in the leads to the pushbutton because that's where you want the protection.

    Post Edited (Mike Green) : 8/24/2008 4:10:43 PM GMT
  • T2T2 Posts: 7
    edited 2008-08-24 20:49
    Mike,

    Thanks for the response. I wasn't sure if the pin would see high running 5 volts over 30 yards away. My basic stamp is located at the halloween prop and I just have the trigger in my hand.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-08-24 21:05
    By using an LED, you get an indicator and you're assured a significant amount of current through the cable and the pushbutton. Because the LED acts a bit like a Zener diode by conducting with a roughly fixed voltage across it, you get some protection for the Stamp pin as well.
Sign In or Register to comment.