Arduino ProjectsTutorials

Relay Module with Arduino Tutorial


In this tutorial, we will explore how to use a Relay Module With Arduino. We will go over the basics of a Relay and how to connect it to an Arduino. We will then create a simple circuit that will turn on an LED when the relay is activated.

The one-channel relay module works with a voltage of 5V and can drive loads of up to 250V AC or 30V DC, supporting the highest current of 10 A. It has a power indicator LED, 2 power and 1 control pin.

Required Materials

  • 1x Arduino Uno
  • 1x 5v Relay Module
  • 3x Male-Female Jumpers
  • 3x Electric wires

What is a Relay Module?

Relay module

A relay module is an electronic control device that is used to control a switch or circuit. It is usually used in applications where a switch needs to be controlled by a computer or other electronic device. A relay module typically consists of a relay, a control circuit, and a power supply. The relay module may have one or more relays, each with its own set of contacts.

How does the Relay Module work?

6 2The Relay Module is an electronic device that is used to control a variety of electrical appliances and devices. It works by using a small coil of wire that is wrapped around an electromagnetic core. When a current is passed through the coil, it creates a magnetic field that activates the relay and allows it to switch on or off. The relay can be used to control anything from a small light bulb to a large industrial machine. Check How Relay Works


Relay Module Pinout

A relay module typically has four pins: two for the coil, one for the Normally Open (NO) contact, and one for the Normally Closed (NC) contact. The coil is energized by a voltage applied to the coil pins. This creates a magnetic field that activates the relay, which then switches the position of the contacts.

Relay Module with Arduino Tutorial

  • The NO (Normally Open): contact is open when the relay is not activated and closed when the relay is activated.
  • The COM (Common):  common pin. It is used in both normally open mode and Normally closed.
  • The NC (Normally Closed): contact is closed when the relay is not activated, and open when the relay is activated.
  1. VCC
  2. Common
  3. Normally open
  4. Normally closed
  5. GND

Relay modules are typically labelled as follows: Coil (+) Coil (-) NO NC

How to Use a Relay Module with Arduino

The first thing we need to do is connect the relay module to the Arduino. The relay module has three pins: two for the power supply (VCC and GND), and one for the signal input (IN1) We will be connecting the VCC and GND pins to the 5V and GND pins on the Arduino, the IN1 pin to digital pin 8 on the Arduino.

  • GND: goes to ground
  • IN: 2 (it will be attached to an Arduino digital pin 2)
  • VCC: goes to 5V

Relay Module with Arduino Tutorial

Programming & Code – Relay Module With Arduino

Now that the relay module is connected to the Arduino, we can write a sketch to control the relay.


  • Copy the above code and open it with Arduino IDE
  • Upload button on Arduino IDE to upload code to Arduino
  • See LED Start blinking

Related Posts

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button

Adblock Detected

Please consider supporting us by disabling your ad blocker