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 higher power circuit, providing isolation and control in various applications. Relays are widely used in automation, home appliances, automotive systems, and industrial equipment to control high-current devices such as motors, lights, and heaters.

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 other appliances.
  • Automotive Systems: Switching headlights, horns, and other high-current loads.
  • Industrial Equipment: Managing motors, pumps, and solenoids.
  • Microcontroller Projects: Interfacing low-power microcontrollers with high-power devices.

Technical Specifications

Below are the general technical specifications for a standard 5V single-channel relay module:

Key Specifications

  • Operating Voltage: 5V DC
  • Trigger Voltage: 3.3V to 5V (logic level compatible)
  • Maximum Switching Voltage: 250V AC or 30V DC
  • Maximum Switching Current: 10A
  • Coil Resistance: ~70Ω (varies by model)
  • Isolation: Optocoupler isolation (for relay modules)
  • Relay Type: SPDT (Single Pole Double Throw)

Pin Configuration

The relay module typically has the following pins:

Pin Name Description
VCC Connect to the 5V power supply.
GND Connect to the ground of the power supply.
IN Control signal input (logic HIGH activates the relay).
COM Common terminal for the relay switch.
NO Normally Open terminal (connected to COM when the relay is activated).
NC Normally Closed terminal (connected to COM when the relay is not activated).

Usage Instructions

How to Use a Relay in a Circuit

  1. Power the Relay: Connect the VCC and GND pins of the relay module to a 5V DC power supply.
  2. Control Signal: Connect the IN pin to a microcontroller's GPIO pin or another control signal source.
  3. Load Connection:
    • Connect the device you want to control (e.g., a light bulb) to the NO terminal.
    • Connect the other end of the device to the power source.
    • Connect the COM terminal to the power source's ground or live wire, depending on the circuit design.
  4. Trigger the Relay: Send a HIGH signal (3.3V or 5V) to the IN pin to activate the relay and close the circuit between COM and NO.

Important Considerations

  • Isolation: Ensure proper isolation between the low-power control circuit and the high-power load.
  • Flyback Diode: If you're using a bare relay (not a module), add a flyback diode across the coil to protect the circuit from voltage spikes.
  • Current Rating: Do not exceed the relay's maximum current and voltage ratings.
  • Safety: When working with high voltages, ensure proper insulation and follow safety guidelines.

Example: Using a Relay with Arduino UNO

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

// 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 initially
}

void loop() {
  digitalWrite(relayPin, HIGH); // Turn the relay on
  delay(1000); // Keep it on for 1 second
  digitalWrite(relayPin, LOW); // Turn the relay off
  delay(1000); // Keep it off for 1 second
}

Explanation:

  • The relay is connected to pin 7 of the Arduino.
  • The digitalWrite function is used to send HIGH or LOW signals to the relay.
  • The relay alternates between ON and OFF states every second.

Troubleshooting and FAQs

Common Issues

  1. Relay Not Activating:

    • Check if the VCC and GND connections are secure.
    • Ensure the control signal voltage is within the relay's trigger range.
    • Verify that the power supply provides sufficient current for the relay.
  2. Load Not Switching:

    • Confirm that the load is properly connected to the NO or NC terminal.
    • Check if the load's voltage and current are within the relay's specifications.
  3. Relay Buzzing or Clicking Rapidly:

    • This may occur if the control signal is unstable. Use a pull-down resistor on the IN pin to stabilize the signal.
  4. Microcontroller Resetting:

    • High-current loads can cause voltage dips. Use a separate power supply for the relay module or add a capacitor to stabilize the power.

FAQs

Q: Can I use a 3.3V microcontroller to control a 5V relay?
A: Yes, most 5V relay modules can be triggered by a 3.3V control signal. However, check the module's datasheet to confirm compatibility.

Q: What is the difference between NO and NC terminals?
A: The NO (Normally Open) terminal is disconnected from COM when the relay is off and connected when the relay is on. The NC (Normally Closed) terminal is the opposite—it is connected to COM when the relay is off and disconnected when the relay is on.

Q: Can I use a relay to switch DC and AC loads?
A: Yes, relays can switch both DC and AC loads, but ensure the load voltage and current are within the relay's rated specifications.

Q: Do I need an external transistor to drive the relay?
A: If you're using a relay module, it typically includes a transistor for driving the relay. For bare relays, you will need an external transistor or driver circuit.