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, allowing for the control of higher voltage devices. It typically consists of a coil, an armature, and contacts. This component is widely used in applications where electrical isolation and control of high-power devices are required.

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-voltage devices
  • Automotive electronics for controlling accessories

Technical Specifications

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

Parameter Value
Operating Voltage 5V DC
Trigger Voltage 3.75V to 5V DC
Trigger Current 15mA to 20mA
Contact Rating 10A at 250V AC / 10A at 30V DC
Coil Resistance ~70Ω
Switching Time 5ms (operate), 5ms (release)
Electrical Isolation Yes (via relay contacts)
Number of Contacts Single Pole Double Throw (SPDT)
Dimensions ~28mm x 10mm x 15mm

Pin Configuration and Descriptions

The 5V relay typically has 5 pins, as described in the table below:

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 relay switch.
Normally Open (NO) Open circuit when the relay is inactive; closed when the relay is activated.
Normally Closed (NC) Closed circuit when the relay is inactive; open 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 and the Coil- pin to ground. This energizes the relay coil and activates the switch.
  2. Connect the Load:
    • For devices that should turn on when the relay is activated, connect the load between the COM and NO pins.
    • For devices that should turn off when the relay is activated, connect the load between the COM and NC pins.
  3. Protect the Circuit: Use a flyback diode across the relay coil to prevent voltage spikes when the relay is deactivated.
  4. Control with Microcontroller: If using a microcontroller (e.g., Arduino UNO), connect the control signal to a digital output pin and use a transistor to amplify the current if needed.

Important Considerations and Best Practices

  • Isolation: Ensure proper electrical isolation between the control circuit and the high-voltage load.
  • Flyback Diode: Always use a flyback diode (e.g., 1N4007) across the relay coil to protect the control circuit from voltage spikes.
  • Current Requirements: Verify that the control circuit can supply the required current (15-20mA) to activate the relay. Use a transistor or relay driver module if necessary.
  • Contact Ratings: Do not exceed the relay's contact ratings (10A at 250V AC or 30V DC) to avoid damage.

Example: Using a 5V Relay with 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;

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

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

Note: Use a transistor (e.g., 2N2222) between the Arduino pin and the relay coil to amplify the current if the relay requires more than the Arduino's output pin can supply.

Troubleshooting and FAQs

Common Issues and Solutions

  1. Relay Not Activating:

    • Cause: Insufficient current from the control circuit.
    • Solution: Use a transistor or relay driver module to amplify the control signal.
  2. Voltage Spikes Damaging Components:

    • Cause: Lack of a flyback diode across the relay coil.
    • Solution: Add a flyback diode (e.g., 1N4007) across the Coil+ and Coil- pins.
  3. Relay Stuck in One State:

    • Cause: Contacts may be welded due to overcurrent.
    • Solution: Ensure the load does not exceed the relay's contact ratings.
  4. High Voltage Leakage:

    • Cause: Improper isolation between control and load circuits.
    • Solution: Double-check wiring and ensure proper insulation.

FAQs

Q1: Can I use a 5V relay with a 3.3V microcontroller?
A1: Yes, but you will need a transistor or relay driver module to step up the control signal to 5V.

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

Q3: Can I control an AC load with a 5V relay?
A3: Yes, as long as the AC load does not exceed the relay's contact ratings (10A at 250V AC).

Q4: Why is my relay making a clicking sound?
A4: The clicking sound is normal and indicates the relay is switching states. If it clicks repeatedly, check for issues in the control signal.