Introducing our newest kit: the Evil Mad Scientist Simple Relay Shield for Arduino.
It’s a dead-simple single-purpose low-cost mechanical relay board, with a single low-power SPDT relay that can switch moderate loads of up to 5 A, AC or DC.
The relay is controlled by digital line 4— and that’s well labeled, too.
No library is needed. For a demo, just open the Arduino “Blink” example sketch and change the LED pin to 4. When output Digital 4 on your Arduino is low, the relay is in the “normal” state: the “Common” pin of the screw terminal is connected to the N.C. (“Normally Closed”) pin of the screw terminal.
When output Digital 4 goes high, the “Coil On?” LED will light up and the relay enters (for lack of a better term— suggestions welcome!) the “abnormal” state, and the Common pin is instead connected to the N.O. (“Normally Open”) pin of the screw terminal.
One of the main concerns about using higher voltages and/or currents on an Arduino shield is that you potentially have these things wired awfully close to things sticking up from your Arduino board, like the microcontroller itself or the USB connector. If you sometimes would like a little more breathing room, a good solution is to add the insulator shield Googly Eye Shield between the two.
The Simple Relay Shield circuit board is a standard 2-layer, 1/16″ thick FR-4 PCB, but with highly-visible yellow soldermask. While it is (yes) very simple, the Simple Relay Shield is an open source hardware project. The circuit board is designed in gEDA, and the design files are available for download at the Evil Mad Science Wiki.
The Simple Relay Shield is available now at Evil Mad Science.
I think the word you’re looking for is the “energized” state — I’m working on a project right now that involves a relay (at my job), and that’s the term we use when the relay is active.
Interesting shield – and the yellow/black carries just the right hint of wasp to urge caution!
I see why you have de-rated the relay for safety, but a couple of points of interest occur: You have de-rated the current as well as the voltage. Is that because even with top and bottom tracks the PCB can’t safely carry more than 5A? It’s not something I’ve looked into. Also, why de-rate the DC voltage further than the AC voltage? May be obvious but I’m missing it if so.
And although I agree that if it’s not “normal” it must be “abnormal”, perhaps “active” is more descriptive?
Ugi
The only thing that we have actually derated is the AC voltage. The labeling on the relay itself is not particularly clear, but its datasheet specifies a that the contact are rated for 5 A at 125 VAC (NO/NC) or 5 A at 24 VDC (NO/NC). There is a separate rating too (and here’s where it gets really confusing): if the relay is operated strictly in the “N.O.” mode, it’s rated for 10 A at 250 VAC/24 VDC if there is no load on the NC contact.
“Active” and “Energized” are both quite fine. ;)
Thanks Windell – Clearly I should have read the datasheet!
Is the PCB hardwired to pin 4? If so, how about adding selectable jumpers so that >1 board could be stacked on a single Arduino?
Yes, it’s hardwired. It’s actually not a bad idea to make the pin configurable, but the relay is tall enough that you actually can’t stack two of them, at least without another set of stacking headers in between.
Is it compatible with the Arduino Leonardo?
While we don’t have our own Leonardo yet, we do believe that it is 100% compatible, and will stand by that claim. The only header lines that are used are +5V, GND (x2) and D4, which are present in the same place on the Leonardo as other canonical shield-compatible Arduino variants.
(So far as we know, it is also compatible with all other shield-compatible Arduino variants that run on 5 V. As the relay requires 5 V to operate, it will not work on 3.3 V Arduino variants.)
For shields that don’t use a series of related pins (i.e., SPI or something) why not put jumpers on the board so you can choose the pin? Pin 4 could be the default but a jumperable trace area wouldn’t be much more work.
No more work, but it does go a little bit against the grain of “simple.” :)
You could have an easy-to-cut track like the Uno has for it’s auto-reset. That way, it could default to the “simple” arrangement of using pin 4 but if you know what you want then you could cut the default track and put in a jumper to another pin.
Just an idea.
its. Sorry.
Since it’s a form C relay whoever builds the kit might want to use a relay with specs suiting their own needs.
In the small picture I read the silkscreen as “cat on” instead of “coil on” and nothing about it seemed odd to me. Although “cat on” is not an abnormal state.
“When operated as a normally-open relay, it is capable of handling loads up to 10 A.”
Doesn’t the board say “DO NOT EXCEED … 5A” ?
Um… yes?
We put that label there for a reason. We could have also labeled it “DO NOT EXCEED … 5A, UNLESS NOTHING IS CONNECTED TO THE N.C. TERMINAL, IN WHICH CASE DO NOT EXCEED 10A.” You might disagree about whether or not it’s a good idea to be conservative in the labeling, but we really do prefer to err this way rather than the other.
The data sheet only lists a Max. switching voltage 250 VAC 24 VDC. :-( I was looking for a Min switching voltage rating. I am trying to figure out if this will work with the 24VAC in home hvac thermostat system?
Yes, it will work at 24 V, or other lower voltages, all the way down to DC. :)
How would I get this or something like this to be controlled form a PC over something like USB (rather than an Arduino board)? Is there a USB controller I could get?
There are quite a few ways, especially if you can be a little more open to the various options out there.
The ATtiny2313 microcontroller has a serial port, so you could put new firmware on the Art Controller and communicate directly with it (for example) via a USB-TTL cable. You can read more about how that kind of thing works in our article here:
http://www.evilmadscientist.com/2009/basics-serial-communication-with-avr-microcontrollers/
Secondly, there are a few possible meanings of “controlled from a PC.” Rather than doing “live” control, you can always reprogram the Art Controller from a PC over USB, through it’s 6-pin ISP port, to give it different functionality.
Third, if you asked the exact same question but didn’t rule out Arduino, we would (without question) suggest Arduino as the likely-best solution. An Arduino board can be used as a USB controller for receiving USB commands and directly controlling a relay in real time through (for example) our Relay Shield for Arduino:
http://shop.evilmadscientist.com/productsmenu/tinykitlist/544
In fact, one might say that the Art Controller is a lot like an Arduino + Relay Shield, just without the USB interface. So, if Arduino really won’t work for you, there’s likely some additional design requirement that you’re not saying here. ;)