Shop OBEX P1 Docs P2 Docs Learn Events
Fitty-Cent Relays — Parallax Forums

Fitty-Cent Relays

ercoerco Posts: 20,256
edited 2012-03-12 15:55 in General Discussion
I bought ten of these 5V SPDT relays for $5 off Ebay China (free ship) and they're so nice I just ordered 20 more. You can never have enough relays, really!

http://www.ebay.com/itm/10pcs-NEW-5V-DC-RELAY-3A-SPDT-CONTACTS-5PIN-/320726114409?pt=LH_DefaultDomain_0&hash=item4aacc42069

Sizewise and pinout, they're a dead ringer for Radio Shack's $4.69 relay #275-0240 : http://www.radioshack.com/product/index.jsp?productId=2062480

except the China relays consume less current. The Shack relay's coil is 56 ohms, drawing 89 mA at 5V. The China relay's coil is 128 ohms, drawing 39 mA. I tested the China relays at 3.16V (2xAA alkaline battery) and 100% of them worked, so 3.3 operation is possible at 25 mA. Two of them still fired at 2.5V (2xNiMH AA) FYI.

The China relay claims a 3A contact rating, but I'd stick with the Shack's 1A rating. They are PC mount, and the leads are NOT long enough to push into a solderless breadboard, FYI.

While you're ordering under-a-buck relays, EG has their DIP latching relays on sale again for 99 cents:
http://www.goldmine-elec-products.com/prodinfo.asp?number=G2011 Those will work on a breadboard.

Comments

  • jdoleckijdolecki Posts: 726
    edited 2012-03-10 04:55
    Didnt know the Rapper made relays

    thank you i be here all week.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-03-10 06:55
    Frankly, I avoid 5volt relays now.

    My main preference are 12VDC relays that can be driven via a 2N2222.

    There are two formats: [a] the ones that fit into industrial sockets on a rail, 12VDC automotive relays that can pretty well be environmentally abused.

    Both come in 10amps or above. For me, relays are all about switching heavy currents and there are few reasons that this type of wiring would take place on a circuit board.
  • ercoerco Posts: 20,256
    edited 2012-03-10 07:01
    Large currents on a pc board, no. Complete isolation on a pc board, yes! :)
  • localrogerlocalroger Posts: 3,451
    edited 2012-03-10 16:04
    I might pick up some of these. Direct op from a prop pin? And Loopy's observation notwithstanding, that's switching 1 amp at 120 VAC if you want. I just put together a system where the prop has to turn a Dremel tool on and off. Ended up using a 2N2222, but these would have eliminated a part.

    On edit: Put in my order for 20. If I use even one of them in the next 10 years having them on-shelf is worth the bucks. And I'm pretty sure I will use at least three or four of them next year.
  • ercoerco Posts: 20,256
    edited 2012-03-10 18:07
    Is a Prop pin good for 25 mA? That's what the coil draws at 3.3V.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-03-10 20:02
    Erco
    Let's face it - you can't have all 32 I/O pins driving 25ma at the same time - but if you insert a 2n2222 on each I/O you can have all 32 drive 200ma of 12VDC at the same time.

    The 5VDC relay is nice as a starter. 12VDC relays are really industrial workhorses. And the 120VAC wiring is safer if it is off of the circuit board - better insulation, complete isolation, real fuses.
  • localrogerlocalroger Posts: 3,451
    edited 2012-03-11 07:07
    Loopy, while all that's true sometimes you only need one or two, you don't have 12V, and you are controlling something lightweight that only draws a fraction of an amp. As for isolation, I probably won't be bothering with circuit boards; you can tack these little relays down with some RTV and wire them dead-bug style.
  • TtailspinTtailspin Posts: 1,326
    edited 2012-03-11 08:38
    The data sheet for the Prop says 40 mA per pin, and the entire chip is not to exceed 1 watt power dissipation...

    32 servo's can be driven by the prop, with no transistors.. You just have to wait a few microseconds between,
    See Servo32v7.spin, here is the theory...
    Theory of Operation:
    Each servo requires a pulse that varies from 1mS to 2mS with a period of 20mS.
    To prevent a current surge nightmare, I have broken the 20mS period into four
    groups or Zones of 8 servos each with a period of 5mS. What this does, is to
    ensure that at any given moment in time, a maximum of only 8 servos are receiving
    a pulse.
       Zone1 Zone2 Zone3    Zone4          In Zone1, servo pins  0- 7 are active
               In Zone2, servo pins  8-15 are active
      │─5mS│─5mS│─5mS│─5mS│        In Zone3, servo pins 16-23 are active
      │──────────20mS───────────│        In Zone4, servo pins 24-31 are active
                      
        1-2mS servo pulse 
                  
    The preferred circuit of choice is to place a 4.7K resistor on each signal input
    to the servo.    If long leads are used, place a 1000uF cap at the servo power
    connector.    Servo's seem to be happy with a 5V supply receiving a 3.3V signal.
    
    

    I have driven four servo's at exactly the same time, Two continous rotation, and two standard servos...
    Don't sweat it erco, enjoy the power of the dark side...

    -Tommy
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-03-11 10:29
    Ttailspin wrote: »
    The data sheet for the Prop says 40 mA per pin, and the entire chip is not to exceed 1 watt power dissipation...

    32 servo's can be driven by the prop, with no transistors.. You just have to wait a few microseconds between,
    See Servo32v7.spin, here is the theory...
    Theory of Operation:
    Each servo requires a pulse that varies from 1mS to 2mS with a period of 20mS.
    To prevent a current surge nightmare, I have broken the 20mS period into four
    groups or Zones of 8 servos each with a period of 5mS. What this does, is to
    ensure that at any given moment in time, a maximum of only 8 servos are receiving
    a pulse.
       Zone1 Zone2 Zone3    Zone4          In Zone1, servo pins  0- 7 are active
               In Zone2, servo pins  8-15 are active
      │─5mS│─5mS│─5mS│─5mS│        In Zone3, servo pins 16-23 are active
      │──────────20mS───────────│        In Zone4, servo pins 24-31 are active
                      
        1-2mS servo pulse 
                  
    The preferred circuit of choice is to place a 4.7K resistor on each signal input
    to the servo.    If long leads are used, place a 1000uF cap at the servo power
    connector.    Servo's seem to be happy with a 5V supply receiving a 3.3V signal.
    
    

    I have driven four servo's at exactly the same time, Two continous rotation, and two standard servos...
    Don't sweat it erco, enjoy the power of the dark side...

    -Tommy

    @Tommy,

    The signal line doesn't use much current. No where near 40mA. You wouldn't need a transistor with a servo. The servo electronics kind of have the transistor build in.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-03-12 11:19
    Yep, servos are NOT relays. Servos are not being switched on and off; they are receiving a PWM signal.

    AMPS X VOLTS = WATTS and so 1 watt/3.3volts = 300 milliamps spread over 32 pins if all are ON at the same time. Any more and you might get too much heat buildup.

    That would seem to be about 9ma per pin in a full ON condition. And it would be much wiser to reduce that if you want the Propeller to run cooler and possibly last longer.

    Driving 25ma or 40ma loads directly from the Propeller may be possible with limited pins, but it isn't really prudent for a lasting long term design.

    Besides I keep finding that I don't want merely 1 amp relays, especially with 120VAC.

    I do have a collection of 5 volt relays and I just have never really ended up using them. But the 12 volt coil with DPDT 12amp 120VAC are working out very nicely in a ganged setup for home automation and for greenhouse control. These 12 volt relays require 60ma to drive the coil at 12VDC and a 2N2222 will proved much more - say 200ma if necessary. (So the 2N2222 is running cool as well).

    Forgive me, I am just trying to mention some useful engineering approaches rather than offering up a scheme that everyone is copying off the internet. At some point, we all need robust designs for something.
  • TtailspinTtailspin Posts: 1,326
    edited 2012-03-12 13:28
    I see my greivous lack of formal education is shining brightly...
    But, if they were talking about servo's, I would have been spot on, right? :blush:
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-03-12 15:55
    Ttailspin wrote: »
    I see my greivous lack of formal education is shining brightly...
    But, if they were talking about servo's, I would have been spot on, right? :blush:

    :arrow:Bull's eye!

    Turning logic on and off can cause problems too. I had a stack of eight SRAM chips I was trying to get to work in parallel. Each chip by itself worked fine but when I tried to use all at once they didn't work. Actually, they worked most of the time. It was just when they all output an one on their logic pin at the same time, it pulled enough current to drop the voltage to brown out the chips. An extra capacitor near the Vdd pins did the trick to get them to all work all the time.

    Beau's method of staggering the pulses to the servos was a very good idea (does Beau ever have bad ideas?). Your comment got me wondering about how much current the logic signal puts out. I'll need to measure it sometime (I'm sure it varies from servo to servo though). Some servos wont work on 3.3V logic if there is a resistor (4.7K) on the signal line so I'd think the signal current is definitely a measureable amount.
  • ercoerco Posts: 20,256
    edited 2016-11-22 01:04
    54 cent spst SIP reed relays, 5 for $2.72, if anyone still uses relays: http://www.ebay.com/itm/141975921354

    These are 5V types, rare low 10 mA coil current, so one can be driven directly by a Stamp pin (no transistor). Will advise later if they work at all from a 3.3V Prop pin.

    s-l500.jpg
  • Who an afford $0.50 for a relay?! For that kind of money, you should be getting the transistor driver circuit, flyback diode, screw terminals. Heck, throw in a few LEDs, because everyone knows that lights make things work better.

    49-cent relay module link

    This one even has a routed gap for creep/clearance from the low-voltage circuitry. By comparison, the spacing on the standard Keyes KY-019 module is questionable for controlling high voltage. Although, KY-019 does use the standard Stamp connector pinout (Signal, 5V, GND).
  • ercoerco Posts: 20,256
    edited 2016-11-22 02:58
    Nice, hatallica! I'll order some of those too. That's half the lowest price I find on Ebay: http://www.ebay.com/itm/122154355757

    I wish AliExpress took Paypal. Not sure if I trust them with my Visa info. In the past, I cancelled & got a new credit card # right after using it on AliExpress. But it's Black Friday week and I can't afford to be between credit cards right now... :)

    http://www.makeuseof.com/tag/safe-shop-aliexpress/
    hatallica wrote: »
    Although, KY-019 does use the standard Stamp connector pinout (Signal, 5V, GND).
    Agreed, the world would be more plug & play if everything used standard servo connections.
  • Cluso99Cluso99 Posts: 18,069
    I have used Aliexpress by credit card a number of times without problems.
    Should I be worried?
  • erco wrote: »

    Aliexpress is not for the faint of heart. It is almost like shopping at the night markets in Bangkok.
    I never really had any concerns about my credit card, though. All of my financial info is readily available online due to breaches at shady places like Target and Home Depot.
  • TorTor Posts: 2,010
    edited 2016-11-22 13:12
    Never had an issue with aliexpress. The shop you're buying from doesn't get your credit card information, only aliexpress. They'll hold the money in escrow until you confirm that you have received the goods, *and* you're happy with it (another step) (so there are more steps involved in an aliexpress transaction than an ebay transaction), after that ali sends the money to the seller.

    The credit card I used in the past was stored in my profile, but if I want to add my new (non-expired card, but different number) to ali I will have to go through their draconian 'alipay' process, which involves inputting data from my driver's license or passport - that's completely out of the question, of course. But fortunately it works fine to not store anything, just having to enter the card info every time. But that's actually better, from a safety point of view. Forget about alipay.

    The thing with ali though is that there's a period of at least a week, after ordering, where ali sorts out the order with the seller. Only then will they ship. So it may take longer than ebay, depending. When I order from Japan (which I can easily do with ali, and could not with ebay, at least not until the ebay/paypal split), there's a week or more before it's shipped, but after that it's usually quick.

  • ercoerco Posts: 20,256
    Might be worth getting a separate credit card just for Aliexpress.

    I looked into prepaid Visa cards but the fees are relatively high, something like $4-5 just to activate a $25 card.

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2016-11-22 19:03
    If Aliexpress accepts PayPal, I'd go that route: just another layer of insulation from fraud. Subsequent to the only time I ever submitted CC info to a company in China, my bank caught several fraudulent charges that I did not have to pay for, and they sent me a new card. (Thanks, Bank of America!)

    -Phil
  • Credit card companies are great at sniffing out fraud, and some type of fraud protection is pretty much standard today. They want you to feel absolutely comfortable using your card for every transaction.

    The only hassles that I have had with Aliexpress were perhaps 4-5 years ago. The process is much better today and I would consider it to be on-par with eBay when buying cheap stuff. It is funny how much pricing can vary across these two channels, so I check both.
Sign In or Register to comment.