Shop OBEX P1 Docs P2 Docs Learn Events
Reed Relay — Parallax Forums

Reed Relay

Tyler MeekTyler Meek Posts: 21
edited 2009-01-28 01:41 in BASIC Stamp
So I want to play with my new reed relay to control a 1.5-3v dc motor and I have no idea how to start. I have read on how the reed relay works but am at a loss as to how to safely hook up the pins. Anyone?
Thanks, T

Comments

  • davejamesdavejames Posts: 4,047
    edited 2009-01-27 19:34
    Knowing what type (brand, model) of relay would assist in offering ideas.

    DJ
  • Tyler MeekTyler Meek Posts: 21
    edited 2009-01-27 20:00
    It is a 5vdc/1A spst from radio shack. http://www.radioshack.com/product/index.jsp?productId=2062478. It has 3 pins on one end and 1 on the other.
  • ercoerco Posts: 20,256
    edited 2009-01-27 20:22
    See near the bottom of http://forums.parallax.com/showthread.php?p=727502
    I used this same relay there.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • davejamesdavejames Posts: 4,047
    edited 2009-01-27 20:30
    I did some digging and discovered that the·Shack relay is a Tyco product (attached data sheet).

    This relay's coil resistance is 250 Ohms and at 5V will require around 24mA to operate.· This exceeds (or comes close to) the maximum current a BS pin can sink, which means you'll need a relay driver chip to sit in between the BS and relay coil.· The relay also requires 1ms of settling time, the time it takes the contacts to·stop bouncing.

    Take a look at the data sheet and we can continue from there.

    Regards,

    DJ
  • Tyler MeekTyler Meek Posts: 21
    edited 2009-01-27 22:20
    so.... If i am looking at the underside of the relay I see 4 pins. If this was a constellation it would be an arrow. (using my star analogy) The tip to the tail is a direct shot with a gate that can be opened or closed by the opposing pins that would make up the wide part of our "arrow"? Then... those opposing pins are suppliers of the current that open and close the gate (the stamp)? what is the purpose of the coil? ...and finally... Can I temper the 24 mA to say 15 mA and still make the gate keeper work?
    T
  • ercoerco Posts: 20,256
    edited 2009-01-27 23:43
    That's pretty much it. The two extreme pins are an open switch (off) that get closed (on) when you put 5 volts across the 2 "opposing" pins as you call them. These go to the 250-ohm relay coil that will draw exactly 20 mA from 5 volts. It's a perfect match for a Stamp output pin, which can source 20 mA max. It can sink 25 mA, so if you want to build in a bit of margin, attach one coil wire to +5 volts (Vdd) and the other to a Stamp pin. In this configuration, the relay will be energized (switch closed, ON) when the stamp pin is LOW, and relay/switch open (OFF) when the Stamp pin in high. A bit counterintuitive, but electrically superior. And you want to attach a flyback diode in parallel with the coil to protect your Stamp. Get a RadioShack bulk pack of silicon diodes, like 1N4001. In the layout above, attach one diode across the coil, white-banded end to the Vdd side and the other end to the Stamp pin side.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • Mike GreenMike Green Posts: 23,101
    edited 2009-01-27 23:49
    A relay contains a coil that acts as an electromagnet. When you put 24mA through that coil (by connecting it to a 5V power source like a Stamp I/O pin), the coil generates enough of a magnetic field to attact a little piece of iron or steel that's part of a switch and the switch closes. If there's less than 24mA, the switch may not close or may not close with enough force to make a good contact.

    You do need a diode connected across the relay coil (in reverse to the current that closes the relay). When the current is turned off to the coil, the magnetic field collapses and generates a reverse voltage in the coil as it does so. This reverse voltage can be quite high and can damage the Stamp or a switching transistor that's connected to the coil. The reverse connected diode conducts and allows this voltage to dissipate in the resistance of the coil winding so it can't damage the Stamp.

    Have a look at the Nuts and Volts Column #6 for information on controlling relays, solenoids, and motors with a Stamp using an external transistor or other driver circuit.
  • Tyler MeekTyler Meek Posts: 21
    edited 2009-01-28 01:23
    You guys are Rock Stars.
    I know you repeat yourselves in these threads, it does not go unappreciated.

    On the back of the package it says a "nominal current" is that the minimum amount of energy to operate the relay?

    Regarding the diode; It's a valve that allows current in only one direction? (that's why a LED does not work when anode is where the cathode should be) How do I know witch way to position the diode and what size for that matter to protect the stamp? Is this something one can way overkill and still do it's job?

    T
  • Mike GreenMike Green Posts: 23,101
    edited 2009-01-28 01:41
    "nominal current" means that the amount of current can vary and they don't want to or can't characterize the actual range of current needed. If they wanted to say "minimum current", they'd probably say that.

    Read the documentation I referred to for information on the protective diode.
Sign In or Register to comment.