Shop OBEX P1 Docs P2 Docs Learn Events
Radio Shack 5vdc spdt mini relay — Parallax Forums

Radio Shack 5vdc spdt mini relay

we2r1two008we2r1two008 Posts: 16
edited 2010-05-06 19:01 in BASIC Stamp
I am trying to turn this relay on and off with no success. I have the bs2 boe. I am using a transistor npn type. Checking the transistor, it is working fine but the relay is not turning on and off. Can someone explain in laymens terms how to set this up?
«1

Comments

  • metron9metron9 Posts: 1,100
    edited 2010-04-28 13:48
    The first thing I would do is test the relay by itself.

    Use an ohm meter to find the coil pins. (if you don't know how, ask)

    Check with an ohm meter the Normally closed pins and the normally open pins. Now you have a basis to test the device.

    Apply 5V to the coil

    Check with the ohm meter that the normally open pins close and the normally closed pins open when you apply 5V

    If the device is working then you may have found the following by this excercise.

    1. you miswired the device
    2. your transistor is not working or you have it connected wrong.

    Of course , you need to supply a drawing of your circuit for anyone to help if it's number 2 above.

    It could be you don't have enough current through the coil, it could be you don't have enough current on the transistors base.

    I think I covered all the possibilities, the point here is to inspect each point of the circuit and independently test the components involved in the circuit.

    So you don't have to have a datasheet for the device if you use a meter to find the correct pins to connect your circuit.
    ·

    Is it the relay in this picture?



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
    345 x 235 - 4K
  • we2r1two008we2r1two008 Posts: 16
    edited 2010-04-29 09:50
    Thanks for the replies. I tried a direct connection with a 9vdc battery with no luck. Thinking the relay may be bad I tried another relay with the same result. At this point I am sure it must be an error on my part. Here is the product...

    rsk.imageg.net/graphics/product_images/pRS1C-2160389w345.jpg

    www.radioshack.com/product/index.jsp?productId=2062480#tabsetBasic

    I appreciate you guys taking the time to help me out.
  • allanlane5allanlane5 Posts: 3,815
    edited 2010-04-29 12:29
    Dude, if you test a 5-volt relay with a 9-volt battery, you may burn out the coil.

    Also, 90 mA is quite a lot of current for a 9-volt, which I usually expect to be limited to about 50 mA max.

    Post Edited (allanlane5) : 4/29/2010 12:34:14 PM GMT
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2010-04-30 03:19
    I reckon allanlane5's admonition sagacious.· If anyone is "testing" 5V relays with 24V, he's testing them into being the "walking wounded."· Again, it's the blissful ignorance of short-term outcomes,·"no smoke therefore no foul."

    Hey, nobody's going to die; hopefully nobody will feel attacked.
  • metron9metron9 Posts: 1,100
    edited 2010-04-30 11:05
    we2r1two008 said...
    I am trying to turn this relay on and off with no success. I have the bs2 boe. I am using a transistor npn type. Checking the transistor, it is working fine but the relay is not turning on and off. Can someone explain in laymens terms how to set this up?
    we2r1two008 said...
    I have this test unit tied into a 24volt battery (capabile of delivering 2.4Ah) and use it to test 9 volt relays and 5 volt relays.
    Problem solved, you are destroying the relays one by one.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
  • we2r1two008we2r1two008 Posts: 16
    edited 2010-05-01 01:08
    I tested the relay using a 9vdc battery that was putting out 7.72 on the multimeter. Can someone look at the link I attached above and explain an ideal way to use the relay using the bs2. Maybe explain the pins a little better.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2010-05-01 14:20
    The links don't provide a pinout, or I'm blind in one eye and can't see out the other.

    [noparse][[/noparse]Maybe they noted that stuff on the back of the packaging?· RS didn't present that on the webpage.]

    So, anyway, it specs a "55 ohm" coil.· That's a lead there.· The thing to do is to find/identify the coil pins.· You need to get an ohmmeter and find the two pins where you get 50 ohms or so of resistance (all the others will·yield·either·shorts or opens.)· It's process of elimination, there are only 5 pins.· Get in there and dig.

    Do that and more help will be made available.

    Post Edit -- Somebody here Deleted his post, I note.
  • sumdawgysumdawgy Posts: 167
    edited 2010-05-01 15:12
    PJ Allen said...

    , it specs a "55 ohm" coil.· That's a lead there.· The thing to do is to find/identify the coil pins.· You need to get an ohmmeter and find the two pins where you get 50 ohms or so of resistance (all the others will·yield·either·shorts or opens.)· It's process of elimination, there are only 5 pins.· Get in there and dig.

    Hmmm..·24VDC at 55ohms· = .499999 Amps·· &· 9vdc =.1636363636 amps
    Either way, he exceeded the rating of.... .090 amps.

    If he left either one connected for more than a few seconds..(better odds w/9vdc)· I doubt he'll find a 55 ohm reading anymore. . . . . Too bad that coil's so small.... I do love the smell of smoke while I'm testing....(As long as I have spares.)

    Just throw away those·plastic lumps (uh burnt relays)·&· get more!

    Me, I would suggest next time you test the relay with a voltage less than the max rated. In my experience, any mechanical relay will trigger when presented with as little as 2/3 of it's rated voltage.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Before you criticize someone, walk a mile in his shoes. That way if he gets angry, he'll be a mile away and barefoot. - unknown
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2010-05-01 15:20
    Well, we don't know to any certainty·what's been done or not done, yet.

    Let's just wait for we2... (Le OP) to get back to us and go from there.
  • sumdawgysumdawgy Posts: 167
    edited 2010-05-01 15:42
    we2r1two008 said...
    I have this test unit tied into a 24volt battery (capabile of delivering 2.4Ah) and use it to test 9 volt relays and 5 volt relays.
    @we2r1two008, if you want to test a 9 volt relay....test it with 9 or less.· Same goes for 5volt relays. As you may have noticed by now there's a reason they're rated.

    That said.. You could've used a·voltage regulator to bring the 24VDC down to 9vdc or 5vdc.

    Hope this thread helped you!



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Before you criticize someone, walk a mile in his shoes. That way if he gets angry, he'll be a mile away and barefoot. - unknown
  • sumdawgysumdawgy Posts: 167
    edited 2010-05-01 16:30
    PJ Allen said...

    Well, we don't know to any certainty·what's been done or not done, yet.

    Let's just wait for we2... (Le OP) to get back to us and go from there.

    Hm..I do see·that the 24vdc post was deleted....perhaps he'd done it himself but, the quote was already forming?

    @PJ, Diplomacy is no a stranger to me... But I feel safe in my theory & I stand by it...the captain goes down with the ship!!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Before you criticize someone, walk a mile in his shoes. That way if he gets angry, he'll be a mile away and barefoot. - unknown
  • allanlane5allanlane5 Posts: 3,815
    edited 2010-05-01 18:11
    And if your 9-volt battery read 7 volts when out of circuit -- it's dead. If it read 7-volts IN circuit, it's still not healthy.
  • we2r1two008we2r1two008 Posts: 16
    edited 2010-05-02 00:43
    Ok... I gotta get in on the secret. Who said anything about using 24vdc? Someone suggested I build a test unit and explained what he used. How did I get caught up in the quotes? lol After no success using the two relays, I of course had to man up and try again. Another trip to radio shack. This time there is spares. I decided to try SPST 12vdc Reed Relay instead. It worked the first time using the BOE with a NPN transistor along with another 9vdc battery.

    I do appreciate the help and of course I am never satisfied so back the the other relays for another round.

    Ok, there is a few more things I need help with. In a schematic that I didnt understand, I read a note about a diode being used to protect the controller from the coil. (I think) Could you give me a short answer to that so I dont fry this bs2. Another thing.. the relay I am using calls for 1050 omhs. I do not have any resistors in this setup. Is that bad?
  • we2r1two008we2r1two008 Posts: 16
    edited 2010-05-02 00:52
    I gotta come back one more time. Theres a post missing. Not by me. I had to check above to see what you were talking about. The 9vdc and 24vdc thing is a little confusing. Look at the posts above to see. Also, now I am curious... who made the statement that I was quoted to saying?
  • metron9metron9 Posts: 1,100
    edited 2010-05-02 03:01
    ·"I do not have any resistors in this setup. Is that bad?"

    Now I am not one to use transistors for switching on and off I typically use mosfets that do not require a resistor on the gate. Driving most transistors however I think require a resistor as they are current driven not voltage driven. It would be nice if you were to post a schematic or give specific part numbers you may get better answers.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
  • MoskogMoskog Posts: 554
    edited 2010-05-02 08:46
    we2r1two008 said...
    ...who made the statement that I was quoted to saying?
    Not you but that's hard to say because that post suddenly disappeard.

    I think it was in·the first reply after your originally post the 24V statement came. Metron9 then accidently blamed you for that statement in his second post.

    To solve this mystery we need the 24V ghost to come back to the thread again.

    Post Edited (Moskog) : 5/2/2010 8:54:00 AM GMT
  • we2r1two008we2r1two008 Posts: 16
    edited 2010-05-02 10:51
    Yes.. I am curious. Just a bit of fun added to the frustration of learning about electronics.

    A look at the facts. I post, then one reply.. then I give thanks for the "replies" being plural. Feeling a bit CIAish I dig in the history of google chrome and find the schematic that was linked in the deleted post.

    http://www.kpsec.freeuk.com/projects/simplet.htm

    Just for fun, who made the post?

    Back to bussiness / pleasure. I am using the boe with this relay:

    http://www.radioshack.com/product/index.jsp?productId=2062479

    I have a NPN transistor wired to pin 1. GRD from another 9vdc is also attached to the collector and of course the extra 9vdc battery + is connected straight to the coil.

    I have never made a schematic. I am sure that during this process, that will be next on my list of things to learn. As for now, what about a reply like "Hey.. Stop! Your gonna fry that BS2!" Or maybe, just a simple atta-boy. lol

    Edit:

    Ok, so the free version of PCB artist sucks. Can I get some suggestions regarding schematic creation software?

    Post Edited (we2r1two008) : 5/2/2010 11:24:27 AM GMT
  • yarisboyyarisboy Posts: 245
    edited 2010-05-02 14:34
    If you can find a data sheet and app. notes on your NPN transistor look for a test circuit and also a gain equation for the device. You may find that proper selection of two $0.09 resistors properly placed may allow you to control the transistor signal response to 1.0, i.e. 5 volts out. After that go to ExpressPCB.com and down load the free schematic and layout software. Its more addictive than a video game. Have fun, don't worry. I was in your shoes not too long ago.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    MOORE'S LAW: The capabilities of electronics shall double every 18 months.
    cloyd's corollary: Hardware is easy, software is hard.
  • JonathanJonathan Posts: 1,023
    edited 2010-05-02 14:46
    Hey... STOP... you are gonna blow your BS2....

    Well, probably not your whole BS2, but maybe a pin. You are right above where you mention that you need a diode across the coil of the relay. When the magnetic field of the coil collapses, it creates a high voltage reverse spike. This can eat your drive transistor and possibly your Stamp pin. Just about any old diode will do. Connect it with the band pointed towards the + side of the relay coil, as close to the coil pins as you can.

    Atta boy!

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • JonathanJonathan Posts: 1,023
    edited 2010-05-02 14:48
    Also, I have seen some relays that are polarized, meaning that they only work if the + is connected to the right pin. Most relays don't care which coil pin you use for what, but a few do.

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • metron9metron9 Posts: 1,100
    edited 2010-05-02 15:13
    oops sorry if I miss quoted, that is kind of odd, but I think I remember typing in your name on the quote as I was parsing the posts. Again sorry it was not my intention to do so.

    On the project. This schematic (attached below) depicts a microcontroller driving a relay.

    If you post the transistors part number, or link to it's data sheet, as well as the voltage you are using and the specs of the relay (voltage and current) I am sure someone here can give you the calculations to perform to decide on the resistor value needed to drive the relay.

    Here is the thing, the resistor creates a current source or x. The transistor then allows a current to flow that is x times the amount of current flowing into the base. Without a resistor to the base the current may be too large and the current could flow from the base to ground shorting the stamp pin to ground and making smoke.

    So the voltage for the relay and the relays current need to be known as well as the voltage you plan on driving the relay with although, and i am not sure about this but another resistor could be used to drop the voltage to the relays coil, i.e. you have a 5V voil and you have 9v battery instead of connecting the battery directly to the coil you use a dropping resistor to limit the current through the relay. Again i must point out using the correct voltage is a better option.

    Your mission here is to learn how to take all the part information specifications and use calculations to figure out what other parts, in this case a resistor to the base and of course the protection diode for the kickback of the coil. Remember there are many different diodes, some very small and some very big, with a protection diode you just need one that is big enough to take the current and voltage the coil will generate when the transistor is turned off.

    So get the magnifying glass out and read the numbers on the transistor unless you have the warapper from RS that shows the part number. Google can find the datasheet that has it's specifications.

    Check out this showing inductive kickback, Click on the little white line at the bottom of the circuit where the small capacitor is located. The switch opens up and the current flows back through the diode. Without the diode something will smoke.
    http://www.falstad.com/circuit/e-inductkick-block.html

    Here is an index to many circuits you can see on screen working. You can also make your own circuits using this free java program.

    http://www.falstad.com/circuit/e-index.html

    Main site to all applets http://www.falstad.com/mathphysics.html

    look for Analog Circuit Simulator Applet on the linked page above. Below is the link.

    the actual applet you need for viewing common circuits and making your own http://www.falstad.com/circuit/



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
    235 x 245 - 4K
  • sumdawgysumdawgy Posts: 167
    edited 2010-05-03 00:50
    Moskog said...
    we2r1two008 said...
    ...who made the statement that I was quoted to saying?

    To solve this mystery we need the 24V ghost to come back to the thread again.
    You Do of course realize· have a HUGE entirely off-topic grin!

    Now i'm wonderin' if somone "faked" a quote?· (Is there a forum tribunal for the inqusition?)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Before you criticize someone, walk a mile in his shoes. That way if he gets angry, he'll be a mile away and barefoot. - unknown
  • we2r1two008we2r1two008 Posts: 16
    edited 2010-05-03 01:28
    All in a days work gentlemen. I appreciate th good replies. I started with blinking LEDs an jumped to relays an such. Maybe I should slow down and learn it one step at a time! Hard to do, some of you know what I mean. wink.gif I have a working relay and finally I have my controller and transistor protected! Cheers! TY
  • we2r1two008we2r1two008 Posts: 16
    edited 2010-05-03 09:58
    @ Sumdawgy

    And just to think, I had let the past go and forgotten all about the mysterious post. (Well, maybe not totally forgotten.)
    You have never been accused of pouring salt in an old wound or stiring the pot huh?

    At this moment I realize two things. I am using the same terms as a elderly lady and I am looking at the word "stiring" wondering if it is spelled right. smile.gif

    To keep this post from totally being off subject I'll have to ask about another of lifes mysteries. Why does my 5vdc regulator read a steady 3vdc?
  • metron9metron9 Posts: 1,100
    edited 2010-05-03 13:55
    Why does my 5vdc regulator read a steady 3vdc?

    Again you might ask why does one of the components on a circuit board not work?

    How the heck would anyone know if you do not provide the regulators part number and your wiring schematic, are you measuring with a load or without a load.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
  • we2r1two008we2r1two008 Posts: 16
    edited 2010-05-04 00:59
    I was thinking outside the box.

    Maybe voltage regulators always deliver a little less than stated on the packaging.
    I know as much about electronics as you know about walking a 4" iron beam with a 90lb
    harness/belt, 200' in the air. lol I am trying.

    The part is at the link below. It is check without a load.

    http://www.radioshack.com/product/index.jsp?productId=2062599
  • metron9metron9 Posts: 1,100
    edited 2010-05-04 04:55
    The 7805 has a typical 2 volt dropout voltage and a maximum dropout of 2.5VDC That means you need at least 7 to 7.5 volts to have a stable 5V output.

    Do you have 7.5V on the input and do you have the proper capacitors .33uf on the voltage input pin and .1uf on the output pin?

    You should see 5V output with those parameters. If you are only giving it 5V then you will see 3 to 3.5V with no load typically.


    Some better regulators are called LDO or low drop out regulators. They don't need so much overhead voltage. For example you want to use 4 D batteries at 6V and regulate to 5V you can't do it with a 7805 so you find a LDO regulator. If you are using 9V you should see 5VDC for sure.

    I know enough about the iron beam 200' in the air NOT to even try it, I shake like mad for hours when I have to go up on my roof.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
  • we2r1two008we2r1two008 Posts: 16
    edited 2010-05-04 09:40
    Ahhh. I see. Remember in a previous post I was explaining that the battery I was testing the relay with only read 7vdc.
    It makes sense now.. I appreciate it.

    As I read some of the posts here and in other topics I an trying different compnents one at a time when possible to
    see how they work. I am a little bit on the short-winded side when it comes to reading comprehention and committing
    those things to memory.. I acutually have to do it and see it work to really understand. I tried using a capasitor to measure rc time and also to smooth out a dc signal. Both times it worked great. You have me stumped on the use of 2 coming from the battery.
    Is there an article you can link me to or further explaination? Thanks.
  • sumdawgysumdawgy Posts: 167
    edited 2010-05-06 03:01
    we2r1two008 said...
    @ Sumdawgy

    You have never been accused of pouring salt in an old wound or stiring the pot huh?


    To keep this post from totally being off subject I'll have to ask about another of lifes mysteries. Why does my 5vdc regulator read a steady 3vdc?
    That's a FIXED regulator? (no adj pin?)·... Fire it up and check it's heat level...if it's jumpin.gif*blisteringly hot* then... it needs a heat sink....the current regulator usually has a thermal component to lower the current to keep it from FRYING itself...this unfortunately means you get less voltage than u want and CAN lead to a brown out...Back in the 80's I had a "digital" speed controller for my 7.2 R/C car.· It had a Pulse generator..(Width was controlled by the accel signal) feeding·a BANK of adj Regulators (I think it was like 8...(they were rated 1.5Amps max so ..they were connected in parallel & heat sunk together...those fins got hot when I ran longer sessions... But it held up till the thing finally rusted out. (Was in the Navy out to sea...salt air wasn't too healthy for it...went thru 3 motors b4 body was too weak...I digress again....did I mention it had 4wd?)

    If there's no heat....then it's most likely·1)failed.· or 2)NOT a 5vdc regulator!· (It's happened to me b4...wrong item packaged.)· Check the part number of it again to be sure......

    And, as to an old wound.....(I was just solving a thought problem...I love logic problems.· Wasn't really trying to create another "issue" tho.)......Oooops. rolleyes.gifSorry.

    ·EDIT>> meton's comments are also good! ( I didn't see them yet...misssed that this thread went page2)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Before you criticize someone, walk a mile in his shoes. That way if he gets angry, he'll be a mile away and barefoot. - unknown
  • metron9metron9 Posts: 1,100
    edited 2010-05-06 16:59
    "they were connected in parallel & heat sunk together"

    I am not aware of most regulators having the ability to be connected in parallel at least not without additional circuitry.

    http://electronicdesign.com/article/power/double-your-output-current-with-parallel-voltage-r-9270.aspx

    A transistor pass circuit is usually used.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
Sign In or Register to comment.