How to Use 2 Channel Relay Module Using Arduino

Introduction: How to Use 2 Channel Relay Module Using Arduino

About: someone who likes electronics Yt channel : https://www.youtube.com/c/mrsottong IG 1 : sottong_teknik

In the previous article, I already discussed about the Relay Module. The Relay Module that I used in the article is the 1 Channel Relay Module.

In this article I will discuss the relay module again. The relay module that I used is different from the previous module. This time I will use the 2 channel relay module.

this is a feature of the relay module that I will use:

  • 2 Channel Relay
  • Optocoupler LOW Level Triger
  • Led relay indicator
  • Relay Maximum output : 10A/250 VAC, 10A/30 VDC.
  • Optocoupler isolation

Step 1: Required Component

Components needed for this tutorial:

Step 2: Connect the Relay Modul to Arduino

See the instructions below to connect the Relay Module with Arduino

Relay Modul to Arduino

GND ==> GND
IN1 ==> D12

IN2 ==> D11

VCC ==> +5V

Step 3: Programming

To control the Relay Module, we don't need to use "Library".

Take a look at the sketch I made for more clarity.

#define Relay1 12
#define Relay2 11

void setup() { pinMode(Relay1, OUTPUT); pinMode(Relay2, OUTPUT);

}

void loop() { digitalWrite(Relay1, HIGH); digitalWrite(Relay2, LOW); delay(3000); digitalWrite(Relay2, HIGH); digitalWrite(Relay1, LOW); delay(3000); }

Step 4: Result

What happens to the relay module after I enter the program?

The thing that happens is, the relay module will live alternately. When relay1 is off, relay2 is on, and vice versa.

Step 5:

Be the First to Share

    Recommendations

    • Make it Glow Contest

      Make it Glow Contest
    • First Time Author Contest

      First Time Author Contest
    • PCB Challenge

      PCB Challenge

    Discussions