Shop OBEX P1 Docs P2 Docs Learn Events
reed relays not shutting off motor — Parallax Forums

reed relays not shutting off motor

BlakeBlake Posts: 74
edited 2008-03-03 22:46 in BASIC Stamp
I am using a .5amp at 125 VAC reed relay with 1N4007 diodes backwards across them, to control a DC motor running from a 15V 1.5amp dc adapter. The relay is controlled by a bs2 pin. The problem I am having is that when the basic stamp drops voltage to the relay, the relay it does not go open, and the motor keeps running. The obvious answer is that my relays are only rated for .5 amps. Is there any other way around this without changing the relays or the motor? Any suggestion for something other than the standard SPST .5amp at 125VAC reed relay? How about something I could get at radioshack?

Thanks,
Blake

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2008-03-02 05:35
    The reed relays are not going to last very long the way that you are using them. The in-rush current for the motors is to great, and they will eventually burn up. The relay contacts are "sticking" because of this in-rush current also. ....essentially you have a mini-spot welder.

    "Is there any other way around this without changing the relays or the motor?" ... you might be able to suppress the spark/arc by placing small (.1uF to .01uF) caps across the relay contacts, but there are no guarantees.

    "Any suggestion for something other than the standard SPST .5amp at 125VAC reed relay? How about something I could get at radio shack?" ... there are a few other relays to choose from, and/or a transistorized approach but more details on your intended design goal might help in the way of a more appropriate answer.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2008-03-02 10:15
    Why stay with a relay?

    Solid-state switching would eliminate nearly all your headaches. Transistors and MOSfets usually are rated through 40-60, so they can easily handle 15 volts. You could try a 1-2 amp MOSfet that triggers directly from TTL logic levels. You might put a 3300uF cap on the supply to avoid browning out the BasicStamp.

    All relay contacts wear out and low amperage ones are likely to wear out quicker if the amperage is over the limit. It doesn't really matter what the voltage rating is.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PLEASE CONSIDER the following:

    Do you want a quickly operational black box solution or the knowledge included therein?······
    ···················· Tropically,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-03-02 11:05
    George -

    You said "It doesn't really matter what the voltage rating is" in the message above this one. That's about the most foolish and unsafe thing I've seen on this forum in years. Voltage and amperage ratings, as well as the type of voltage (AC or DC) are fundamental to specifying and using the appropriate relay in the appropriate place. What were you thinking?

    If you doubt what Beau or I said regarding contact welding, I suggest you try it yourself. Do report back when the AC ONLY switch you must use for the experiment no longer works after passing DC through it a few times. You really don't need all that much of a current load to cause it to happen either.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Programming can't be all that difficult, it's nothing but 1's and 0's
  • BlakeBlake Posts: 74
    edited 2008-03-02 15:21
    Basically I am building a simple H-bridge for the motor out of four reed relays. I switched from TIP120 darlington transistors to reed relays after my two forward TIP120s started acting as emitter-followers and I only got 5 volts out of the thing ever, instead of 15V. I read a howto on instructables.com on using reed relays and i had some and it sounded cool. But, I guess I will go get some PNP's for the forward transistors and try that route again. Do I need the diodes on the transistors if I use TIP120s and the equivalent PNP transistors?

    Thanks,
    Blake
  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-02 16:40
    Unless you can get a really cheap price on the transistors and socket them so they're easy to replace, you will need the diodes on the bridge transistors. The back EMF from the motor will stress the transistors and they'll fail eventually.
  • Alan BradfordAlan Bradford Posts: 172
    edited 2008-03-02 17:12
    I Agree with Bruce and Beau regarding DC/AC switches and Relays.
    You need to look at the ratings for Relays. They have seperate AC and DC ratings.
    A relay will say AC 250 V 5 Amps DC 24 V 5 Amps.
    I have to control 110 VDC 100 MA. motors on some of my rebuilds.
    I learned long ago that a 5 Amp AC relay will weld itself shut with these motors.
    I had to search for a relay rated for 110 VDC.
    The ones I found were rated for 15 Amps AC/DC.
    The contact spacing is greater and will not weld shut as easily.
    Just my 2 cents worth
    Alan Bradford
    Plasma Technologies
  • BlakeBlake Posts: 74
    edited 2008-03-02 17:37
    I've got four darlington TIP120 NPN's and 2 TIP42 PNP's (and four MOSFET N-channels, but I'm trying not to use these) to work with. I just unsoldered all the relays and will try to build it back with transistors before 5 pm deadline today. I'm planning on using two PNPs for my forward transistors and two NPNs for my rear instead of all TIP120s, this time using diodes as well, backwards across the collector emitters, 15 Volt motor and 15 Volt power supply.
  • BlakeBlake Posts: 74
    edited 2008-03-02 18:44
    Okay set everything up as per attached picture and now I get nothing. 15 Volts going into my Tip120s and 3.5 volts coming out. Still acting as emitter follower? How do i get around this? Do I need to flip the connection for collector emitter on the PNPs?

    Post Edited (Blake) : 3/2/2008 6:54:00 PM GMT
    763 x 833 - 80K
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2008-03-02 21:33
    Blake,

    I strongly suggest looking at these articles in Nuts and Volts....

    www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol2/col/nv52.pdf
    www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol1/col/nv6.pdf

    www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol1/col/nv23.pdf

    The latter is probably going to be exactly what you want... particularly Fig 23.7


    In your current schematic, your NPN transistors have the C-E junction backwards,
    and the power supply is reversed.

    Again, take a look at the nv23.pdf at Fig 23.7 ... for the PNP transistors operating
    at a higher voltage than the stamp, you need a high-side driver or a circuit similar to
    what is shown in the example. Otherwise, the PNP's will never completely turn "OFF"
    and is probably why you only saw 5V on your output. The PNP, that was supposed to
    be "OFF" was fighting the NPN that was "ON"..... more than likely your PNP got very
    HOT in the process (more so than the NPN playing tug-of-war).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • BlakeBlake Posts: 74
    edited 2008-03-03 01:50
    Thanks everyone, I figured it all out. One article in particular was extremely helpful, which I found before Beau's post, so I'd like to post it for others:

    helpful website:
    http://www.blogcadre.com/blog/jason_striegel/howto_make_a_robot_car_-_part_2_h-bridge_details_2005_11_10_23_18_10


    my final setup schematic:
    hbridgefinal.jpg

    I have one question though. My Stamp responds to a parallax PIR motion sensor hooked up to an input pin. When the PIR sensor goes high it triggers a the h-bridge to go "forward" for five seconds, off for half a second, then "reverse" for two seconds, then off for five seconds. But unfortunately, it seems like the cycle repeats itself endlessly without pausing, once the PIR is triggered two or three times. Do I need any resistor or anything between the PIR sensor and the BS2, or is there anything in my schematic that screams mistake?

    Thanks to everyone who has helped me so far, and it's so close!

    Blake

    p.s. heres my code:

    ' {$STAMP BS2}
    ' {$PBASIC 2.0}
    
    DEBUG "hello"
    INPUT 13
    
    
    Main:
    LOW 11
    LOW 4
    IF IN13 = 1 THEN goOn
    
    GOTO Main
    
    
    
    
    goOn:
          HIGH 11
          PAUSE 5000
          LOW 11
          PAUSE 200
          HIGH 4
          PAUSE 3000
          LOW 4
          PAUSE 5000
    
          GOTO Main
    
    
    550 x 400 - 48K
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-03-03 02:46
    Blake -

    Whatever is happening to cause this problem almost has to be the PIR sensor. The output from the PIR sensor may not be a steady (ON) as you seem to expect it to be in your program. There is a jumper on the PIR board that can compensate for this. Move the jumper into the H position, if it's not there already.

    Additionally, there should be an initial·pause to permit the PIR sensor to stabilize, per the instructions which are available on the Parallax web site. The·pause is specified as 10-60 seconds, so you may have to experiment with it to get the best results. There is a PBASIC PAUSE instruction you can use for this. Check the PBASIC Help file for details.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Programming can't be all that difficult, it's nothing but 1's and 0's

    Post Edited (Bruce Bates) : 3/3/2008 3:01:30 AM GMT
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2008-03-03 03:50
    Blake,

    Your PNP's in that schematic will not work properly since your supply voltage is greater (15V) than the stamp can deliver (5V).... they will always be "ON" to some degree.

    When the stamp pin is LOW, then the transistors are "ON" with a BASE current of 14.4mA (15V - .6V)/1K = 14.4mA· <- The B-E junction "sees" a relative voltage of 15V through a 1K resistor
    When the stamp pin is HIGH, then the transistors are "ON" with a BASE current of 9.4mA (10V - .6V)/1K = 9.4mA· <- The B-E junction "sees" a relative voltage of 10V through a 1K resistor

    The hFe or Gain of the TIP42 is about 20, so in either case of the transistors being "ON", they probably aren't delivering enough current to power your motors adequately.
    288mA MAX and 188mA MIN ( 14.4mA X 20 = 288mA ; 9.4mA X 20 = 188mA )

    This article may help... the same applies to a PNP transistor.
    http://forums.parallax.com/attachment.php?attachmentid=37701
    ··········· Note: For an H-Bridge such as in fig 23.7, use a diode drop of 1.8V to calculate the proper current limiting resistor value between the PNP and NPN transistors.
    ··················· Use a diode drop of 1.2 to calculate the proper current limiting resistor to the Stamp I/O.

    You still are going to need a HIGH-Side driver for your PNP transistors if your supply voltage to the transistors is going to be greater than the Stamp voltage. One that will work is in Fig 23.7 of my previous post.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 3/3/2008 7:11:28 AM GMT
  • BlakeBlake Posts: 74
    edited 2008-03-03 17:58
    Okay, my new setup after yet another trip to radioshack:

    hbridgefinal2.jpg

    Everything works pretty well, motor runs fine, and the original tip42 pnps and tip120 npns don't heat up and burn my fingers. Question is:

    i am using two npn switching tranistors of which radioshack says the following:
    typical hfe: 200
    max vce: 30v
    Ic: 800mA
    power dissipation: 1.8W

    Now both of these new npns are heating up one more than the other (even though they are both the same). Do the ratings suggest I need something larger? What about two tip120 nons instead, or Tip31 or tip31a's? Thats basically what I've got to play with here, without getting on a forty minute bus ride up to the mall. Finally, do I need that extra resistor in front of my pnp bases? Would that help?

    Here is what I am using as an example:
    original.JPG

    Thanks,
    Blake

    p.s. On the whole, I think I finally gave in, and did what I was supposed to do in the first place, learned my lesson, and am getting somewhere. Thanks for everyone's help pushing me.
    650 x 400 - 68K
  • BlakeBlake Posts: 74
    edited 2008-03-03 18:07
    Okay one of my new transistors just smoked. Guess I will upgrade while waiting for a response...

    Blake
  • phil kennyphil kenny Posts: 233
    edited 2008-03-03 19:00
    The two 49.9 ohm resistors in the collectors of the 2N2222 transistors serve an
    important function. The limit the collector current of the 2N2222 transistors.
    That's why they burned out.

    Don't leave them out.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2008-03-03 19:24
    Blake,
    ·
    You need a current limiting resistor·between the PNP(tip42) and the NPN(tip120) in addition to the "control" NPN.
    (see the 49.9 Ohm resistor in the schematic?)· You don't need to be that precise, but you do need something there.
    ·
    If you have 15V, then use a diode drop of 1.8V, so even though your supply is 15V, you need to figure 13.2V
    ·
    Now, how much current does your·motor require?
    ·
    ...between the tip42 and tip120 figure a gain of about 10 (<-worst case)
    for a good rule of thumb, half that to 5
    ·
    The proper current limiting resistor value should be about....
    ·
    R_control_current_limit = 13.2V / (Motor_current / 5)
    ·




    The "control" NPN is just fine with a 1K resistor on it's base.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • BlakeBlake Posts: 74
    edited 2008-03-03 22:46
    everything works great.

    Thank you. I'll post a picture in the projects forum.
Sign In or Register to comment.