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 control of high voltage or high current devices using a low voltage signal, making it an essential component in automation, control systems, and safety circuits. Relays are widely used in applications such as home automation, motor control, industrial equipment, and automotive systems.

Common applications include:

  • Switching high-power devices like motors, lights, and heaters.
  • Isolating low voltage control circuits from high voltage loads.
  • Implementing logic control in industrial automation systems.
  • Protecting circuits by acting as an intermediary switch.

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

Technical Specifications

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

Key Technical Details

  • Coil Voltage: 5V, 12V, or 24V DC (depending on the relay type)
  • Coil Current: Typically 30-100 mA
  • Contact Rating: Up to 250V AC / 30V DC, 10A (varies by model)
  • Switching Mechanism: Electromagnetic
  • Contact Configuration: SPST, SPDT, DPDT, etc.
  • Isolation Voltage: Typically 1000V or higher
  • Response Time: 5-15 ms (typical)

Pin Configuration and Descriptions

The pin configuration of a relay depends on its type. Below is the pinout for a common 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 or power source.
NO Normally Open terminal. The circuit is open when the relay is inactive.
NC Normally Closed terminal. The circuit is closed when the relay is inactive.

Usage Instructions

How to Use the Relay in a Circuit

  1. Connect the Coil Terminals:

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

    • Identify whether you want the load to be connected to the Normally Open (NO) or Normally Closed (NC) terminal.
    • For devices that should only turn on when the relay is activated, connect the load to the NO terminal.
    • For devices that should remain on by default and turn off when the relay is activated, connect the load to the NC terminal.
    • Connect the other side of the load to the power source.
  3. Power the Relay:

    • Ensure the control voltage matches the relay's coil voltage rating (e.g., 5V for a 5V relay).
    • Activate the relay by applying the control voltage to the Coil+ pin.

Important Considerations and Best Practices

  • Diode Protection: Always connect a flyback diode (e.g., 1N4007) 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 contact rating is sufficient for the load's voltage and current requirements.
  • Isolation: Use optocouplers or transistor drivers if the control circuit cannot directly drive the relay.
  • Power Supply: Use a stable power supply to avoid relay chatter (rapid switching due to unstable voltage).

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 12V LED.

Circuit Connections

  • Connect the relay's Coil+ pin to Arduino digital pin 7.
  • Connect the Coil- pin to Arduino GND.
  • Connect the LED's positive terminal to the relay's NO terminal.
  • Connect the LED's negative terminal to the 12V power supply ground.
  • Connect the relay's COM terminal to the 12V power supply positive terminal.

Arduino Code

// 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 at startup
}

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
}

Troubleshooting and FAQs

Common Issues

  1. Relay Not Activating:

    • Check if the control voltage matches the relay's coil voltage rating.
    • Verify that the control circuit can supply enough current to activate the relay.
  2. Relay Chattering:

    • Ensure the power supply is stable and not fluctuating.
    • Add a capacitor across the power supply to smooth out voltage dips.
  3. Load Not Switching:

    • Confirm the load is connected to the correct terminal (NO or NC).
    • Check if the relay's contact rating is sufficient for the load.
  4. Burnt Relay Contacts:

    • Ensure the load's current and voltage do not exceed the relay's contact rating.
    • Use a relay with a higher rating or add a snubber circuit for inductive loads.

FAQs

Q: Can I use a relay to switch AC loads?
A: Yes, relays are commonly used to switch AC loads. Ensure the relay's contact rating supports the AC voltage and current of the load.

Q: Why do I need a flyback diode?
A: A flyback diode protects the control circuit from voltage spikes generated when the relay coil is de-energized. Without it, the voltage spike could damage sensitive components.

Q: Can I directly connect a relay to a microcontroller?
A: It depends on the relay's coil current. If the microcontroller cannot supply enough current, use a transistor or relay driver circuit.

Q: How do I know if my relay is working?
A: You should hear a clicking sound when the relay switches. You can also measure continuity between the COM and NO/NC terminals to verify operation.