Shop OBEX P1 Docs P2 Docs Learn Events
BS1 relay timer — Parallax Forums

BS1 relay timer

HODXHODX Posts: 13
edited 2005-05-09 22:48 in BASIC Stamp
Need a circuit to power a pump, that draws 1.5amps and is 12v...I want to use a relay, unless there is another way to do it...also want to power the stamp from a 12v deep cycle battery.A little code to get me started would help...I want to turn on the pump for 1 minute then off for 5 minutes...Help please.......

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-05-09 13:09
    The code part is pretty easy:

    {$STAMP BS1}

    SYMBOL Pump = 0

    SYMBOL secs = W1

    Main:
    · HIGH Pump
    · secs = 60
    · GOSUB Timer
    · LOW Pump
    · secs = 300
    · GOSUB Timer
    · GOTO Main

    Timer:
    · PAUSE 1000
    · secs = secs - 1
    · IF secs > 0 THEN Timer
    · RETURN


    The BS1 will take a 12v input and regulate it onlboard.· Just remember that you only have about 50 mA to power circuits, hence the transistor buffer for the relay (attached).· One note: DO NOT use the relay part number called out in the schematic -- it will only handle 0.5 amp.· Substitute an appropriate 12 v relay and you should be good to go.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
    970 x 848 - 10K
  • HODXHODX Posts: 13
    edited 2005-05-09 22:48
    Thanks Jon
Sign In or Register to comment.