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

The 5V Relay by Ashish Tech Guruji (Part ID: SPST) is an electromechanical switch designed to control high-voltage or high-current devices using a low-voltage (5V) control signal. It operates by energizing a coil, which moves an armature to open or close the relay's contacts. This allows for safe and efficient control of devices such as motors, lights, and home appliances.

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!
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
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
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 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 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 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 or fans)
  • Industrial equipment control
  • Motor and pump control
  • IoT projects for switching high-power devices
  • Arduino and microcontroller-based projects

Technical Specifications

The following table outlines the key technical details of the 5V Relay:

Parameter Value
Manufacturer Ashish Tech Guruji
Part ID SPST
Operating Voltage 5V DC
Trigger Voltage 3.3V to 5V DC
Maximum Switching Voltage 250V AC / 30V DC
Maximum Switching Current 10A
Coil Resistance ~70Ω
Contact Type SPST (Single Pole Single Throw)
Isolation Optically isolated (if used with a driver module)
Dimensions 19mm x 15mm x 15mm
Weight ~10g

Pin Configuration and Descriptions

The 5V Relay typically has 5 pins. The table below describes each pin:

Pin Name Description
VCC Connects to the 5V power supply to energize the relay coil.
GND Ground connection for the relay.
IN Control signal input (3.3V to 5V logic level).
COM Common terminal for the relay's switching circuit.
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.

Note: Some relay modules may not expose the NC terminal, depending on the design.

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.
    • Connect the GND pin to the ground of the power source.
  2. Control Signal:

    • Connect the IN pin to a microcontroller (e.g., Arduino) or a 5V logic signal.
    • When the IN pin receives a HIGH signal (5V), the relay will activate, switching the contacts.
  3. Load Connection:

    • Connect the device you want to control (e.g., a light bulb or motor) to the COM and NO (or NC) terminals.
    • Use NO if you want the device to be OFF by default and turn ON when the relay is activated.
    • Use NC if you want the device to be ON by default and turn OFF when the relay is activated.
  4. Isolation:

    • If using a relay module with an optocoupler, ensure proper isolation between the control and load circuits.

Important Considerations and Best Practices

  • Diode Protection: Always use a flyback diode across the relay coil to prevent voltage spikes when the relay is deactivated.
  • Power Ratings: Ensure the load's voltage and current do not exceed the relay's maximum ratings (250V AC / 30V DC, 10A).
  • External Power Supply: For high-current loads, use an external power supply to power the load circuit.
  • Safety: Avoid touching the relay or load connections when the circuit is powered to prevent electric shock.

Example: Using the 5V Relay with 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
// This code turns a relay ON for 2 seconds, then OFF for 2 seconds repeatedly.

#define RELAY_PIN 7  // Define the pin connected to the relay's 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(2000);                   // Wait for 2 seconds
  digitalWrite(RELAY_PIN, LOW);  // Turn the relay OFF
  delay(2000);                   // Wait for 2 seconds
}

Note: Ensure the relay module is connected to the Arduino's 5V and GND pins for proper operation.

Troubleshooting and FAQs

Common Issues and Solutions

  1. Relay Not Activating:

    • Cause: Insufficient control signal voltage.
    • Solution: Ensure the IN pin receives a voltage between 3.3V and 5V.
  2. Load Not Switching:

    • Cause: Incorrect wiring of the load to the COM and NO/NC terminals.
    • Solution: Double-check the load connections and ensure the relay is properly powered.
  3. Relay Buzzing Noise:

    • Cause: Insufficient current to the relay coil.
    • Solution: Use a power supply capable of providing sufficient current (at least 70mA).
  4. Microcontroller Resetting:

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

FAQs

Q1: Can I use the 5V relay with a 3.3V microcontroller?
A1: Yes, the relay can be triggered with a 3.3V control signal, but ensure the relay module supports 3.3V logic levels.

Q2: Can the relay handle 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: Do I need a relay driver circuit?
A3: If your microcontroller cannot supply sufficient current to the relay coil, use a transistor or relay driver module.

Q4: Is the relay safe for high-power applications?
A4: Yes, but ensure proper insulation and follow safety guidelines when working with high voltages.

By following this documentation, you can effectively integrate the 5V Relay (SPST) into your projects for reliable and efficient control of high-power devices.