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

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

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

Introduction

A 5V relay is an electromechanical switch that uses a low voltage (5V) control signal to open or close a circuit, enabling the control of higher voltage devices. It consists of a coil, an armature, and contacts. When the coil is energized with a 5V signal, it creates a magnetic field that moves the armature, switching the contacts between their normally open (NO) and normally closed (NC) states.

Explore Projects Built with 5V Relay

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino UNO Controlled 5V Relay Switch
Image of relay: A project utilizing 5V Relay in a practical application
This circuit uses an Arduino UNO to control a 5V relay. The relay is powered by the Arduino's Vin and GND pins, and its control input is connected to digital pin D9 on the Arduino. The provided code is a basic template with no specific functionality implemented.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32 Wi-Fi Controlled Relay Switch
Image of nyoba: A project utilizing 5V Relay in a practical application
This circuit uses an ESP32 microcontroller to control a 1-channel 5V relay. The ESP32 toggles the relay on and off every 5 seconds, allowing it to control an external device connected to the relay's output.
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 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
WeMos D1 R2 Controlled Relay Switching Circuit for AC Bulb and USB Charger
Image of Hand Gesture Light: A project utilizing 5V Relay in a practical application
This circuit uses a WeMos D1 R2 microcontroller to control a 5V 2-relay module, which in turn controls the power to an AC bulb and a cellphone charger. The microcontroller also interfaces with a line tracking sensor, which likely provides input to control the relay states. The AC bulb and cellphone charger are powered by an AC wire connection, with the relay acting as a switch for the bulb.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with 5V Relay

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 in a practical application
Arduino UNO Controlled 5V Relay Switch
This circuit uses an Arduino UNO to control a 5V relay. The relay is powered by the Arduino's Vin and GND pins, and its control input is connected to digital pin D9 on the Arduino. The provided code is a basic template with no specific functionality implemented.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of nyoba: A project utilizing 5V Relay in a practical application
ESP32 Wi-Fi Controlled Relay Switch
This circuit uses an ESP32 microcontroller to control a 1-channel 5V relay. The ESP32 toggles the relay on and off every 5 seconds, allowing it to control an external device connected to the relay's output.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of RELLAY BOARD TEST: A project utilizing 5V Relay 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 Hand Gesture Light: A project utilizing 5V Relay in a practical application
WeMos D1 R2 Controlled Relay Switching Circuit for AC Bulb and USB Charger
This circuit uses a WeMos D1 R2 microcontroller to control a 5V 2-relay module, which in turn controls the power to an AC bulb and a cellphone charger. The microcontroller also interfaces with a line tracking sensor, which likely provides input to control the relay states. The AC bulb and cellphone charger are powered by an AC wire connection, with the relay acting as a switch for the bulb.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Home automation systems (e.g., controlling lights, fans, or appliances)
  • Industrial control systems
  • Motor control circuits
  • IoT projects for switching high-power devices
  • Safety systems requiring electrical isolation between control and load circuits

Technical Specifications

Key Technical Details

  • Operating Voltage (Coil): 5V DC
  • Trigger Current: ~70-100 mA
  • Contact Ratings:
    • Maximum Voltage: 250V AC / 30V DC
    • Maximum Current: 10A
  • Relay Type: Single Pole Double Throw (SPDT)
  • Isolation: Electrical isolation between control and load sides
  • Switching Time:
    • Operate Time: ~10 ms
    • Release Time: ~5 ms
  • Dimensions: Varies by manufacturer, typically compact for PCB mounting

Pin Configuration and Descriptions

The 5V relay typically has 5 pins. Below is the pin configuration:

Pin Name Description
Coil+ Positive terminal of the relay coil (connect to 5V control signal).
Coil- Negative terminal of the relay coil (connect to ground).
Common (COM) Common terminal for the load circuit.
Normally Open (NO) Open by default; closes when the relay is activated.
Normally Closed (NC) Closed by default; opens when the relay is activated.

Usage Instructions

How to Use the 5V Relay in a Circuit

  1. Power the Relay Coil:

    • Connect the Coil+ pin to a 5V DC control signal (e.g., from a microcontroller or external power source).
    • Connect the Coil- pin to ground.
  2. Connect the Load Circuit:

    • Identify the load you want to control (e.g., a light bulb or motor).
    • Connect one terminal of the load to the COM pin.
    • Connect the other terminal of the load to either the NO or NC pin:
      • Use the NO pin if you want the load to turn on when the relay is activated.
      • Use the NC pin if you want the load to turn off when the relay is activated.
  3. Control the Relay:

    • Apply a 5V signal to the Coil+ pin to activate the relay and switch the contacts.
    • Remove the 5V signal to deactivate the relay and return the contacts to their default state.

Important Considerations and Best Practices

  • Flyback Diode: Always connect a flyback diode (e.g., 1N4007) across the relay coil terminals to protect the control circuit from voltage spikes caused by the collapsing magnetic field when the relay is deactivated.
  • Power Supply: Ensure the power supply can provide sufficient current for the relay coil (typically 70-100 mA).
  • Isolation: Use optocouplers or transistor drivers if the control circuit cannot directly supply the required current.
  • Contact Ratings: Do not exceed the relay's maximum voltage or current ratings to avoid damage or failure.

Example: Connecting a 5V Relay to an Arduino UNO

Below is an example of how to control a 5V relay using an Arduino UNO:

// Define the pin connected to the relay module
const int relayPin = 7;

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

void loop() {
  // Turn the relay on
  digitalWrite(relayPin, HIGH);
  delay(5000); // Keep the relay on for 5 seconds

  // Turn the relay off
  digitalWrite(relayPin, LOW);
  delay(5000); // Keep the relay off for 5 seconds
}

Note: Ensure the relay module is connected to the Arduino as follows:

  • VCC on the relay module to 5V on the Arduino.
  • GND on the relay module to GND on the Arduino.
  • IN on the relay module to pin 7 on the Arduino.

Troubleshooting and FAQs

Common Issues and Solutions

  1. Relay Not Activating:

    • Cause: Insufficient current from the control circuit.
    • Solution: Use a transistor or MOSFET as a driver to amplify the control signal.
  2. Load Not Switching:

    • Cause: Incorrect wiring of the load circuit.
    • Solution: Verify the connections to the COM, NO, and NC pins.
  3. Relay Buzzing Noise:

    • Cause: Insufficient or unstable voltage to the relay coil.
    • Solution: Ensure a stable 5V power supply and check for loose connections.
  4. Arduino Resets When Relay Activates:

    • Cause: Voltage spikes from the relay coil affecting the Arduino.
    • Solution: Add a flyback diode across the relay coil and use a separate power supply for the relay.

FAQs

  • Q: Can I use the 5V relay to control AC devices?
    A: Yes, the relay can control AC devices up to its rated voltage and current (e.g., 250V AC, 10A). Ensure proper isolation and safety precautions.

  • Q: Can I directly connect the relay to an Arduino pin?
    A: While possible, it is not recommended unless the Arduino pin can supply sufficient current. Use a transistor or relay module for safer operation.

  • Q: What is the purpose of the flyback diode?
    A: The flyback diode protects the control circuit from voltage spikes generated when the relay coil is de-energized.

  • Q: Can I use the relay with a 3.3V control signal?
    A: No, the relay requires a 5V control signal. Use a level shifter or a relay module designed for 3.3V systems.