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, allowing control of high voltage or high current devices with a low voltage signal. Relays are widely used in applications where electrical isolation, high-power switching, or remote control of circuits is required. They are commonly found in home automation systems, industrial control panels, automotive electronics, and power distribution systems.

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: Controlling lights, fans, and appliances remotely.
  • Industrial Systems: Switching high-power motors or machinery.
  • Automotive Electronics: Controlling headlights, horns, and other vehicle systems.
  • Power Protection: Overload protection and circuit isolation.
  • Microcontroller Projects: Interfacing low-power microcontrollers with high-power devices.

Technical Specifications

Key Technical Details:

  • Coil Voltage: Typically 5V, 12V, or 24V DC (depending on the relay model).
  • Switching Voltage: Up to 250V AC or 30V DC (varies by relay type).
  • Switching Current: Typically ranges from 5A to 30A.
  • Contact Configuration: SPST (Single Pole Single Throw), SPDT (Single Pole Double Throw), DPDT (Double Pole Double Throw), etc.
  • Coil Resistance: Varies based on the relay's coil voltage and power rating.
  • Isolation: Provides electrical isolation between the control circuit and the load circuit.

Pin Configuration and Descriptions:

Below is a typical pin configuration for a 5V SPDT relay:

Pin Name Description
Coil (+) Positive terminal of the electromagnetic coil. Connect to the control voltage.
Coil (-) Negative terminal of the electromagnetic coil. Connect to ground.
COM Common terminal. Connect to the load circuit.
NO (Normally Open) Open by default. Closes when the relay is activated.
NC (Normally Closed) Closed by default. Opens when the relay is activated.

Note: The pin configuration may vary depending on the relay model. Always refer to the datasheet for specific details.

Usage Instructions

How to Use a Relay in a Circuit:

  1. Power the Coil: Connect the relay's coil terminals to a power source that matches its rated coil voltage (e.g., 5V DC for a 5V relay). Use a transistor or MOSFET to drive the coil if controlled by a microcontroller.
  2. Control the Load: Connect the load circuit to the COM and NO (or NC) terminals based on the desired switching behavior:
    • Use COM and NO for devices that should turn on when the relay is activated.
    • Use COM and NC for devices that should turn off when the relay is activated.
  3. Add a Flyback Diode: Place a diode (e.g., 1N4007) across the coil terminals to protect the driving circuit from voltage spikes caused by the collapsing magnetic field when the relay is turned off.
  4. Test the Circuit: Apply the control signal to the relay's coil and verify that the load switches as expected.

Example Circuit with Arduino UNO:

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

// Define the relay pin
const int relayPin = 7; // Connect relay control pin to Arduino digital pin 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
  delay(1000); // Keep relay on for 1 second
  digitalWrite(relayPin, LOW); // Turn relay off
  delay(1000); // Keep relay off for 1 second
}

Important Considerations:

  • Ensure the relay's coil voltage matches the control circuit's output voltage.
  • Use a transistor or relay driver module if the control circuit cannot supply sufficient current to the relay coil.
  • Avoid exceeding the relay's maximum switching voltage and current ratings.

Troubleshooting and FAQs

Common Issues and Solutions:

  1. Relay Not Activating:

    • Cause: Insufficient voltage or current to the coil.
    • Solution: Verify the control voltage and current. Use a transistor or relay driver if needed.
  2. Load Not Switching:

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

    • Cause: Unstable control signal or insufficient power supply.
    • Solution: Ensure a stable control signal and adequate power supply to the relay.
  4. Damage to Microcontroller Pins:

    • Cause: Voltage spikes from the relay coil.
    • Solution: Add a flyback diode across the coil terminals to suppress voltage spikes.

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 switching voltage and current ratings are suitable for the AC load.
  • Q: What is the purpose of the flyback diode?

    • A: The flyback diode protects the control circuit from voltage spikes generated when the relay coil is de-energized.
  • Q: Can I directly connect a relay to an Arduino pin?

    • A: It is not recommended unless the relay's coil current is within the Arduino pin's current limit (typically 20mA). Use a transistor or relay driver module for safe operation.
  • Q: How do I choose the right relay for my project?

    • A: Consider the coil voltage, switching voltage, switching current, and contact configuration based on your application requirements.