Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use 2 channel relay 5v: Examples, Pinouts, and Specs

Image of 2 channel relay 5vDesign with 2 channel relay 5v in Cirkit Designer

Introduction

The 2 Channel Relay 5V module is an electronic component designed to control two independent circuits using a low voltage 5V signal. It acts as an electrically operated switch, allowing a microcontroller or other low-power device to control high-power devices such as lights, motors, or appliances. This module is widely used in home automation, robotics, and industrial control systems.

Explore Projects Built with 2 channel relay 5v

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of ESP32-Controlled Dual Relay Module: A project utilizing 2 channel relay 5v in a practical application
ESP32-Controlled Dual Relay Module

This circuit features an ESP32 microcontroller connected to a two-channel relay module. The ESP32's digital pins D25 and D26 are used to control the relay channels IN1 and IN2, respectively, allowing the microcontroller to switch external circuits on and off. The ESP32 and the relay module share a common ground and the ESP32's Vin pin supplies power to the relay's VCC, indicating that both operate at compatible voltage levels.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

Input Pins (Control Side)

Pin Name Description
VCC Connect to 5V power supply (powers the relay module).
GND Connect to ground of the power supply or microcontroller.
IN1 Control signal for Relay 1 (active LOW).
IN2 Control signal for Relay 2 (active LOW).

Output Pins (Load Side)

Each relay has three output terminals: | Terminal Name | Description | |---------------|-----------------------------------------------------------------------------| | COM | Common terminal for the relay. | | NO | Normally Open terminal (disconnected from COM when the relay is inactive).| | NC | Normally Closed terminal (connected to COM when the relay is inactive). |

Usage Instructions

How to Use the Component in a Circuit

  1. Power the Module: Connect the VCC pin to a 5V power source and the GND pin to ground.
  2. Connect the Control Signals:
    • Connect IN1 and IN2 to the digital output pins of a microcontroller (e.g., Arduino).
    • When the control signal is LOW (0V), the corresponding relay will activate.
  3. Connect the Load:
    • For each relay, connect the load to the COM and NO or NC terminals, depending on the desired behavior:
      • Use NO if the load should be OFF by default and turn ON when the relay is activated.
      • Use NC if the load should be ON by default and turn OFF when the relay is activated.
  4. Test the Circuit:
    • Use the microcontroller to send control signals to IN1 and IN2 to toggle the relays.
    • Observe the onboard LEDs to verify relay activation.

Important Considerations and Best Practices

Example Code for Arduino UNO

// Example code to control a 2 Channel Relay 5V module with Arduino UNO

// Define the relay control pins
const int relay1 = 7; // Connect IN1 to digital pin 7
const int relay2 = 8; // Connect IN2 to digital pin 8

void setup() {
  // Set relay pins as outputs
  pinMode(relay1, OUTPUT);
  pinMode(relay2, OUTPUT);

  // Initialize relays to OFF state (HIGH signal)
  digitalWrite(relay1, HIGH);
  digitalWrite(relay2, HIGH);
}

void loop() {
  // Turn Relay 1 ON (LOW signal)
  digitalWrite(relay1, LOW);
  delay(1000); // Keep it ON for 1 second

  // Turn Relay 1 OFF (HIGH signal)
  digitalWrite(relay1, HIGH);
  delay(1000); // Keep it OFF for 1 second

  // Turn Relay 2 ON (LOW signal)
  digitalWrite(relay2, LOW);
  delay(1000); // Keep it ON for 1 second

  // Turn Relay 2 OFF (HIGH signal)
  digitalWrite(relay2, HIGH);
  delay(1000); // Keep it OFF for 1 second
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. Relays Not Activating:

    • Ensure the VCC and GND pins are properly connected to a 5V power source.
    • Verify that the control signals (IN1 and IN2) are being correctly sent from the microcontroller.
    • Check if the onboard LEDs light up when the relays are triggered.
  2. Erratic Relay Behavior:

    • Use a stable and sufficient power supply for the relay module.
    • Ensure proper grounding between the relay module and the microcontroller.
  3. Load Not Switching:

    • Verify the wiring of the load to the COM, NO, and NC terminals.
    • Ensure the load does not exceed the relay's maximum ratings.
  4. Microcontroller Resetting:

    • High-power loads may cause voltage spikes. Use flyback diodes or snubber circuits to suppress these spikes.

FAQs

Q1: Can I use this module with a 3.3V microcontroller?
A1: Yes, the module is compatible with 3.3V control signals, but ensure the VCC pin is still powered with 5V.

Q2: Can I control AC and DC loads simultaneously?
A2: Yes, as long as each relay's load does not exceed the specified ratings.

Q3: Is it safe to use this module for high-voltage applications?
A3: Yes, but ensure proper isolation and follow safety precautions when working with high voltages.