Shop OBEX P1 Docs P2 Docs Learn Events
help how hookup a relay — Parallax Forums

help how hookup a relay

vw_gtivw_gti Posts: 10
edited 2009-06-15 14:52 in BASIC Stamp
hi im kinda new and i need to hook up a relay to my education bored what pins do u use and is the any thing special to put in the programs

thanks
for your help confused.gif

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-06-14 18:05
    Download Nuts and Volts Column #6 from Parallax. At the end of the column, there's a diagram that shows how a relay should be hooked up.

    In your program, a HIGH <pin> would turn the relay on and a LOW <pin> or INPUT <pin> would turn the relay off. Look at the chapters in the Stamp Basic Syntax and Reference Manual for a description of those statements.

    Nuts & Volts Index: www.parallax.com/Resources/NutsVoltsColumns/tabid/272/Default.aspx

    If you are using a HomeWork Board, there's already a 220 Ohm resistor in series with the I/O pins. You'll need to subtract that from the resistance shown in the Nuts and Volts Column. If you have it, use a 150 or 180 Ohm resistor in series with the built-in 220 Ohm resistor. With the Board of Education, use the 390 Ohm resistor that's recommended in the column.

    Post Edited (Mike Green) : 6/14/2009 6:12:40 PM GMT
  • phil kennyphil kenny Posts: 233
    edited 2009-06-14 18:07
    Basic Stamps can only provide a limited amount of current at
    the output pins. I'd suggest using a transistor to drive the relay.

    If you use a 220 ohm or larger resistor between the Stamp output
    pin and the base of your transistor, the Stamp will be able to
    operate the relay.

    Find a small relay that can operate on +5 volts.

    Programming the Stamp is then jusy a matter of making
    that output pin high or low.

    phil
  • PrettybirdPrettybird Posts: 269
    edited 2009-06-15 00:51
    ·a LM 311 is also an excellant choice to drive a relay using a TTL input and up to 15vdc 100 ma output. Don't forget the clamping diode no matter what you use.
  • vw_gtivw_gti Posts: 10
    edited 2009-06-15 14:33
    its been toolong since hooked up a transistor could u give me some help on this
    thanks
  • Mike GreenMike Green Posts: 23,101
    edited 2009-06-15 14:52
    Either you didn't read the article I suggested or there's something in the article you didn't understand. Can you describe that?
Sign In or Register to comment.