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

How to Use RELAY: Examples, Pinouts, and Specs

Image of RELAY
Cirkit Designer LogoDesign with RELAY in Cirkit Designer

Introduction

A relay is an electromechanical switch that uses an electromagnetic coil to open or close a circuit. It allows a low-power signal to control a higher power circuit, providing isolation and control in various applications. Relays are widely used in automation, home appliances, automotive systems, and industrial equipment to control high-current devices such as motors, lights, and heaters.

Explore Projects Built with 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!
WeMos D1 R2 Controlled Relay Switching Circuit for AC Bulb and USB Charger
Image of Hand Gesture Light: A project utilizing RELAY 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 IR Sensor Controlled Relay Module
Image of New: A project utilizing RELAY in a practical application
This circuit uses an IR sensor to control a 1 Channel 5V Relay Module, which is powered by a 9V battery. The IR sensor detects an object and sends a signal to the relay module to switch its state, enabling or disabling the connected load.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Controlled DC Motor with Dual Relay System
Image of LED Show v2: A project utilizing RELAY in a practical application
This circuit controls a DC motor using two 12V relays, which are powered by a 12V supply through a barrel jack. The relays are configured to switch the motor's connections, allowing for control over its operation.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO and SIM900A Based Smart Home Automation with GSM and I2C LCD Display
Image of p2: A project utilizing RELAY in a practical application
This circuit is a remote-controlled relay system using an Arduino UNO, a SIM900A GSM module, and a 5V relay to control a bulb. The Arduino communicates with the GSM module to receive commands, which are then used to toggle the relay, thereby controlling the bulb. Additionally, a 16x2 I2C LCD is used for displaying status information.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with 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!
Image of Hand Gesture Light: A project utilizing RELAY 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 New: A project utilizing RELAY in a practical application
Battery-Powered IR Sensor Controlled Relay Module
This circuit uses an IR sensor to control a 1 Channel 5V Relay Module, which is powered by a 9V battery. The IR sensor detects an object and sends a signal to the relay module to switch its state, enabling or disabling the connected load.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of LED Show v2: A project utilizing RELAY in a practical application
ESP32-Controlled DC Motor with Dual Relay System
This circuit controls a DC motor using two 12V relays, which are powered by a 12V supply through a barrel jack. The relays are configured to switch the motor's connections, allowing for control over its operation.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of p2: A project utilizing RELAY in a practical application
Arduino UNO and SIM900A Based Smart Home Automation with GSM and I2C LCD Display
This circuit is a remote-controlled relay system using an Arduino UNO, a SIM900A GSM module, and a 5V relay to control a bulb. The Arduino communicates with the GSM module to receive commands, which are then used to toggle the relay, thereby controlling the bulb. Additionally, a 16x2 I2C LCD is used for displaying status information.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Home Automation: Controlling lights, fans, and other appliances.
  • Automotive Systems: Switching headlights, horns, and other high-current loads.
  • Industrial Equipment: Managing motors, pumps, and solenoids.
  • Microcontroller Projects: Interfacing low-power microcontrollers with high-power devices.

Technical Specifications

Below are the general technical specifications for a standard 5V single-channel relay module:

Key Specifications

  • Operating Voltage: 5V DC
  • Trigger Voltage: 3.3V to 5V (logic level compatible)
  • Maximum Switching Voltage: 250V AC / 30V DC
  • Maximum Switching Current: 10A
  • Coil Resistance: ~70Ω (varies by model)
  • Isolation: Optocoupler isolation (in most relay modules)
  • Switching Mechanism: Normally Open (NO) and Normally Closed (NC) contacts

Pin Configuration

The relay module typically has the following pins:

Pin Name Description
VCC Power supply for the relay module (5V DC).
GND Ground connection.
IN Control signal input (logic HIGH activates the relay).
COM Common terminal for the relay switch.
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 Relay in a Circuit

  1. Power the Relay Module: Connect the VCC pin to a 5V power source and the GND pin to ground.
  2. Control Signal: Connect the IN pin to a microcontroller's GPIO pin or any control signal source.
  3. Load Connection:
    • Connect the device you want to control (e.g., a light bulb) to the NO terminal.
    • Connect the other end of the device to the power source.
    • Connect the COM terminal to the power source's ground or live wire, depending on the circuit design.
  4. Trigger the Relay: Send a HIGH signal (3.3V or 5V) to the IN pin to activate the relay and close the NO contact.

Important Considerations

  • Isolation: Ensure proper isolation between the low-power control circuit and the high-power load.
  • Flyback Diode: If you're using a bare relay (not a module), add a flyback diode across the coil to protect the circuit from voltage spikes.
  • Current Ratings: Do not exceed the relay's maximum current and voltage ratings.
  • Heat Dissipation: For high-current loads, ensure proper ventilation or heat dissipation to prevent overheating.

Example: Using a Relay with Arduino UNO

Below is an example of how to control a relay module using an Arduino UNO:

// Define the relay control pin
const int relayPin = 7;

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

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

Code Explanation:

  • The relayPin is connected to the IN pin of the relay module.
  • The relay is turned on by setting the pin HIGH and turned off by setting it LOW.
  • A delay of 1 second is used to toggle the relay state.

Troubleshooting and FAQs

Common Issues

  1. Relay Not Activating:

    • Cause: Insufficient voltage or current to the relay coil.
    • Solution: Ensure the VCC pin is connected to a stable 5V power source and the IN pin receives a proper HIGH signal.
  2. Load Not Switching:

    • Cause: Incorrect wiring of the load to the relay terminals.
    • Solution: Verify the connections to the NO, NC, and COM terminals.
  3. Relay Stuck in One State:

    • Cause: Damaged relay contacts or coil.
    • Solution: Replace the relay module if it is physically damaged.
  4. Microcontroller Resetting When Relay Activates:

    • Cause: Voltage spikes or insufficient power supply.
    • Solution: Use a flyback diode across the relay coil and ensure the power supply can handle the load.

FAQs

  • Q: Can I use a 3.3V microcontroller to control a 5V relay?
    A: Yes, most relay modules with optocoupler isolation can be triggered by 3.3V signals.

  • Q: What is the difference between NO and NC terminals?
    A: The NO terminal is open by default and closes when the relay is activated. The NC terminal is closed by default and opens when the relay is activated.

  • Q: Can I control an AC load with a DC relay?
    A: Yes, as long as the relay's maximum voltage and current ratings are not exceeded.

  • Q: How do I protect my circuit from relay-induced voltage spikes?
    A: Use a flyback diode across the relay coil to suppress voltage spikes when the relay is deactivated.