Fitty-Cent Relays
erco
Posts: 20,256
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.
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
thank you i be here all week.
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.
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.
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.
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...
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.
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.
But, if they were talking about servo's, I would have been spot on, right?
: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.
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.
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).
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/
Agreed, the world would be more plug & play if everything used standard servo connections.
Should I be worried?
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.
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.
I looked into prepaid Visa cards but the fees are relatively high, something like $4-5 just to activate a $25 card.
-Phil
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.