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 circuits
  • 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 DC 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 Component in a Circuit

  1. Power the Relay Coil:
    • Connect the Coil+ pin to a 5V DC control signal (e.g., from a microcontroller or power supply).
    • Connect the Coil- pin to ground.
  2. Connect the Load Circuit:
    • Connect the load's power source to the COM pin.
    • Connect the load to either the NO or NC pin, depending on the desired behavior:
      • Use NO if the load should be powered only when the relay is activated.
      • Use NC if the load should be powered by default and disconnected when the relay is activated.
  3. Control the Relay:
    • Apply a 5V signal to the Coil+ pin to activate the relay and switch the load circuit.

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.
  • Transistor Driver: If the control signal source (e.g., a microcontroller) cannot supply sufficient current to the relay coil, use a transistor (e.g., 2N2222) as a driver.
  • Isolation: Ensure proper electrical isolation between the control and load circuits to prevent damage to sensitive components.
  • Power Ratings: Do not exceed the relay's voltage and current ratings for the load circuit.

Example: Connecting a 5V Relay to an Arduino UNO

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

Circuit Connections

  • Connect the Coil+ pin of the relay to a digital pin on the Arduino (e.g., pin 7) through a transistor driver.
  • Connect the Coil- pin to the Arduino's GND.
  • Connect the load circuit to the COM and NO pins of the relay.

Arduino Code

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

void setup() {
  // Set the relay pin as an output
  pinMode(relayPin, OUTPUT);
}

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

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

Troubleshooting and FAQs

Common Issues and Solutions

  1. Relay Not Activating:

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

    • Cause: Incorrect wiring of the load circuit.
    • Solution: Verify connections to the COM, NO, and NC pins.
  3. Microcontroller Resetting When Relay Activates:

    • Cause: Voltage spikes from the relay coil affecting the control circuit.
    • Solution: Add a flyback diode across the relay coil terminals.
  4. Relay Buzzing or Clicking:

    • Cause: Insufficient or unstable power supply to the relay coil.
    • Solution: Ensure a stable 5V DC supply and check for loose connections.

FAQs

Q1: Can I use a 5V relay to control AC devices?
Yes, a 5V relay can control AC devices as long as the voltage and current ratings of the relay contacts are not exceeded.

Q2: Can I directly connect a 5V relay to an Arduino pin?
While it is possible, it is not recommended unless the Arduino pin can supply sufficient current. Using a transistor driver is a safer approach.

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

Q4: Can I use a 5V relay with a 3.3V microcontroller?
Yes, but you will need a transistor driver circuit to ensure the relay coil receives the required 5V signal.