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 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!
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.

General Specifications

  • Coil Voltage: 5V, 12V, or 24V DC (common options)
  • Coil Current: Typically 30–100 mA
  • Contact Rating: 10A at 250V AC or 10A at 30V DC
  • Contact Type: SPST (Single Pole Single Throw) or SPDT (Single Pole Double Throw)
  • Switching Time: 5–15 ms
  • Dielectric Strength: 1000V AC (coil to contact)
  • Insulation Resistance: ≥ 100 MΩ at 500V DC
  • Mechanical Life: 10 million operations (typical)
  • Electrical Life: 100,000 operations (typical)

Pin Configuration and Descriptions

The pin configuration of a relay typically includes the following terminals:

Pin Name Description
Coil (+) Positive terminal of the electromagnetic coil.
Coil (-) Negative terminal of the electromagnetic coil.
Common (COM) The common terminal connected to the moving part of the switch.
Normally Open (NO) The terminal that is disconnected from COM when the relay is inactive. It connects to COM when the relay is activated.
Normally Closed (NC) The terminal that is connected to COM when the relay is inactive. It disconnects from COM when the relay is activated.

Usage Instructions

How to Use the Relay in a Circuit

  1. Connect the Coil Terminals:

    • Connect the positive terminal of the relay coil to the control signal (e.g., from a microcontroller or transistor).
    • Connect the negative terminal of the relay coil to ground.
    • If the control signal is from a microcontroller, use a current-limiting resistor or a transistor to drive the relay safely.
  2. Connect the Load Circuit:

    • Identify the high-power circuit you want to control.
    • Connect one side of the load to the COM terminal.
    • Connect the other side of the load to either the NO or NC terminal, depending on whether you want the load to be powered when the relay is active (NO) or inactive (NC).
  3. Add a Flyback Diode:

    • Place a diode (e.g., 1N4007) across the relay coil terminals, with the cathode connected to the positive terminal. This protects the circuit from voltage spikes generated when the relay coil is de-energized.

Example: Controlling a Relay with 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
  digitalWrite(relayPin, HIGH);
  delay(1000); // Keep the relay on for 1 second
  
  // Turn the relay off
  digitalWrite(relayPin, LOW);
  delay(1000); // Keep the relay off for 1 second
}

Important Considerations and Best Practices

  • Always check the relay's voltage and current ratings to ensure compatibility with your circuit.
  • Use a transistor or relay driver IC (e.g., ULN2003) to control the relay if the control signal cannot provide sufficient current.
  • Ensure proper insulation and spacing between the high-power and low-power sides of the circuit.
  • Avoid switching high currents frequently, as this can reduce the relay's lifespan.

Troubleshooting and FAQs

Common Issues and Solutions

  1. Relay Does Not Activate:

    • Cause: Insufficient voltage or current to the coil.
    • Solution: Verify the control signal voltage and current. Use a transistor or relay driver if needed.
  2. Relay Stays On or Off Permanently:

    • Cause: Faulty relay or incorrect wiring.
    • Solution: Check the wiring and ensure the relay is not damaged.
  3. Voltage Spikes in the Circuit:

    • Cause: Inductive kickback from the relay coil.
    • Solution: Add a flyback diode across the relay coil terminals.
  4. Load Does Not Turn On/Off:

    • Cause: Incorrect connection of the load to the relay terminals.
    • Solution: Verify the load is connected to the correct terminals (COM, NO, or NC).

FAQs

  • Q: Can I use a relay to control an AC appliance?

    • A: Yes, as long as the relay's contact rating supports the voltage and current of the AC appliance.
  • Q: Why is a flyback diode necessary?

    • A: The flyback diode protects the control circuit from voltage spikes generated when the relay coil is de-energized.
  • Q: Can I use a relay with a 3.3V microcontroller?

    • A: Yes, but you may need a transistor or relay driver to amplify the control signal to the relay's required coil voltage.
  • Q: How do I know if my relay is SPST or SPDT?

    • A: Check the relay's datasheet or look for the number of terminals. SPST relays have 4 pins, while SPDT relays typically have 5 pins.

By following this documentation, you can effectively integrate a relay into your electronic projects and troubleshoot common issues.