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
VCC Connects to the 5V power supply to energize the relay coil.
GND Ground connection for the relay coil.
IN Control signal input (5V logic HIGH activates the relay).
COM Common terminal for the load circuit.
NO Normally Open terminal; connected to COM when the relay is activated.
NC Normally Closed terminal; connected to COM when the relay is not activated.

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 and the GND pin to ground.
  2. Control Signal:
    • Use a microcontroller (e.g., Arduino) or a 5V logic signal to control the IN pin.
  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. Isolation:
    • Ensure proper electrical isolation between the control circuit and the load circuit to prevent damage.

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; // Define the pin connected to the relay IN pin

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

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

Note: Ensure the relay module is connected to the Arduino's 5V and GND pins, and the IN pin is connected to pin 7.

Troubleshooting and FAQs

Common Issues and Solutions

  1. Relay Not Activating:

    • Cause: Insufficient current from the control circuit.
    • Solution: Use a transistor or MOSFET as a driver to amplify the control signal.
  2. Load Not Switching:

    • Cause: Incorrect wiring of the load to the relay terminals.
    • Solution: Verify the connections to the COM, NO, and NC pins.
  3. Relay Buzzing Noise:

    • Cause: Insufficient or unstable power supply to the relay coil.
    • Solution: Ensure a stable 5V power source and check for loose connections.
  4. Arduino Resets When Relay Activates:

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

FAQs

Q1: Can I use a 5V relay to control a 220V AC appliance?
A1: Yes, as long as the appliance's current and voltage ratings do not exceed the relay's maximum ratings (250V AC, 10A).

Q2: Do I need a separate power supply for the relay?
A2: Not necessarily. If your microcontroller can supply sufficient current, you can use the same power source. However, for high-power applications, a separate power supply is recommended.

Q3: Can I use a 5V relay with a 3.3V microcontroller?
A3: Yes, but you will need a transistor or MOSFET to amplify the 3.3V signal to 5V for the relay.

Q4: What is the difference between NO and NC terminals?
A4: The NO (Normally Open) terminal is disconnected from the COM terminal when the relay is off, while the NC (Normally Closed) terminal is connected to the COM terminal when the relay is off.