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

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

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

Introduction

A relay is an electromechanical switch that uses an electromagnetic coil to open or close a circuit. The 5V relay is specifically designed to operate with a 5V DC input signal, making it ideal for interfacing with microcontrollers and low-voltage control systems. It allows low-power circuits to control high-power devices such as motors, lights, and appliances.

Explore Projects Built with 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!
Arduino UNO Controlled 5V Relay Switch
Image of relay: A project utilizing Relay 5V 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 Relay 5V 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
Wi-Fi Controlled Smart Light with ESP8266 and Relay
Image of LED US: A project utilizing Relay 5V in a practical application
This circuit uses an ESP8266 NodeMCU microcontroller to control a 5V relay, which in turn switches a 220V power supply to a bulb. The microcontroller is powered by a 5V battery, and it activates the relay through its D2 pin, allowing the bulb to be turned on or off remotely.
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 Relay 5V 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 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 relay: A project utilizing Relay 5V 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 Relay 5V 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 LED US: A project utilizing Relay 5V in a practical application
Wi-Fi Controlled Smart Light with ESP8266 and Relay
This circuit uses an ESP8266 NodeMCU microcontroller to control a 5V relay, which in turn switches a 220V power supply to a bulb. The microcontroller is powered by a 5V battery, and it activates the relay through its D2 pin, allowing the bulb to be turned on or off remotely.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Hand Gesture Light: A project utilizing Relay 5V 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 or fans)
  • Industrial control systems
  • Motor control
  • Switching high-voltage AC loads using low-voltage DC signals
  • Safety circuits and isolation between high- and low-voltage systems

Technical Specifications

Below are the key technical details for a standard 5V relay:

Parameter Value
Operating Voltage 5V DC
Trigger Voltage 3.75V to 5V DC
Trigger Current 15-20 mA
Contact Type SPDT (Single Pole Double Throw) or DPDT (varies by model)
Maximum Switching Voltage 250V AC / 30V DC
Maximum Switching Current 10A (varies by model)
Coil Resistance ~70Ω to 100Ω
Isolation Electrical isolation between control and load circuits
Dimensions Typically 28mm x 10mm x 15mm

Pin Configuration and Descriptions

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

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

Note: Some relay modules may have additional components like diodes, transistors, or optocouplers for protection and easier interfacing.

Usage Instructions

How to Use the 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:
    • Connect the IN pin to a microcontroller (e.g., Arduino) or a 5V logic signal. A HIGH signal activates the relay.
  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. Protection:
    • Use a flyback diode across the relay coil to protect the circuit from voltage spikes when the relay is deactivated.

Example Circuit with Arduino UNO

Below is an example of how to connect a 5V relay to an Arduino UNO to control a light bulb:

Circuit Connections:

  • Relay Module:
    • VCC → 5V pin on Arduino
    • GND → GND pin on Arduino
    • IN → Digital pin 7 on Arduino
  • Load:
    • Connect one terminal of the light bulb to the COM pin.
    • Connect the other terminal of the light bulb to the NO pin.
    • Connect the AC power source to the COM and NO pins as required.

Arduino Code:

// Relay control example with Arduino UNO
// This code turns a relay ON for 5 seconds, then OFF for 5 seconds repeatedly.

#define RELAY_PIN 7  // Define the digital pin connected to the relay IN pin

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

void loop() {
  digitalWrite(RELAY_PIN, HIGH);  // Turn the relay ON
  delay(5000);  // Wait for 5 seconds
  digitalWrite(RELAY_PIN, LOW);  // Turn the relay OFF
  delay(5000);  // Wait for 5 seconds
}

Important Considerations and Best Practices

  • Isolation: Ensure proper electrical isolation between the control circuit and the high-voltage load to prevent damage or hazards.
  • Current Ratings: Do not exceed the relay's maximum current and voltage ratings to avoid overheating or failure.
  • Flyback Diode: Always use a flyback diode across the relay coil to protect the control circuit from voltage spikes.
  • Debouncing: If the relay is used in a rapidly switching application, consider implementing software or hardware debouncing to avoid erratic behavior.

Troubleshooting and FAQs

Common Issues and Solutions

  1. Relay Not Activating:

    • Cause: Insufficient voltage or current to the relay coil.
    • Solution: Verify that the VCC pin is receiving 5V and the IN pin is receiving a HIGH signal (5V).
  2. Load Not Switching:

    • Cause: Incorrect wiring of the load to the COM, NO, or NC pins.
    • Solution: Double-check the load connections and ensure the relay is properly activated.
  3. Relay Clicking but No Output:

    • Cause: Faulty or damaged relay contacts.
    • Solution: Replace the relay if the contacts are worn or damaged.
  4. Voltage Spikes Damaging Circuit:

    • Cause: Lack of a flyback diode across the relay coil.
    • Solution: Add a flyback diode (e.g., 1N4007) across the relay coil terminals.

FAQs

Q1: Can I use a 5V relay with a 3.3V microcontroller?
A1: It depends on the relay's trigger voltage. Some 5V relays can be triggered with 3.3V, but others may require a transistor or MOSFET to amplify the control signal.

Q2: Can I control an AC load with a 5V relay?
A2: Yes, as long as the load's voltage and current are within the relay's maximum switching ratings.

Q3: Why is my relay module heating up?
A3: Excessive current through the relay coil or load can cause overheating. Ensure the relay is operating within its specified ratings.

Q4: Can I use the relay to switch DC loads?
A4: Yes, the relay can switch DC loads as long as the voltage and current are within the specified limits.

By following this documentation, you can effectively use a 5V relay in your projects while ensuring safety and reliability.