Providing a powerful interface, enabling high-current switching with lower current sources.
In this month’s FUNdamentals, we’re taking a step back in time, to a device that pre-dates electronics and computers; to look at something used in the times of the first railways signals, yet which still holds a solid place in today’s design space. We are, of course, talking about relays.
The relay is, in effect, a switch that can be operated by an electrical current instead of physical means . It consists of a closely wound coil of wire, designed to produce a magnetic field when a current passes through the coil. This magnetic field then pulls a metal actuator toward it.
This actuator has an electrical connection attached, usually referred to as the “common”. When the relay coil is not energised, this actuator is held against one set of contacts by a spring, and these contacts are referred to as “normally closed” or “NC” because the resting state of any switch or component is called its “normal” state.
When the actuator moves toward the relay coil, the contacts detach from the normally closed contacts, swing across a gap, and rest against the other set of contacts called the “normally open" or “NO” contacts. This means that without power to the relay coil, the NO contacts are open, or unconnected.
The number of positions any switch has is called the number of “throws”, and the number of parallel sets of contacts it has are called the “poles”. Relays are no different; being an electrically activated switch, if a relay has two parallel sets of contacts (always electrically separate from each other, and often used to switch both negative and positive at once), and two positions (normally open and normally closed), it is referred to as a “double pole, double throw” relay or “DPDT”.
Other common combinations are SPDT (single pole, double throw) where only one set of contacts exists), SPST (single pole, single throw), usually available in both NO and NC versions; and DPST, again available in NO or NC . Note that regardless, the relay coil has usually two independent contacts not mentioned in the naming.
In terms of retail availability, relays are available with 12V coils, and less commonly, 5V coils. When I started my electrical apprenticeship in 2004, there were still some relays in industrial situations that had 240V AC coils, but even then these were being replaced by 24V DC control systems. Today, only a handful of 240V AC coil relays are on the retail market, but for safety reasons they should be avoided. Typically you’ll need a 12V signal of sufficient current to operate the relay, but we’ll explore this in more detail shortly.
The other numbers that are important are the contact ratings. The contacts on a relay have both a safe working voltage, and a current handling limit. It is not uncommon for relays to be able to control 240V AC mains load from 12V DC control signals. However, for safety reasons again, try to avoid this.
The contact rating is actually the current rating of the contacts. Although the contact current rating may be the same for 240V AC as it is for 12V DC. For example, typically DC current is limited by the opening arc, and DC relays usually have different contacts to AC relays because of this.
A relay with a 240V 10A AC rating would be more likely to fail with the same current on a 12VDC load, especially if it is inductive. Don’t assume it will be okay, especially if the rating specifically states the contact current in AC terms.
The coil current, or sometimes the coil resistance may also be printed on larger relays, or available in data sheets for those who need to know. The driving circuit must be made to suit the relay coil current and voltage, or the relay must be chosen to suit the controller drive limits.
Herein lies a dilemma for many makers: most of us are using logic level circuits such as Arduino, giving 5V outputs or even 3.3V, to run output devices. How then do we operate a relay requiring a higher voltage or current, than the controller can drive directly?
The answer lies in the simple building block that is the centre of this article. The most effective method is to use a 12V supply for the whole project, use a regulator to power the logic with 5V or 3.3V as the controller requires, and then run each relay coil directly to the 12V supply via a transistor. This transistor is switched on and off by the controller logic, and allows the 5V signal to switch the 12V relay.
There are several benefits to using a relay, the main one being electrical isolation. This allows a 240V AC mains load (only to be approached legally by competent licensed people) such as an outdoor floodlight, to be controlled by low voltage logic with no electrical connection between the two.
Such isolation also allows for AC loads to be easily switched with DC control, or for high current loads such as motors, which may otherwise need very expensive high current transistors. Additionally, two separate power supplies can be used: one for control and one for load, allowing isolation of loads, which induce noise or cause spikes on their supplies.
This is useful for many monitoring situations, such as this case where an LED could light up on the back of your letterbox to indicate you have mail. Of course, there are variations on these circuits, and countless other applications as well.
The teacher in me is now going to throw down a challenge. There is a way to control a garage door motor using one push button switch, two limit or reed switches, and between one and five relays.
I won’t give too much away yet; however, the answer will be published in subsequent issues. We would love to see your imaginative solutions, as there are many that could be devised! Will yours be the simplest, the most imaginative, or the most functional?