Guide for Relay Modules

by Jun 17, 2020Articles

Arduino relay allows you to connect devices operating in relatively high current or voltage modes.

We can not directly link the Arduino board with powerful pumps, motors, even an ordinary intense bulb the board is not equipped for such a load and does not operate. That is why we’re going to have to add a relay to the circuit you can find in any project.

In this article we will talk about what relays are, how you can connect them to your Arduino project.

Introduction to Relay

A relay is a gateway that allows you to connect together electrical circuits with completely different parameters. 

The relay in Arduino turns on or off external devices, in a certain way closing or disconnecting the separate electrical network into which they are connected.

 With the help of Arduino and relays, we control the process of turning on or off the same way we turn the lights on or off at home giving a command to close or open. 

Characteristics

It module has two characteristics.

  1. Channels – Channels are based on how many devices to be connected.
  2. Power – Power based on Microcontrollers.

Pin Out diagram of Relay

This is a 2 channel relay where it has 2 relays. The connection on the right side indicates the connection to be done with the Microcontroller(Arduino).

Similarly, the connection on the left side with the devices like Bulb, motor etc.

Connections(Arduino)

  1. VCC – To connect to the supply of the Arduino
  2. GND – To connect the ground to the Arduino
  3. IN1 – To control the first relay, should be connected to the digital pin of Arduino
  4. IN2 – To control the second relay, should be connected to the digital pin of Arduino

On the other set of pins consists of JD-VCC is used to powers the electromagnet of the relay.

Connections(Devices)

  1. NO – Normally Opened, If connected to NO the load remains disconnected before the trigger
  2. NC – Normally Closed, The other end of the load is either connected to NO or NC. If connected to NC the load remains connected before the trigger
  3. COM– Common, It is connected to one End of the Load that is to be controlled

Relay Example

Code

const int relPin = 3;

void setup() {
    pinMode(relPin, OUTPUT);
}

void loop() {
    digitalWrite(relPin, HIGH);
    delay(1000);
    digitalWrite(relPin, LOW);
    delay(3000);
}

This program and the connection blinks a bulb every 1 second, same as Blinking LED but with an bulb

Creating a multiplication Skill in Alexa using python

Written By Monisha Macharla

Hi, I'm Monisha. I am a tech blogger and a hobbyist. I am eager to learn and explore tech related stuff! also, I wanted to deliver you the same as much as the simpler way with more informative content. I generally appreciate learning by doing, rather than only learning. Thank you for reading my blog! Happy learning!

RELATED POSTS

5 Booming Technologies in IoT to watch out for in 2022

5 Booming Technologies in IoT to watch out for in 2022

Introduction Internet of Things - IoT is one of the industries that has experienced an exponential rise in the past few years. With technology on the rise, we expect this field to grow even further in the coming years. It is one of the most important technologies...

Furtherance to SIM Technology: eSIM and embedded SIM

Furtherance to SIM Technology: eSIM and embedded SIM

eSIM (electronic SIM) and embedded SIM are two different terms. While both are under development and can be incorporated in IoT. They will result in more efficient SIM technology combined with the fast-growing and in-demand 5G network. Before going into the details...

The Internet of Nano Things (IoNT): Evolution of a new era

The Internet of Nano Things (IoNT): Evolution of a new era

Internet of Nano Things The internet of nano-things (IoNT) is a network that connects a collection of very small devices to transport data. The internet of nano-things is similar to the internet of things. The only difference is that the devices present inside it are...

10 Innovations in IoT Using 5G

10 Innovations in IoT Using 5G

5G usage cases typically depend on the improved speed and stability of 5G, as well as the reduced latency it provides, and they have the potential to disrupt both conventional and digital industries. And, in the coming months, years, and decades, 5G technology will...

What is IoRT(Internet of Robotic Things)

What is IoRT(Internet of Robotic Things)

The IoT and robotics, two different fields, are coming together to create IoRT (Internet of Robotic Things). The IoRT is a concept in which intelligent devices can monitor the events happening around them, fuse their sensor data, use local and distributed intelligence...

Discover the Top 5 proven Use cases of IoT data analytics

Discover the Top 5 proven Use cases of IoT data analytics

Billions of connected IoT devices are generating a massive amount of data every second. Meanwhile, as the IoT is booming this data generation has exponential growth. This data needs to be analyzed in order to retrieve insights out of this data. Further, these insights...

Data Analysis role in IoT

Data Analysis role in IoT

Before diving into Data analysis role in IoT, let us first understand what data analysis exactly mean What is Data Analysis? According to Wikipedia, Data analysis is a process of...

What is the future of IoT?

What is the future of IoT?

IoT or the Internet of Things describes the network of physical objects—“things”—that are embedded with sensors, software, and other technologies for the purpose of connecting and exchanging data with other devices and systems over the Internet. The definition of...

IoT Security Solutions

IoT Security Solutions

Introduction IoT is one of the emerging technology. Moreover, this has its own risks and rewards. IoT devices sure make our lives simpler and automate a lot of processes. By now there are billions of IoT devices which include Smart TVs, Smart Refrigerators, Smart...

The relation between Embedded Systems and IoT

The relation between Embedded Systems and IoT

Embedded systems are the major part of our technological advances, found in everyday items such as – microwave oven, washing machine, remote control, RFID tags, routers, modems, PDAs, mobile phones etc. However, we’re in a new era of internet-based...

VIDEOS – FOLLOW US ON YOUTUBE

EXPLORE OUR IOT PROJECTS

IoT Smart Gardening System – ESP8266, MQTT, Adafruit IO

Gardening is always a very calming pastime. However, our gardens' plants may not always receive the care they require due to our active lifestyles. What if we could remotely keep an eye on their health and provide them with the attention they require? In this article,...

How to Simulate IoT projects using Cisco Packet Tracer

In this tutorial, let's learn how to simulate the IoT project using the Cisco packet tracer. As an example, we shall build a simple Home Automation project to control and monitor devices. Introduction Firstly, let's quickly look at the overview of the software. Packet...

All you need to know about integrating NodeMCU with Ubidots over MQTT

In this tutorial, let's discuss Integrating NodeMCU and Ubidots IoT platform. As an illustration, we shall interface the DHT11 sensor to monitor temperature and Humidity. Additionally, an led bulb is controlled using the dashboard. Besides, the implementation will be...

All you need to know about integrating NodeMCU with Ubidots over Https

In this tutorial, let's discuss Integrating NodeMCU and Ubidots IoT platform. As an illustration, we shall interface the DHT11 sensor to monitor temperature and Humidity. Additionally, an led bulb is controlled using the dashboard. Besides, the implementation will be...

How to design a Wireless Blind Stick using nRF24L01 Module?

Introduction Let's learn to design a low-cost wireless blind stick using the nRF24L01 transceiver module. So the complete project is divided into the transmitter part and receiver part. Thus, the Transmitter part consists of an Arduino Nano microcontroller, ultrasonic...

Sending Temperature data to ThingSpeak Cloud and Visualize

In this article, we are going to learn “How to send temperature data to ThingSpeak Cloud?”. We can then visualize the temperature data uploaded to ThingSpeak Cloud anywhere in the world. But "What is ThingSpeak?” ThingSpeak is an open-source IoT platform that allows...

Amaze your friend with latest tricks of Raspberry Pi and Firebase

Introduction to our Raspberry Pi and Firebase trick Let me introduce you to the latest trick of Raspberry Pi and Firebase we'll be using to fool them. It begins with a small circuit to connect a temperature sensor and an Infrared sensor with Raspberry Pi. The circuit...

How to implement Machine Learning on IoT based Data?

Introduction The industrial scope for the convergence of the Internet of Things(IoT) and Machine learning(ML) is wide and informative. IoT renders an enormous amount of data from various sensors. On the other hand, ML opens up insight hidden in the acquired data....

Smart Display Board based on IoT and Google Firebase

Introduction In this tutorial, we are going to build a Smart Display Board based on IoT and Google Firebase by using NodeMCU8266 (or you can even use NodeMCU32) and LCD. Generally, in shops, hotels, offices, railway stations, notice/ display boards are used. They are...

Smart Gardening System – GO GREEN Project

Automation of farm activities can transform agricultural domain from being manual into a dynamic field to yield higher production with less human intervention. The project Green is developed to manage farms using modern information and communication technologies....