How Relay Works – Different Types of Relays

Every electronics hobbyist has used relays at some point. There are so many different types of relays available in the market. But choosing the right relay for a particular project is important.

Then an interesting question arises how can these “Relays” work? Well, you are arriving at the right article, where you will learn in detail about these relays working principles. And lastly, we will also build a relay module and interface Arduino with it.

So let’s begin

What is a Relay?

A relay is an automatic switch, which can sense automatically and operate itself. Generally, it uses an electromagnetic field for its operation. But in recent times there is a newer version available which has an electronics mechanism such that a solid state relay.

Why Do We Use Relay?

Relay is used in all our essential projects to control a load using a low-power signal, or several circuits must be controlled by a single signal. Relays ensure complete electrical isolation between the controlling and controlled circuits.

It is similar to a transformer as it also reduces the current flow through the primary control switch, a relatively low amperage switch. The difference is that in the case of a transformer it is a secondary coil and in the case of a relay it is the primary coil. It is used to turn on or off a much higher capacity load for both AC and DC loads. We’ll discuss an example using Arduino later in this article.

Basic Sections of an Electromechanical Relay

There are two basic parts that make this relay work.

  • Primary Section
  • Secondary Section

The main function of the primary part is to provide the control signal to operate the relay. The primary mechanical circuit is generally connected to a low-voltage DC signal. This could be controlled by some sensors or manual switches.

The secondary part contains the AC or DC load that must be controlled. When we talk about a load, we mean any device (depending on the relay specified amperage) that is a fan, water pump, high-wattage compressor or even a small light bulb.

On the primary side, there is an electromagnetic coil which generates an electromagnetic field when the current passes through a wire. When the wire is wrapped into a coil, the electromagnetic field of each wire forms up together to create a larger and stronger electromagnetic field. It will be further controlled by simply controlling the current that passes through it.

At the end of the electromagnet, we find the armature. This is a small component inside the relay which is attached. When the electromagnet energises, it attracts the armature. When the electromagnet is de-energised, the armature returns to its first position. Basically, a small spring is used for doing this operation.

Project

Relay Module

Circuit Diagram

Relay Module Circuit Diagram

Components Required

  • Relay
  • 1N4007 PN Diode
  • BC547 NPN Transistor
  • 1KΩ Resistor
  • 100Ω Resistor (x2)
  • Green LED
  • Red LED
  • 3 Pin Connector (x2)
  • 5 Volt Power Supply
  • Veroboard

PCB Design

After designing the schematic diagram of the Relay Module, the assembled components and wiring are too clumsy and looked unprofessional. In fact, the wiring also has a chance of loose connection. Then I realised that we need to design the whole system small so that it will fit on a small board. To give it a clean and professional look I decided to build its PCB prototype using EasyEDA software as it is so simple to use. Now come to the main part, where we need to order our PCB prototype. I always prefer PCBWay for their quality assurance, fastest delivery and also for 24/7 customer support.

You can view the Gerber file here Gerber File Viewer.

PCB View

Relay Module 2D View Angle
2D View
Relay Module 3D View

Why I Choose PCBWay as My First Preference?

I’ve done several runs with PCBWay and am happy with the results, it’s good quality. The etching, solder mask, and hole sizes are all done well and that is what matters to me. It takes a few hours for a design to get approved and then a couple of days to finish and ship. With more than a decade in the field of PCB prototypes and fabrication, PCBWay has proved its assurance from time to time. They always look at the needs of the customer from different regions in terms of quality, on-time delivery, cost-effectiveness and any other demanding requests.

PCBWay Gold Finish
PCBWay Thickness

These PCBs were manufactured by PCBWay and the finish quality really impressive, especially with the gold finish path. If you want to finish your product faster you could also ask PCBWay to make a panelized order where you receive multiple PCBs in a single panel. With this, you will also receive SMT Stencil from PCBWay, saving you time and effort. All the orders are high quality and could select a lot of settings such as thickness, flexible PCB, the colour of the solder masks, the number of layers, material, surface finish and more.

Guide for Ordering PCB from PC

How Does an Electromechanical Relay Work?

Here are the basic two types of relays, the normally open and normally closed types. There are some more relays, we’ll look at those later.

Coming to the normally open (NO) type, no current flows through the secondary circuit, so the load is off. However, when a current is passed through the primary part, a magnetic field is generated in the electromagnet. This magnetic field attracts the armature and pulls the moveable contactor until it touches the secondary part. This method closed the circuit and provides electricity to the load.

About the normally closed (NC) type, the secondary part is normally complete and so the current already passes through the load. When a current is passed through the primary circuit, the electromagnetic field causes the armature to push away which disconnects the contactor and breaks the circuit, this cuts the supply of electricity to the load.

How Does Solid State Relay (SSR) Work?

The operation of Solid State Relays or SSRs is similar in principle, but unlike electromechanical relays, it has no moving parts. The solid-state relay uses the electrical and optical properties of solid-state semiconductors to perform its input and output isolation as well as switching functions.

With this type of device, we find an LED light on the primary side, instead of an electromagnet. The LED provides optical coupling by shining a beam of light across a gap and into the receiver of an adjacent photo-sensitive transistor. We control the operation of this type by simply turning the LED on and off.

The phototransistor acts something like an insulator and doesn’t allow current to flow unless it is exposed to light. Inside the phototransistor, we have different layers of semiconductor materials. There are N-type and P-type, which are sandwiched together. The N-type and P-type are both made from silicon but they have each been mixed with other materials to change their electrical properties. The N-type has been mixed with a material that gives it lots of extra and unneeded electrons, which are free to move around to other atoms. The P-type has been mixed with a material that has fewer electrons, so this side has lots of empty space which electrons can move to.

To overcome this, we can use something like a diode to suppress this. The diode only allows current to flow in one direction, so in normal operation, the current flows to the coil. But, when we cut the power, the back EMF is going to push the electrons and so the diode will now provide a path for the coil to dissipate its energy safely so that it doesn’t damage our circuits.

When the materials are joined together, an electrical barrier develops and prevents the electrons from flowing.

However, when the LED is turned on, it will emit another particle known as a photon. The photon hits the P-type material and knocks the electrons, pushing them across the barrier and into the N-type material. The electrons at the first barrier will now be able to also make the jump and so a current is developed. Once the LED is turned off, the photons stop knocking electrons across the barrier and so the current in the secondary side stops.

So, we can control the secondary circuit just by using a beam of light.

Types of Relays

There are many types of relays, we’re going to consider a few of the main ones as well as some simple examples of how they are used.

Normally Open Relays

As we have seen earlier in this article, we have the simple normally open relay. This means the load of the secondary side is off until the circuit is complete on the primary. We can use this for example to control a fan by using a bimetallic strip as a switch on the primary side. The bimetallic strip will bend as it increases in temperature, at a certain temperature it will complete the circuit and turn the fan on to provide some cooling.

Normally Closed Relays

We also have a normally closed relay. This means the load on the secondary side is normally on. We could for example control a simple pump system to maintain a certain water level in the storage tank. When the water level is low, the pump is on. But, once it reaches the limit we require, it completes the primary circuit and pulls the contactor away, which cuts the power to the pump.

Latching Relay

In a standard, normally open, relay, once the primary circuit is de-energised, the electromagnetic field disappears and the spring pulls the contactor back to its original position. Sometimes, we want the secondary circuit to remain live after the primary circuit is opened. For that, we can use a latching relay.

For example, when we press the call button on an elevator, we want the light on the button to remain on, so that the user knows the elevator is coming. So, we can use Latching Relays to do this. There are many different designs for this type of relay, but in this simplified example, we have 3 separate circuits and a piston which sits between them. The first circuit is the call button. The second is the lamp and the third is the reset circuit.

When the call button is pressed, it completes the circuit and powers the electromagnet, this pulls the piston and completes the circuit to turn the lamp on. A signal is also sent to the elevator controller to send the elevator down. The button is released, which cuts the power to the initial circuit, but as the piston isn’t spring-loaded, it stays in position and the lamp remains on.

Once the elevator car reaches the lower floor, it makes contact with the off switch. This powers the second electromagnet and pulls the piston away, cutting the power to the lamp.

Latching relays, therefore, offer the benefit of having positional ‘memory’. Once activated, they will remain in their last position without the need for any further input or current.

Double or Single Pole

Relays can have single or double poles. The term Pole refers to the number of contacts switched when the relay is energised. This allows more than one secondary circuit to be energised from a single primary circuit.

We could, for example, use a double pole relay to control a cooling fan and also a warning light. Both the fan and lamp are normally off, but when the bimetallic strip on the primary circuit gets too hot, it bends to complete the circuit. This creates an electromagnetic field and closes both contactors on the secondary side, this provides power to the cooling fan as well as the warning light.

Double or Single Throw Relays

When dealing with relays, you will often hear the term “throws”. This refers to the number of contacts or connection points. A double-throw relay combines a normally open and normally closed circuit. A double throw relay is also called a changeover relay, as it alternates, or changes, between two secondary circuits.

In this example, when the primary circuit is open, the spring on the secondary side pulls the contactor to terminal B, powering the lamp. The fan remains off because the circuit is not complete.

When the primary side is energised, the electromagnet pulls the contactor to terminal A and diverts the electricity, powering the fan and turning the lamp off. So, we can use this type of relay to control different circuits depending on an event.

Double Pole, Double Throw Relay

A double pole, double throw relay or DPDT is used to control 2 states on 2 separate circuits.

Here we can see a DPDT relay. when the primary circuit is not complete, terminals T1 and T2 are connected to terminals B and D respectively. The red LED and the indicator light are energised.

When the primary circuit is closed then T1 and T2 connect to terminals A and C, the fan turns on and the green LED is energised.

Suppressor Diodes (Flywheel Diodes)

Something we need to consider when working with electromagnets is the back EMF or electromotive force. When we power the coil, the electromagnetic field builds up to a maximum point, the magnetic field is storing energy. When we cut the power, the electromagnetic field collapses and releases this stored energy very quickly, this collapsing field continues to push the electrons, which is why we get the back EMF. This isn’t a good thing because it can produce very large voltage spikes which damage our circuits.

Leave a Comment