Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use 5V Relay Module: Examples, Pinouts, and Specs

Image of 5V Relay Module
Cirkit Designer LogoDesign with 5V Relay Module in Cirkit Designer

Introduction

The 5V Relay Module is an electronic switch designed to control high-voltage circuits using a low-voltage control signal. It is widely used in applications where electrical isolation and high-power switching are required. The module typically includes an electromechanical relay, driver circuitry, and input/output pins for easy interfacing with microcontrollers or other control systems.

Explore Projects Built with 5V Relay Module

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
DC-DC Converter and Relay Module Power Distribution System
Image of relay: A project utilizing 5V Relay Module in a practical application
This circuit consists of a DC-DC converter powering a 6-channel power module, which in turn supplies 5V to a 2-relay module. The power module distributes the converted voltage to the relay module, enabling it to control external devices.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered 4-Channel Relay Control with LED Indicators
Image of RELLAY BOARD TEST: A project utilizing 5V Relay Module in a practical application
This circuit consists of a 5V battery powering a 4-channel relay module, which controls four LEDs (red, yellow, green, and blue) through individual resistors. Each relay channel is activated by a corresponding SPST toggle switch, allowing manual control of the LEDs.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered LED Control with Pushbutton and Relay
Image of EXP.3 E: A project utilizing 5V Relay Module in a practical application
This circuit uses a pushbutton to control a 5V relay, which in turn powers a red LED. The MAHIR 1.mini module provides the necessary 3.7V power supply, and the relay switches the LED on and off based on the pushbutton input.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered IR Sensor Controlled Relay Module
Image of New: A project utilizing 5V Relay Module in a practical application
This circuit uses an IR sensor to control a 1 Channel 5V Relay Module, which is powered by a 9V battery. The IR sensor detects an object and sends a signal to the relay module to switch its state, enabling or disabling the connected load.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with 5V Relay Module

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 relay: A project utilizing 5V Relay Module in a practical application
DC-DC Converter and Relay Module Power Distribution System
This circuit consists of a DC-DC converter powering a 6-channel power module, which in turn supplies 5V to a 2-relay module. The power module distributes the converted voltage to the relay module, enabling it to control external devices.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of RELLAY BOARD TEST: A project utilizing 5V Relay Module in a practical application
Battery-Powered 4-Channel Relay Control with LED Indicators
This circuit consists of a 5V battery powering a 4-channel relay module, which controls four LEDs (red, yellow, green, and blue) through individual resistors. Each relay channel is activated by a corresponding SPST toggle switch, allowing manual control of the LEDs.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of EXP.3 E: A project utilizing 5V Relay Module in a practical application
Battery-Powered LED Control with Pushbutton and Relay
This circuit uses a pushbutton to control a 5V relay, which in turn powers a red LED. The MAHIR 1.mini module provides the necessary 3.7V power supply, and the relay switches the LED on and off based on the pushbutton input.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of New: A project utilizing 5V Relay Module in a practical application
Battery-Powered IR Sensor Controlled Relay Module
This circuit uses an IR sensor to control a 1 Channel 5V Relay Module, which is powered by a 9V battery. The IR sensor detects an object and sends a signal to the relay module to switch its state, enabling or disabling the connected load.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Home automation systems (e.g., controlling lights, fans, or appliances)
  • Industrial automation for switching high-power devices
  • Motor control in robotics
  • IoT projects for remote device control
  • Safety-critical systems requiring electrical isolation

Technical Specifications

The following are the key technical details of the 5V Relay Module:

Parameter Specification
Operating Voltage 5V DC
Trigger Voltage 3.3V to 5V DC
Maximum Switching Voltage 250V AC / 30V DC
Maximum Switching Current 10A
Relay Type SPDT (Single Pole Double Throw)
Isolation Optocoupler isolation (in most models)
Dimensions Typically 50mm x 26mm x 18mm

Pin Configuration and Descriptions

Pin Name Description
VCC Connect to the 5V power supply.
GND Connect to the ground of the power supply.
IN Control signal input. A HIGH signal activates the relay, and a LOW signal deactivates it.
COM Common terminal of the relay switch.
NO Normally Open terminal. Connect the load here if you want it to be OFF by default.
NC Normally Closed terminal. Connect the load here if you want it to be ON by default.

Usage Instructions

How to Use the 5V Relay Module in a Circuit

  1. Power the Module: Connect the VCC pin to a 5V DC power supply and the GND pin to the ground.
  2. Control Signal: Connect the IN pin to a digital output pin of a microcontroller (e.g., Arduino UNO). Ensure the control signal voltage matches the module's trigger voltage (3.3V to 5V).
  3. Load Connection:
    • Connect the high-voltage load to the COM and either the NO or NC terminal, depending on the desired default state of the load.
    • For example, if you want the load to remain OFF when the relay is inactive, connect it to the NO terminal.
  4. Isolation: Ensure proper electrical isolation between the low-voltage control circuit and the high-voltage load to prevent damage or hazards.

Important Considerations and Best Practices

  • Power Supply: Use a stable 5V DC power supply to avoid erratic relay behavior.
  • Flyback Diode: If the relay module does not include a built-in flyback diode, add one across the relay coil to protect the circuit from voltage spikes.
  • Load Ratings: Ensure the load's voltage and current do not exceed the relay's maximum ratings (250V AC/30V DC, 10A).
  • Safety: Always handle high-voltage connections with care. Disconnect power before making any changes to the circuit.

Example: Using the 5V Relay Module with Arduino UNO

The following example demonstrates how to control a 5V Relay Module using an Arduino UNO to toggle a light bulb.

Circuit Connections

  • Connect the relay module's VCC and GND pins to the Arduino's 5V and GND pins, respectively.
  • Connect the relay module's IN pin to Arduino digital pin 7.
  • Connect the light bulb to the relay's COM and NO terminals.
  • Connect the other side of the light bulb to the AC power supply.

Arduino Code

// Define the relay control pin
const int relayPin = 7;

void setup() {
  // Set the relay pin as an output
  pinMode(relayPin, OUTPUT);
  
  // Ensure the relay is off initially
  digitalWrite(relayPin, LOW);
}

void loop() {
  // Turn the relay ON (light bulb ON)
  digitalWrite(relayPin, HIGH);
  delay(5000); // Keep the light ON for 5 seconds
  
  // Turn the relay OFF (light bulb OFF)
  digitalWrite(relayPin, LOW);
  delay(5000); // Keep the light OFF for 5 seconds
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. Relay Not Activating:

    • Cause: Insufficient control signal voltage.
    • Solution: Ensure the control signal voltage is between 3.3V and 5V.
  2. Erratic Relay Behavior:

    • Cause: Unstable power supply or electrical noise.
    • Solution: Use a decoupling capacitor (e.g., 100µF) across the VCC and GND pins.
  3. Load Not Switching:

    • Cause: Incorrect wiring of the load to the relay terminals.
    • Solution: Verify the load is connected to the correct terminals (COM and NO/NC).
  4. Burnt Relay Module:

    • Cause: Exceeding the relay's voltage or current ratings.
    • Solution: Ensure the load's voltage and current are within the relay's specifications.

FAQs

Q1: Can I use the 5V Relay Module with a 3.3V microcontroller?
A1: Yes, most 5V Relay Modules can be triggered with a 3.3V control signal. However, verify the module's trigger voltage range in its datasheet.

Q2: Can the relay switch both AC and DC loads?
A2: Yes, the relay can switch both AC (up to 250V) and DC (up to 30V) loads, provided the current does not exceed 10A.

Q3: Is the relay module safe for high-voltage applications?
A3: Yes, the relay provides electrical isolation. However, always follow safety precautions when working with high voltages.

Q4: Can I control multiple relays with one microcontroller?
A4: Yes, you can control multiple relays by connecting each relay's IN pin to a separate digital output pin on the microcontroller. Ensure the microcontroller can supply sufficient current for all relays.