Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

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

Image of 5V RelayDesign 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!

Common Applications and Use Cases

Technical Specifications

Key Technical Details

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

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

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.