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 high-power devices, making it an essential component in automation, home appliances, and industrial systems. Relays are commonly used for isolating control circuits from high-power loads, enabling safe and efficient operation.

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!
Arduino-Based Wireless Power Transmission System with Copper Coils
Image of nagesh: A project utilizing relay in a practical application
This circuit consists of multiple copper coils connected to transmitters and a receiver, likely forming a wireless power transfer or communication system. The transmitters are connected to individual coils, and the receiver is connected to another coil, facilitating the transmission and reception of signals or power wirelessly.
Cirkit Designer LogoOpen Project in Cirkit Designer
RF-Controlled Relay Switch with Indicator LEDs and Buzzer
Image of receiver: A project utilizing relay in a practical application
This circuit features an RF receiver that controls a 12V relay, which in turn switches between two circuits: one with a green LED and another with a red LED and a buzzer, both protected by resistors. A rocker switch is used to supply power from a 9V battery to the RF receiver and the relay's coil. The relay's normally closed (NC) contact is connected to the green LED, while the normally open (NO) contact is connected to the red LED and the buzzer, indicating that the relay's state determines which of the two circuits is active.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP8266 and HC-05 Bluetooth-Based Home Automation System with 4-Channel Relay Control
Image of home automation using arduino: A project utilizing relay in a practical application
This circuit is a Bluetooth-based home automation system that uses an ESP8266 NodeMCU to control a 4-channel relay module. The relays can be toggled via Bluetooth commands received from an HC-05 Bluetooth module or by pressing connected pushbuttons. The system also includes pilot lamps to indicate the status of each relay.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO and Relay-Controlled RS485 Communication System
Image of Diagrama: A project utilizing relay in a practical application
This circuit features an Arduino UNO microcontroller interfaced with a 4-channel relay module and a UART TTL to RS485 converter. The Arduino controls the relays via digital pins and communicates with the RS485 converter for serial communication, enabling control of external devices and communication over long distances.
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 nagesh: A project utilizing relay in a practical application
Arduino-Based Wireless Power Transmission System with Copper Coils
This circuit consists of multiple copper coils connected to transmitters and a receiver, likely forming a wireless power transfer or communication system. The transmitters are connected to individual coils, and the receiver is connected to another coil, facilitating the transmission and reception of signals or power wirelessly.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of receiver: A project utilizing relay in a practical application
RF-Controlled Relay Switch with Indicator LEDs and Buzzer
This circuit features an RF receiver that controls a 12V relay, which in turn switches between two circuits: one with a green LED and another with a red LED and a buzzer, both protected by resistors. A rocker switch is used to supply power from a 9V battery to the RF receiver and the relay's coil. The relay's normally closed (NC) contact is connected to the green LED, while the normally open (NO) contact is connected to the red LED and the buzzer, indicating that the relay's state determines which of the two circuits is active.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of home automation using arduino: A project utilizing relay in a practical application
ESP8266 and HC-05 Bluetooth-Based Home Automation System with 4-Channel Relay Control
This circuit is a Bluetooth-based home automation system that uses an ESP8266 NodeMCU to control a 4-channel relay module. The relays can be toggled via Bluetooth commands received from an HC-05 Bluetooth module or by pressing connected pushbuttons. The system also includes pilot lamps to indicate the status of each relay.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Diagrama: A project utilizing relay in a practical application
Arduino UNO and Relay-Controlled RS485 Communication System
This circuit features an Arduino UNO microcontroller interfaced with a 4-channel relay module and a UART TTL to RS485 converter. The Arduino controls the relays via digital pins and communicates with the RS485 converter for serial communication, enabling control of external devices and communication over long distances.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Home automation systems (e.g., controlling lights, fans, or appliances)
  • Industrial machinery and motor control
  • Automotive systems (e.g., controlling headlights or horns)
  • Microcontroller-based projects (e.g., Arduino or Raspberry Pi)
  • Safety systems (e.g., overload protection or circuit isolation)

Technical Specifications

Key Technical Details

  • Operating Voltage (Coil): Typically 5V, 12V, or 24V DC (varies by model)
  • Switching Voltage (Load): Up to 250V AC or 30V DC (depending on relay type)
  • Switching Current (Load): Typically 10A (varies by model)
  • Contact Configuration: SPDT (Single Pole Double Throw) or DPDT (Double Pole Double Throw)
  • Coil Resistance: Varies by model (e.g., 70Ω for a 5V relay)
  • Isolation: Electrical isolation between control and load circuits
  • Lifetime: Mechanical (millions of operations) and electrical (hundreds of thousands of operations)

Pin Configuration and Descriptions

Below is the pin configuration for a standard 5V SPDT relay:

Pin Name Description
Coil+ Positive terminal of the electromagnetic coil (connect to control voltage)
Coil- Negative terminal of the electromagnetic coil (connect to ground)
COM Common terminal for the load circuit
NO Normally Open terminal (disconnected from COM when the relay is inactive)
NC Normally Closed terminal (connected to COM when the relay is inactive)

Usage Instructions

How to Use a Relay in a Circuit

  1. Connect the Coil Terminals:

    • Connect the Coil+ pin to the control signal (e.g., 5V from a microcontroller or power supply).
    • Connect the Coil- pin to ground.
  2. Connect the Load Circuit:

    • Identify whether you want the load to be normally open (NO) or normally closed (NC).
    • Connect one side of the load to the COM pin.
    • Connect the other side of the load to either the NO or NC pin, depending on your desired behavior.
  3. Power the Relay:

    • Ensure the control voltage matches the relay's coil voltage rating (e.g., 5V for a 5V relay).
    • When the control signal is applied, the relay will activate, switching the load circuit.

Important Considerations

  • Flyback Diode: Always use a flyback diode across the coil terminals to protect the circuit from voltage spikes caused by the collapsing magnetic field when the relay is deactivated.
  • Current Ratings: Ensure the relay's current and voltage ratings match the requirements of your load.
  • Isolation: Use optocouplers or transistor drivers if the control circuit cannot directly drive the relay.
  • Power Supply: Ensure the power supply can handle the relay's coil current.

Example: Using a Relay with Arduino UNO

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

// Define the relay control pin
const int relayPin = 7; // Connect this pin to the relay's Coil+ terminal

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); // 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: Connect the relay's Coil- terminal to the Arduino's GND. Use a transistor or relay module if the Arduino cannot directly drive the relay.

Troubleshooting and FAQs

Common Issues and Solutions

  1. Relay Not Activating:

    • Cause: Insufficient control voltage or current.
    • Solution: Verify the control voltage matches the relay's coil voltage rating. Use a transistor driver if necessary.
  2. Load Not Switching:

    • Cause: Incorrect wiring of the load circuit.
    • Solution: Double-check the connections to the COM, NO, and NC pins.
  3. Relay Buzzing or Chattering:

    • Cause: Unstable control signal or insufficient power supply.
    • Solution: Ensure a stable control voltage and adequate power supply. Add a capacitor across the power supply if needed.
  4. Damage to Microcontroller:

    • Cause: Voltage spikes from the relay coil.
    • Solution: Always use a flyback diode across the coil terminals.

FAQs

  • Q: Can I use a relay to control AC devices?
    A: Yes, relays are commonly used to control AC devices. Ensure the relay's voltage and current ratings are suitable for the AC load.

  • Q: Do I need a separate power supply for the relay?
    A: It depends on your circuit. If the control circuit cannot provide sufficient current, use a separate power supply for the relay.

  • Q: What is the difference between NO and NC?
    A: NO (Normally Open) means the circuit is open when the relay is inactive, while NC (Normally Closed) means the circuit is closed when the relay is inactive.

  • Q: Can I use a relay with a Raspberry Pi?
    A: Yes, but since the Raspberry Pi's GPIO pins cannot supply enough current, you will need a relay module or a transistor driver.

By following this documentation, you can effectively integrate a relay into your electronic projects for safe and reliable control of high-power devices.