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 device, 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 load, 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, double-throw (SPDT) 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 Ratings:
    • Voltage: Up to 250V AC or 30V DC
    • Current: Up to 10A (varies by model)
  • Contact Configuration: SPDT (Single Pole Double Throw) or DPDT (Double Pole Double Throw)
  • Switching Time: 5-15 ms (typical)
  • Electrical Isolation: 1000V or higher (varies by model)
  • Lifetime:
    • Mechanical: Up to 10 million operations
    • Electrical: Up to 100,000 operations (depends on load)

Pin Configuration

The pin configuration of a typical SPDT relay is as follows:

Pin Name Description
Coil (+) Positive terminal of the electromagnetic coil.
Coil (-) Negative terminal of the electromagnetic coil.
Common (COM) Common terminal for the relay switch.
Normally Open (NO) Terminal that is disconnected from COM when the relay is inactive. It connects to COM when the relay is activated.
Normally Closed (NC) 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 a Relay in a Circuit

  1. Connect the Coil:

    • 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 flyback diode across the coil terminals to protect the circuit from voltage spikes when the relay is deactivated.
  2. Connect the Load:

    • Identify the load you want to control (e.g., a motor, light, or appliance).
    • Connect one terminal of the load to the power source.
    • Connect the other terminal of the load to the relay's NO or NC terminal, depending on whether you want the load to be normally off or normally on.
  3. Connect the Common Terminal:

    • Connect the relay's COM terminal to the power source or ground, depending on the load's configuration.
  4. Activate the Relay:

    • Apply the appropriate voltage to the relay coil to activate it. This will switch the connection between the COM and NO terminals.

Important Considerations and Best Practices

  • Flyback Diode: Always use a flyback diode across the relay coil to prevent damage to the control circuit from voltage spikes.
  • Power Ratings: Ensure the relay's contact ratings (voltage and current) are suitable for the load.
  • Isolation: Use optocouplers or transistors to isolate the control circuit from the relay if necessary.
  • Heat Dissipation: For high-power loads, ensure proper heat dissipation to avoid overheating the relay contacts.

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

Note: Ensure the relay module is compatible with the Arduino's 5V output. If the relay requires more current than the Arduino can supply, use a transistor or relay driver circuit.

Troubleshooting and FAQs

Common Issues

  1. Relay Not Activating:

    • Cause: Insufficient voltage or current to the relay coil.
    • Solution: Verify the control signal voltage and current. Ensure the power supply matches the relay's coil specifications.
  2. Load Not Switching:

    • Cause: Incorrect wiring of the load or relay terminals.
    • Solution: Double-check the connections to the COM, NO, and NC terminals.
  3. Microcontroller Resetting:

    • Cause: Voltage spikes from the relay coil affecting the microcontroller.
    • Solution: Add a flyback diode across the relay coil and ensure proper grounding.
  4. Relay Overheating:

    • Cause: Exceeding the relay's contact current rating.
    • Solution: Use a relay with a higher current rating or reduce the load current.

FAQs

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

    • A: Yes, relays are commonly used to control AC loads. Ensure the relay's contact ratings support the AC voltage and current.
  • 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 deactivated.
  • Q: Can I use a relay with a 3.3V microcontroller?

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

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