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 and alarms

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
  • Lifetime:
    • Mechanical: ~10 million operations
    • Electrical: ~100,000 operations (at rated load)

Pin Configuration and Descriptions

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

Pin Name Description
VCC Connects to the 5V power supply to energize the relay coil.
GND Ground connection for the relay coil.
IN Control signal input (5V logic HIGH activates the relay).
COM Common terminal for the load circuit.
NO Normally Open terminal; connected to COM when the relay is activated.
NC Normally Closed terminal; connected to COM when the relay is not activated.

Usage Instructions

How to Use the 5V Relay in a Circuit

  1. Power the Relay:
    • Connect the VCC pin to a 5V DC power source and the GND pin to ground.
  2. Control Signal:
    • Use a microcontroller (e.g., Arduino) or a 5V logic signal to control the IN pin.
  3. Load Connection:
    • Connect the load (e.g., a light bulb or motor) to the COM and NO pins if you want the load to turn on when the relay is activated.
    • Alternatively, connect the load to the COM and NC pins if you want the load to turn off when the relay is activated.
  4. Isolation:
    • Ensure proper electrical isolation between the control circuit and the load circuit to prevent damage.

Important Considerations and Best Practices

  • Flyback Diode: Always use a flyback diode across the relay coil to protect the control circuit from voltage spikes caused by the collapsing magnetic field when the relay is de-energized.
  • Current Limiting: Ensure the control circuit can supply enough current (~70-100 mA) to activate the relay coil.
  • Load Ratings: Do not exceed the relay's maximum voltage and current ratings for the load.
  • Noise Suppression: Use snubber circuits or RC filters to suppress electrical noise when switching inductive loads.

Example: Connecting a 5V Relay to an Arduino UNO

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

// Example: Controlling a 5V relay with Arduino UNO
// Pin 7 is used to control the relay

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

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

void loop() {
  digitalWrite(relayPin, HIGH); // Activate the relay
  delay(1000); // Keep the relay on for 1 second
  digitalWrite(relayPin, LOW); // Deactivate the relay
  delay(1000); // Keep the relay off for 1 second
}

Note: Ensure the relay module is connected to the Arduino's 5V and GND pins, and the IN pin is connected to pin 7.

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 to the relay terminals.
    • Solution: Verify the connections to the COM, NO, and NC pins.
  3. Relay Buzzing Noise:

    • Cause: Insufficient or unstable power supply to the relay coil.
    • Solution: Ensure a stable 5V power source 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

Q1: Can I use a 5V relay to control a 220V AC appliance?
A1: Yes, as long as the appliance's current and voltage ratings do not exceed the relay's maximum ratings (250V AC, 10A).

Q2: Do I need a separate power supply for the relay?
A2: Not necessarily. If your microcontroller can supply sufficient current, you can use the same power source. However, for high-power applications, a separate power supply is recommended.

Q3: Can I use a 5V relay with a 3.3V microcontroller?
A3: Yes, but you will need a transistor or MOSFET to amplify the 3.3V signal to 5V for the relay.

Q4: What is the difference between NO and NC terminals?
A4: The NO (Normally Open) terminal is disconnected from the COM terminal when the relay is off, while the NC (Normally Closed) terminal is connected to the COM terminal when the relay is off.