Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use relay_5V: Examples, Pinouts, and Specs

Image of relay_5V
Cirkit Designer LogoDesign 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!
Arduino UNO Controlled 5V Relay Switch
Image of relay: A project utilizing relay_5V 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
Battery-Powered LED Control with Pushbutton and Relay
Image of EXP.3 E: A project utilizing relay_5V in a practical application
This circuit uses a pushbutton to control a 5V relay, which in turn powers a red LED. The MAHIR 1.mini module provides the necessary 3.7V power supply, and the relay switches the LED on and off based on the pushbutton input.
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 relay_5V 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
Battery-Powered 4-Channel Relay Control with LED Indicators
Image of RELLAY BOARD TEST: A project utilizing relay_5V 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

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!
Image of relay: A project utilizing relay_5V 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 EXP.3 E: A project utilizing relay_5V in a practical application
Battery-Powered LED Control with Pushbutton and Relay
This circuit uses a pushbutton to control a 5V relay, which in turn powers a red LED. The MAHIR 1.mini module provides the necessary 3.7V power supply, and the relay switches the LED on and off based on the pushbutton input.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Hand Gesture Light: A project utilizing relay_5V 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
Image of RELLAY BOARD TEST: A project utilizing relay_5V 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

Common Applications

  • Home automation systems (e.g., controlling lights, fans, or appliances)
  • Industrial control systems
  • Motor control
  • Switching high-power devices (e.g., heaters, pumps)
  • Automotive electronics

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

  • Flyback Diode: If you're driving the relay coil directly from a microcontroller, use a flyback diode (e.g., 1N4007) across the relay coil to protect the microcontroller from voltage spikes.
  • Power Ratings: Ensure the load's voltage and current do not exceed the relay's maximum ratings (250V AC / 30V DC, 10A).
  • Isolation: The relay provides electrical isolation between the control and load circuits, but ensure proper grounding to avoid noise or interference.
  • External Transistor: If the microcontroller cannot supply enough current to drive the relay, use an NPN transistor (e.g., 2N2222) as a driver.

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

  • VCC: Connect to Arduino 5V pin.
  • GND: Connect to Arduino GND pin.
  • IN: Connect to Arduino digital pin 7.
  • COM: Connect to the live wire of the light bulb's power source.
  • NO: Connect to one terminal of the light bulb.

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.