Why Relay Is Used In Home Automation & IoT Devices
If you’re wondering why relay is used in home automation and IoT systems then wonder no more.
By the end of reading this post you will have enough knowledge to start implementing relays in your projects at home.
This post is aimed at the beginner and I’ll also answer some other common questions about relay components.. right here!
What Is A Relay?
A relay is an electronic component that uses an electro-magnet to act as a mechanical switch.
The main purpose of a relay is to switch on and off a high powered circuit from a low powered circuit.
A relay switch can be seen in many different shapes, sizes, colors, electrical ratings and capabilities.
The components rating is one of the most important aspects to be considered when purchasing a relay for a project.
If you plan to use a relay on a 240 volt circuit with 30 amperes of current for example then we need to make sure the relay is not limited to below these requirements.
If we use a relay (or any other component for that matter) that cannot support the power that it will be used in then let this be a warning to you..
It will most certainly make a loud bang as it spontaneously explodes into a million pieces!
Usually these limits will be clearly marked on the relay component.
If the relay doesn’t have these markings then I would advice not to use it in your projects at all.
It’s better to be safe than sorry right?!
How A Relay Works (Beginner's Introduction)
Because I’m writing this post for the beginner in mind, I’m purposefully not going into the technical details about relays here today.
But if you would like a more technical description then circuitstoday.com is a good place to start.
The wiki also covers relays in much more depth and describes the different types of relays that exist.
When a small electrical charge is applied to a relay, the magnet inside of the relay attracts a metal connector and then closes a circuit.
When we stop the electrical signal to the relay, the electro-magnet is no longer magnetised and a spring pulls back the metal connector which then opens the circuit.
We call this a “Normally Open” (NO) circuit.
We can also have a “Normally Closed” (NC) relay too which works in the opposite way.
In this instance then, the electro-magnet is activated without the controlling signal. When a small electrical charge signal is applied to the relay then the magnet disconnects and breaks the circuit.
A single relay may support both NC and NO features.
Where Is A Relay Used?
We can trigger a relay remotely from a device such as a phone or tablet through bluetooth or wifi for example or we can trigger the relay locally.
For example: It’s possible to use an app on a mobile phone to switch on/off a house light which is powered by mains electricity.
Other mains powered devices could be:
- An electrical socket (outlet)
- A lamp
- Air conditioning
DANGER: As a beginner it is not recommended for you to experiment with high powered mains electricity as this could possibly cause serious injury or death.
Experimenting with a motor is an excellent way to safely practice using a relay which I will explain in the next section.
Why Relay Is Used In Motor Control
Relays are not only used to automate projects.
Yes we can control a motor through a relay in an automated system but there’s another reason why relay is used in home automation to trigger a motor..
It’s all about power.
Very little power is needed for the control electronics but motors require more power. We can’t simply connect a motor to a controlling circuit for this reason.
The motor would drain the very little power from the controlling circuit and make the control electronics unstable and possibly crash or reboot.
We can use a motor with a separate power supply to give it the power that it needs. A relay can be used to switch the motor on and off by connecting/disconnecting it from it’s own power source.
What Is A Relay Module?
We can purchase a relay component on it’s own.
But there are some very common functions that people need to do and so it’s possible to buy a relay that’s soldered onto a circuit board with some other supporting components.
We call this circuit board a relay module.
The image below shows a relay module. The relay is the blue square-shaped component in the middle.
These relay modules are not particularly expensive and can be purchased from Amazon for less than a few dollars.
The relay pictured above is known as a “1 channel” relay module as it has only 1 relay which can be used to switch on/off 1 circuit.
It’s not uncommon to see 2 channel, 3 channel relay modules and so on. We simply count the number of relays on the module to indicate how many channels a particular module supports.
We could connect an Arduino board for example which has a microcontroller on it then we can write programming code to control the relay.
Lights (LED’s/Light Emitting Diodes) can be used to indicated to us if the relay is triggered or not. It’s common to have a red LED lit to indicate that the relay is not switched on, and a green LED would emit light when the relay is activated by the small electrical charge from a control device.
screw terminals (or connector blocks) similar to the header pins are usually provided on a relay module.
This provides an easy way to connect wires to the relay its self.
It’s much easier to screw in a wire at a terminal than it is to solder an electronic joint that may need moving in the future.
The aim of this post is to cover the question: “Why relay is used in home automation and “Internet of Things” devices and systems.”
I also gave a general overview of what a relay looks like, how we can use a relay module to help us with building automation circuits and a basic guide on how relays operate.
Relays are excellent components for home automation and IoT projects and I would certainly recommend trying out some low-powered relay circuits such as motor controlling.
If you don’t have all the necessary basic hand tools and equipment for constructing your own projects at home then I recommend reading my post here which I cover in more detail.
FREE Download: CIoTP Checklist!
The ‘Certified Internet of Things Practitioner’ Certification provided by CertNexus is an excellent blueprint to begin learning IoT.
To download your CIoTP PDF CheckList file Click Here