Shop OBEX P1 Docs P2 Docs Learn Events
bs2 i/o pin output voltage — Parallax Forums

bs2 i/o pin output voltage

BullwinkleBullwinkle Posts: 101
edited 2006-01-06 06:30 in BASIC Stamp
I am about to buy a bs2 kit for a little project I have in mind. Specifically, I want to control my lawn irrigation system. My idea is to use the output voltage of the I/O pins to drive a small reed relay which will switch the 24 vac needed to drive the sprinkler solenoids. To do this I need 5v from the I/O pins. Can the stamp manage that?

If it can't I guess I could always connect the I/O pins to an invertor and make sure the invertor has a vcc of at least +5v. My current prototype works this way, driven from the parallel port of my PC. But I'd like to build a stand-alone controller using the stamp.

Comments

  • BullwinkleBullwinkle Posts: 101
    edited 2006-01-06 01:17
    Again - RTFM. D'oh!!! wink.gif

    Can the I/O pins be used to control relays, solenoids and other similar devices?
    Yes, however, due to the demanding current and voltage requirements of some of these components, driver circuitry
    will need to be used to properly isolate the I/O pins from harmful effects. For examples of this, refer to BASIC
    Stamp I Application Note #6 and BASIC Stamp Article #6, “Silicon Steroids for Stamps”.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-06 01:51
    Yes, everyone should Read The Fabulous Manual!· Unless your reed relay has a current draw of about 20 mA then the quick answer is, NO.· Don't worry, you can insert a simple driver like the ULN2x03 between the BASIC Stamp and your relay and you'll be good to go.· The link below is to an older article, but it's got excellent information that will help you.

    http://www.parallax.com/dl/docs/cols/nv/vol1/col/nv6.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • BullwinkleBullwinkle Posts: 101
    edited 2006-01-06 06:30
    That driver looks very similar to the SN74LS04N ( http://focus.ti.com/general/docs/lit/getliterature.tsp?genericPartNumber=sn74ls04 )

    I'm using one right now for the same reason. The voltage from the pins on the parallel port drop DRAMATICALLY if I pull too much current from them (like trying to drive a reed relay), so I placed this invertor in between the port and the relays and bingo - it worked! Also writting zeroes means "turn on" - so when the PC is booted and the pins float high for a while, the sprinklers stay off. Not that it gets booted THAT often - this is a Linux box after all. (current uptime 33 days)

    So, I can reuse the same idea (and invertor) for the Stamp driver irrigation controller. Cool.
Sign In or Register to comment.