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

How to Use relay_5V: Examples, Pinouts, and Specs

Image of relay_5VDesign with relay_5V in Cirkit Designer

Introduction

A relay is an electromechanical switch that allows a low-power signal to control a high-power circuit. The 5V relay operates at a 5-volt DC input signal, making it ideal for interfacing with microcontrollers like Arduino, Raspberry Pi, and other low-voltage control systems. It provides electrical isolation between the control circuit and the load, ensuring safety and reliability.

Explore Projects Built with relay_5V

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

Technical Specifications

Key Technical Details

Parameter Value
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 SPDT (Single Pole Double Throw)
Electrical Isolation Yes (via electromagnetic coil)
Dimensions Typically 28mm x 10mm x 15mm

Pin Configuration

Pin Number Name Description
1 VCC Connect to 5V DC power supply
2 GND Connect to ground
3 IN Control signal input (3.3V to 5V logic level)
4 COM (Common) Common terminal for the load circuit
5 NO (Normally Open) Open by default; closes when relay is activated
6 NC (Normally Closed) Closed by default; opens when relay is activated

Usage Instructions

How to Use the 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: Connect the IN pin to a microcontroller's GPIO pin or any 3.3V-5V logic signal source.
  3. Load Connection:
    • Connect the load's power source to the COM pin.
    • Connect the load to either the NO (Normally Open) or NC (Normally Closed) pin, depending on the desired behavior:
      • Use NO if the load should be off by default and turn on when the relay is activated.
      • Use NC if the load should be on by default and turn off when the relay is activated.
  4. Activate the Relay: Send a HIGH signal (3.3V-5V) to the IN pin to activate the relay and switch the load.

Important Considerations

Example: Connecting a Relay to an Arduino UNO

Below is an example of how to control a 5V relay using an Arduino UNO to switch a light bulb.

Circuit Diagram

Arduino Code

// Define the relay control pin
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 (light bulb on)
  delay(5000); // Keep it on for 5 seconds
  digitalWrite(relayPin, LOW); // Turn relay off (light bulb off)
  delay(5000); // Keep it off for 5 seconds
}

Troubleshooting and FAQs

Common Issues

  1. Relay Not Activating

    • Cause: Insufficient voltage or current to the IN pin.
    • Solution: Ensure the control signal is between 3.3V and 5V. If using a microcontroller, verify the GPIO pin is configured as an output.
  2. Load Not Switching

    • Cause: Incorrect wiring of the load circuit.
    • Solution: Double-check the connections to the COM, NO, and NC pins. Ensure the load's power source is properly connected.
  3. Microcontroller Resetting When Relay Activates

    • Cause: Voltage spikes from the relay coil.
    • Solution: Add a flyback diode across the relay coil terminals.
  4. Relay Clicking but No Load Response

    • Cause: Load exceeds the relay's maximum ratings.
    • Solution: Verify the load's voltage and current are within the relay's specifications.

FAQs

  1. Can I use the 5V relay with a 3.3V microcontroller?

    • Yes, the relay can be triggered with a 3.3V signal, but ensure the relay module supports 3.3V logic levels.
  2. Do I need an external power supply for the relay?

    • If your microcontroller cannot provide sufficient current, use an external 5V power supply for the relay.
  3. 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.
  4. Can I use the relay to switch DC loads?

    • Yes, the relay can switch DC loads up to 30V and 10A. Ensure the load does not exceed these ratings.