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 electromagnet to open or close a circuit, allowing control of a high-power circuit with a low-power signal. Relays are widely used in applications where it is necessary to isolate control signals from the high-power circuit or to control multiple circuits with a single signal.

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 and Use Cases

  • Home automation systems (e.g., controlling lights or appliances)
  • Automotive systems (e.g., controlling headlights or horns)
  • Industrial equipment (e.g., motor control or safety systems)
  • Microcontroller-based projects (e.g., Arduino or Raspberry Pi projects)
  • Power distribution systems

Technical Specifications

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

Parameter Value
Operating Voltage 5V DC (common for relay modules)
Trigger Voltage 3.3V to 5V DC
Maximum Switching Voltage 250V AC / 30V DC
Maximum Switching Current 10A
Coil Resistance ~70Ω (varies by model)
Isolation Optocoupler isolation (in some modules)
Dimensions ~50mm x 26mm x 18mm (module size)

Pin Configuration and Descriptions

For a typical 5V single-channel relay module:

Pin Name Description
VCC Power supply pin for the relay module (typically 5V DC).
GND Ground connection for the module.
IN Control signal input pin. A HIGH signal activates the relay.
COM Common terminal of 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 the Relay in a Circuit

  1. Power the Relay Module: Connect the VCC pin to a 5V DC power source and the GND pin to ground.
  2. Control Signal: Connect the IN pin to a microcontroller's GPIO pin or another control signal source.
  3. Load Connection:
    • Connect the high-power circuit's live wire to the COM terminal.
    • Connect the load to either the NO (Normally Open) or NC (Normally Closed) terminal, depending on the desired behavior:
      • Use NO if the load should be off by default and turn on when the relay is activated.
      • Use NC if the load should be on by default and turn off when the relay is activated.
  4. Isolation (Optional): If the relay module includes an optocoupler, ensure proper isolation between the control and load circuits.

Important Considerations and Best Practices

  • Voltage and Current Ratings: Ensure the relay's voltage and current ratings are not exceeded to avoid damage.
  • Flyback Diode: If using a standalone relay (not a module), add a flyback diode across the relay coil to protect the circuit from voltage spikes.
  • Optocoupler Isolation: Use relay modules with optocoupler isolation for added safety in sensitive circuits.
  • Avoid Rapid Switching: Do not rapidly switch the relay on and off, as this can cause wear and tear on the mechanical contacts.

Example: Using a Relay with Arduino UNO

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

// Define the pin connected to the relay module's IN pin
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 (activates the connected load)
  digitalWrite(relayPin, HIGH);
  delay(5000); // Keep the relay on for 5 seconds

  // Turn the relay off (deactivates the connected load)
  digitalWrite(relayPin, LOW);
  delay(5000); // Keep the relay off for 5 seconds
}

Note: Ensure the relay module's IN pin is compatible with the Arduino's 5V logic level. If using a 3.3V microcontroller, check the relay module's trigger voltage requirements.

Troubleshooting and FAQs

Common Issues and Solutions

  1. Relay Not Activating:

    • Cause: Insufficient voltage or current to the relay module.
    • Solution: Verify the power supply voltage (5V DC) and ensure the control signal is within the required range.
  2. Load Not Switching:

    • Cause: Incorrect wiring of the load to the relay terminals.
    • Solution: Double-check the connections to the COM, NO, and NC terminals.
  3. Relay Clicking Rapidly:

    • Cause: Unstable control signal or noise in the circuit.
    • Solution: Use a pull-down resistor on the control signal pin or add a capacitor to stabilize the signal.
  4. Burnt Relay Contacts:

    • Cause: Exceeding the relay's voltage or current ratings.
    • Solution: Use a relay with appropriate ratings for the load.

FAQs

Q1: Can I use a relay to control an AC appliance?
Yes, relays are commonly used to control AC appliances. Ensure the relay's voltage and current ratings are suitable for the appliance.

Q2: What is the difference between NO and NC terminals?

  • NO (Normally Open): The circuit is open by default and closes when the relay is activated.
  • NC (Normally Closed): The circuit is closed by default and opens when the relay is activated.

Q3: Can I use a relay with a 3.3V microcontroller?
Some relay modules support 3.3V control signals. Check the module's specifications or use a transistor circuit to interface the relay with a 3.3V microcontroller.

Q4: How do I protect my circuit from relay-induced voltage spikes?
Use a flyback diode across the relay coil to suppress voltage spikes caused by the collapsing magnetic field when the relay is turned off. Most relay modules already include this diode.