Introduction

The Celtic Engineer is a weekly newsletter produced by Celtic Engineering Solutions. We hope you enjoy it. If you have any suggestions for topics, would like to give feedback or want your email added to the distribution list please send an email to [email protected]
The answer when found will be simple
When I was a young engineer, I worked with Methuselah’s brother for a time until he retired. He had all sorts of interesting sayings. One of them was that the answer when found would be simple. Most things are simple when you know the answer. Getting to that point is an exercise left to the student, another of his sayings. I think a really good candidate for these sayings is the common relay. In its most basic form, it is an electrically controlled switch. They can be much more complex than that which I will touch on lightly below, but to start with let’s talk about how you use a relay.

Scalpel please

Inside of the device is an electromagnet called the coil, see Figure 1. When energized, it moves a lever (yes, moving parts) and either makes a contact or breaks a contact. Most of the time it does both. Sometimes it makes and breaks several contacts at the same time. In Figure 1, you can see the three rows of four pins each along the left side. The top row are the normally closed contacts. The next row down is the common. The common is connected, touching, the normally closed contact when there is no power in the coil. When the coil is energized, see control pins, the common is connected to the normally open pins. They are normally (that is when the coil is not energized) open or not connected to the common contacts.
This relay has 4 poles. That is, it contains 4 circuits or 4 sets of contacts. Often this is referred to as a 4-Pole double-throw relay. ‘Double-throw’ because it touches a contact both when the coil is energized and also when it is not energized. If it was just a simple on off switch, like a wall light switch, it would be a single throw.

Figure 1 Relay with major parts labeled

It’s all about control

The control is usually made up of just two pins, a high and a low. You might wonder why they are marked positive and negative because if the arm was a simple piece of iron, it would hardly matter which way they were hooked up. The magnetic flux will pull the iron in to minimize the path length no matter the polarity.
There are two reasons that the polarity might matter. If a magnet is used instead of a simple piece of iron than one polarity would pull the magnet and arms closer the other would push it away. That is also one way they create a latching relay; a relay that changes position when you energize the coil and stays in that position even if they coil is then de-energized. Using a magnet also reduces the current needed to close the contact arm.

Let’s rectify this problem

The second reason is that sometimes they place a diode across the coil of a relay, that is in parallel. It might sound like they are making life more difficult for the engineer, but they are not. The way they used to make a spark for car’s engine was to run a current through a coil and then abruptly shut off the coil. The inductance of the coil makes the voltage increase across the coil, in such a polarity, to try and keep the current flowing. This is not magic. The energy to do this is taken from the collapsing magnetic field created by the current in the coil. When the voltage becomes high enough, it can jump the gap on the spark plug. This then ignites the vaporized gasoline and bang, but I digress. The point is that when you turn off the current to your relay coil, the same thing happens and delicate electronics, like transistors and MCU’s can get fried. The answer is to place a diode, sufficiently beefy to handle the current, in the opposite direction as the normal current. That way the relay driver never sees the diode while energized, and when the relay is shut off the diode acts like a short between the ends of the coil releasing the energy harmlessly. You can place this external to the relay of course, but it is nice when it is already in the relay and you don’t have to bother.

Too much voltage? I wish I had too much voltage.

If you have a 5V system and a 5-volt relay you are golden, but what if you have a 12-volt system and the only relay you can buy is a 5-volt relay. Many people will say, you must go buy a 12-volt relay. They lack imagination. The coil has a certain resistance let’s say 100 ohms. If it is rated for 5 volts, that means it will draw 50 mA when energized by a 5V power source (I=V/R; 0.05 = 5/100). If you hook it to a 12-volt power source you would pull (12/100) 120mA and likely burn out the coil.
We need to do something with those extra 7 volts. Since we know we want to draw 50 mA we could use a (7/0.05 = 140; V/I=R) 140-ohm resistor. It should be a half watt resistor since it will dissipate 0.35 watts (0.05 x 0.05 x 140).

Other relays

In this discussion, I have assumed that we were talking about mechanical relays, but there are solid state relays that have no moving parts. There are reed relays that have two long contacts that will contact each other in the presence of a strong enough magnetic field and then separate once the field is removed. There are overload or thermal relays that contain a bi-metallic strip that has two metals with dissimilar coefficients of expansion so that as it heats up it pulls away from a contact and opens up a circuit. There are even vacuum relays used in RF circuits that contain a vacuum that allows high voltages (tens of thousands of volts) to be handled without arcing. In AC power systems, the relay might be filled with an oil dielectric fluid to handle the large arc when the contacts are opened.

The real magic

I always thought relays were like magic because with a very small voltage (3.3V) you can control a 120V light, an electric motor or a rocket. Computers are just dandy, but when they can interact with the rest of the world and either gather information or cause things to happen, well, it gets exciting.

Final thoughts

This newsletter is sponsored by Celtic Engineering Solutions LLC, a design engineering firm based out of West Jordan, Utah, which can be found on the web at www.celticengineeringsolutions.com. You can find the newsletter on the company blog, LinkedIn or by subscribing. Send your emails to The Celtic Engineer at [email protected]