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 control signal).
Coil- Negative terminal of the relay coil (connect to ground).
Common (COM) Common terminal for the load circuit.
Normally Open (NO) Open when the relay is inactive; closes when the relay is energized.
Normally Closed (NC) Closed when the relay is inactive; opens when the relay is energized.

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 external power source).
    • Connect the Coil- pin to ground.
  2. Connect the Load Circuit:

    • Connect the load's power source to the COM pin.
    • For a normally open configuration, connect the load to the NO pin. The load will be powered only when the relay is energized.
    • For a normally closed configuration, connect the load to the NC pin. The load will be powered when the relay is not energized.
  3. Control the Relay:

    • Use a microcontroller (e.g., Arduino UNO) or a transistor circuit to provide the required 5V signal to the relay coil.

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:

// 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: Connect the relay's Coil+ pin to Arduino pin 7 (via a transistor if needed) and Coil- to ground. Use a flyback diode across the relay coil.

Troubleshooting and FAQs

Common Issues and Solutions

  1. Relay Not Switching:

    • Cause: Insufficient current to energize the coil.
    • Solution: Ensure the control circuit can supply at least 70-100 mA. Use a transistor or relay driver module if necessary.
  2. Load Not Powering On:

    • Cause: Incorrect wiring of the load circuit.
    • Solution: Verify connections to the COM, NO, and NC pins. Ensure the load is within the relay's rated voltage and current.
  3. Microcontroller Resets When Relay Activates:

    • Cause: Voltage spikes from the relay coil.
    • Solution: Add a flyback diode across the relay coil and ensure proper decoupling capacitors are used in the circuit.
  4. Relay Stuck in One State:

    • Cause: Mechanical failure or overloading.
    • Solution: Replace the relay and ensure the load does not exceed the rated specifications.

FAQs

Q1: Can I use a 5V relay to control AC devices?
Yes, as long as the device's voltage and current are within the relay's rated specifications (e.g., 250V AC, 10A).

Q2: Do I need a separate power supply for the relay?
Not necessarily. If your microcontroller or power source can provide sufficient current (70-100 mA), you can use the same supply. Otherwise, use an external power source.

Q3: Can I control multiple relays with one microcontroller?
Yes, but ensure the microcontroller can handle the combined current requirements. Use transistors or a relay driver module for better control.

Q4: 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. It is essential for circuit safety and longevity.