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 electromagnet to open or close a circuit. It allows a low-power signal to control a high-power circuit, making it an essential component in many electronic and electrical systems. Relays are widely used in applications such as home automation, industrial control systems, automotive electronics, and power distribution systems. They provide electrical isolation between the control circuit and the high-power circuit, ensuring safety and reliability.

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

Technical Specifications

Below are the general technical specifications for a standard single-pole, double-throw (SPDT) relay. Specifications may vary depending on the specific relay model.

Key Specifications

  • Coil Voltage: 5V, 12V, or 24V (depending on the relay type)
  • Coil Current: Typically 70-150 mA
  • Contact Rating: 10A at 250V AC or 10A at 30V DC
  • Contact Configuration: SPDT (Single Pole Double Throw) or DPDT (Double Pole Double Throw)
  • Switching Time: 5-15 ms
  • Dielectric Strength: 1000V AC (between coil and contacts)
  • Insulation Resistance: ≥ 100 MΩ at 500V DC
  • Mechanical Life: 10 million operations (typical)

Pin Configuration and Descriptions

The pin configuration for a standard 5-pin SPDT relay is as follows:

Pin Number Name Description
1 Coil (+) Positive terminal of the relay coil. Connect to the control signal or power.
2 Coil (-) Negative terminal of the relay coil. Connect to ground.
3 Common (COM) Common terminal for the relay switch. Connect to the input power or signal.
4 Normally Open (NO) Terminal that is disconnected from COM when the relay is inactive. Connects to COM when the relay is activated.
5 Normally Closed (NC) Terminal that is connected to COM when the relay is inactive. Disconnects from COM when the relay is activated.

Usage Instructions

How to Use the Relay in a Circuit

  1. Power the Coil: Connect the relay coil terminals (pins 1 and 2) to a power source that matches the relay's rated coil voltage. For example, use a 5V power source for a 5V relay.
  2. Control the Coil: Use a low-power control signal (e.g., from a microcontroller like Arduino) to activate the relay. A transistor or relay driver circuit may be required to amplify the control signal.
  3. Connect the Load:
    • Connect the high-power circuit's input to the COM terminal (pin 3).
    • Connect the high-power circuit's output to either the NO terminal (pin 4) or the NC terminal (pin 5), depending on the desired behavior:
      • Use NO if the circuit should be off by default and turn on when the relay is activated.
      • Use NC if the circuit should be on by default and turn off when the relay is activated.

Important Considerations and Best Practices

  • Use a Flyback Diode: Always connect a flyback diode across the relay coil terminals to protect the control circuit from voltage spikes caused by the collapsing magnetic field when the relay is deactivated.
  • Check Contact Ratings: Ensure the relay's contact ratings (voltage and current) are sufficient for the load you are switching.
  • Avoid Overheating: Do not exceed the relay's rated coil voltage or current to prevent overheating and damage.
  • Isolation: Use optocouplers or relay modules with built-in isolation for added safety when interfacing with microcontrollers.

Example: Connecting a Relay to an Arduino UNO

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

// Define the pin connected to the relay module
const int relayPin = 7;

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

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

Note: If using a bare relay (not a relay module), you will need a transistor and a flyback diode to safely interface the relay with the Arduino.

Troubleshooting and FAQs

Common Issues

  1. Relay Not Activating

    • Cause: Insufficient coil voltage or current.
    • Solution: Verify the power supply voltage and current match the relay's specifications.
  2. Relay Stuck in One State

    • Cause: Damaged or worn-out relay contacts.
    • Solution: Replace the relay if it has exceeded its mechanical or electrical life.
  3. Voltage Spikes Damaging the Circuit

    • Cause: Lack of a flyback diode across the relay coil.
    • Solution: Install a flyback diode (e.g., 1N4007) across the coil terminals.
  4. Microcontroller Resetting When Relay Activates

    • Cause: Voltage spikes or insufficient power supply decoupling.
    • Solution: Add a capacitor (e.g., 100 µF) near the microcontroller's power supply and ensure proper grounding.

FAQs

  • Can I use a relay to switch AC loads? Yes, as long as the relay's contact ratings support the AC voltage and current of the load.

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

  • Do I need a relay module to use a relay with an Arduino? A relay module simplifies the connection process by including a transistor, flyback diode, and isolation circuitry. However, you can use a bare relay with additional components like a transistor and diode.

  • Can a relay handle both AC and DC loads? Yes, most relays can handle both AC and DC loads, but you must check the relay's contact ratings for each type of load.