problem with relay
Giuseppe
Posts: 51
Hey guys, I am trying to make a relay click via an I/O pin with a HIGH command (other end of coil is Vss). I cannot get it to work. I know it is better to send a HIGH signal to a transistor for higher current to a relay but I just wanted ti try it out anyway. I can make the relay click with Vss and Vdd but not with the I/O pin. Is this perhaps because the current is higher than it is on a pin making it click? That is the only thing I can think of. The relay is a 5V relay with the a coil resistance of 12 ohms. So I am figuring the current needed to drive should be (5/12) = 0.42 A. Thanks guys.
Comments
Jonathan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
Dave E
That's definitely too much relay for the Stamp to drive directly; you can only count on 20 mA from any one pin. If you're using a real Stamp (not using a Homework board or Project board, both which have built-in 220 ohm resistors), you could drive a 20 mA reed relay directly, but that's about it. And you'd want to use a flyback protection diode. Otherwise you have to use a switching transistor.
I posted a circuit at http://forums.parallax.com/showthread.php?p=773130 which shows one way to use a transistor to switch a bigger relay.
PS: If you can find these particular NAIS/Aromat 5V DPDT DIP·relays, you can also drive them directly with 20 mA and a flyback diode.
http://cgi.ebay.com/10-RELAYS-TQ2-5V-5-VOLT-NAIS_W0QQitemZ310116360548
My very favorite component after the BS2. Stock up if you ever find them at a good price, as they are rare and worth their weight in gold. Must be marked TQ2-5V only. Very sensitive at low current because the coil is polarized. Won't work if you reverse the polarity!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."