Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use relay: Examples, Pinouts, and Specs

Image of relayDesign 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 are ideal for isolating circuits and controlling high-current loads with minimal input power.

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 RF-Controlled Relay Switch with Indicator LEDs and Buzzer: 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.

Open 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

Pin Configuration and Descriptions

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) The common terminal that connects to either the Normally Open (NO) or Normally Closed (NC) contact.
Normally Open (NO) The terminal that remains disconnected from COM when the relay is inactive. It connects to COM when the relay is activated.
Normally Closed (NC) The terminal that remains 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. Power the Coil: Connect the relay's coil terminals to a DC power source (e.g., 5V or 12V) through a transistor or driver circuit. Ensure the voltage matches the relay's coil rating.
  2. Control the Coil: Use a low-power control signal (e.g., from a microcontroller like Arduino) to activate the transistor or driver circuit, which energizes the relay coil.
  3. Connect the Load: Wire the high-power load to the relay's COM and NO or NC terminals, depending on whether you want the load to be normally off or normally on.
  4. Add Protection: Place 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.

Important Considerations and Best Practices

Example: Connecting a Relay to an Arduino UNO

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

Circuit Diagram

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

Troubleshooting and FAQs

Common Issues and Solutions

  1. Relay Not Activating:

    • Cause: Insufficient voltage or current to the coil.
    • Solution: Verify the power supply voltage and current match the relay's coil specifications.
  2. Relay Stuck in One State:

    • Cause: Damaged or worn-out contacts.
    • Solution: Replace the relay if it has exceeded its electrical or mechanical life.
  3. Voltage Spikes Damaging the Circuit:

    • Cause: Absence of a flyback diode.
    • Solution: Install a flyback diode across the coil terminals.
  4. Load Not Switching Properly:

    • Cause: Incorrect wiring of the COM, NO, or NC terminals.
    • Solution: Double-check the wiring and ensure the load is connected to the correct terminals.

FAQs