Shop OBEX P1 Docs P2 Docs Learn Events
connecting relays — Parallax Forums

connecting relays

ArchiverArchiver Posts: 46,084
edited 2001-03-16 14:39 in General Discussion
Essentially I need to know how to connect a relay to a Basic I Stamp so
that the stamp controls whether the relay is opened or closed. The stamp is
the relay's power source. The relay in question is a 12 amp relay with a
coil current of 18mA. Read below for more details, if necessary. Thanks
for any help anyone can provide.


I am using a Basic I Stamp as an onboard control of an electric model car.
I have absolutely no past circuitry experience and have thus far been ok,
until now. I want to use a relay to control the power source (homemade
battery) to the car's motor and I want to control the relay by using the
stamp as the relay's power source. I turn the relay "on" to allow
electricity to flow to the motor and when the car has gone the desired
distance (measured using a photosensor), the relay will be turned "off" to
stop the flow of electricty to the motor. I cannot seem to be able to
control the power from the stamp to the relay. In fact, I have not
successfully been able to get current to flow across the relay (it is always
open).
On the store box the relay can carry up to 12 amps across it and requires
a coil current of 18mA. Since maximum load on the car requires 4 amps and
the stamp's pins can source 20mA, I figured it would work. Could anyone
please give me some guidance as to how to connect the relay to the stamp so
that the stamp can be its power source and thus controls its open and close
actions. Thank you very much for any help.


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-03-16 14:39
    The Stamp FAQ at http://www.al-williams.com/wd5gnr/stampfaq.htm has a
    section on driving relays. You need a protection diode in reverse around the
    coil. Also, most of the time you will use a small transistor (2N2222 or
    2N3904) with a small base resistor 470 ohms to 1K to switch the ground side
    of the coil. Its in the FAQ.

    Although 18mA seems like it should be able to be driven off the Stamp, what
    about the coil's voltage? Coils have a resistance, and so the current will
    be 5V/R. So suppose at 12V the relay draws 24mA (and the pull in is 18mA).
    The R would be 500 ohms. Now at 5V you are only going to draw 10mA which is
    below the pull in current. Worse still if the coil is meant for 120VAC.

    Also, typically people avoid driving inductive loads directly from the Stamp
    since blowing up a 10 cent transistor is better than blowing a $50 Stamp.
    Without a protection diode, you may have blown that Stamp pin. Use an LED to
    observe the pin operating before you try anything else.

    If you want to test your relay, just hook one end up to your voltage source
    and ground the other end and see if it switches.

    Good luck!

    Al Williams
    AWC
    * 8 channels of PWM: http://www.al-williams.com/awce/pak5.htm



    >
    Original Message
    > From: John Richardson [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=1SIx-5sbk8wbqHdMrxF1NIrHFEeiv4gOPWisVHT_rhW8wif8aPsyE9QfxFidyxC7F5sPcSSAazTg49A]jmr5678@h...[/url
    > Sent: Wednesday, March 14, 2001 11:04 PM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] connecting relays
    >
    >
    >
    > Essentially I need to know how to connect a relay to a Basic I Stamp so
    > that the stamp controls whether the relay is opened or closed.
    > The stamp is
    > the relay's power source. The relay in question is a 12 amp relay with a
    > coil current of 18mA. Read below for more details, if necessary. Thanks
    > for any help anyone can provide.
    >
    >
    > I am using a Basic I Stamp as an onboard control of an electric
    > model car.
    > I have absolutely no past circuitry experience and have thus
    > far been ok,
    > until now. I want to use a relay to control the power source (homemade
    > battery) to the car's motor and I want to control the relay by using the
    > stamp as the relay's power source. I turn the relay "on" to allow
    > electricity to flow to the motor and when the car has gone the desired
    > distance (measured using a photosensor), the relay will be turned
    > "off" to
    > stop the flow of electricty to the motor. I cannot seem to be able to
    > control the power from the stamp to the relay. In fact, I have not
    > successfully been able to get current to flow across the relay
    > (it is always
    > open).
    > On the store box the relay can carry up to 12 amps across it
    > and requires
    > a coil current of 18mA. Since maximum load on the car requires 4
    > amps and
    > the stamp's pins can source 20mA, I figured it would work. Could anyone
    > please give me some guidance as to how to connect the relay to
    > the stamp so
    > that the stamp can be its power source and thus controls its open
    > and close
    > actions. Thank you very much for any help.
    >
    >
    > _________________________________________________________________
    > Get your FREE download of MSN Explorer at http://explorer.msn.com
    >
    >
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
Sign In or Register to comment.