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:

Key Technical Details

  • Operating Voltage: 5V DC (common for relay modules)
  • Trigger Voltage: 3.3V to 5V (compatible with most microcontrollers)
  • Maximum Switching Voltage: 250V AC or 30V DC
  • Maximum Switching Current: 10A
  • Relay Type: SPDT (Single Pole Double Throw)
  • Isolation: Optocoupler isolation (on some modules)
  • Indicator: LED to show relay status (ON/OFF)

Pin Configuration and Descriptions

Relay Module Pinout

Pin Name Description
VCC Power supply pin (typically 5V DC)
GND Ground connection
IN Control signal input (low-level trigger or high-level trigger, depending on module)

Relay Output Terminals

Terminal Name Description
COM Common terminal, connected to the moving part of the relay switch
NO Normally Open terminal, disconnected from COM when the relay is inactive
NC Normally Closed terminal, connected to COM when the relay is inactive

Usage Instructions

How to Use the Relay in a Circuit

  1. Power the Relay Module: Connect the VCC pin to a 5V power source and the GND pin to ground.
  2. Connect the Control Signal: Connect the IN pin to the control signal source (e.g., a microcontroller pin).
  3. Connect the Load:
    • Identify the load you want to control (e.g., a light bulb or motor).
    • Connect one terminal of the load to the power source.
    • Connect the other terminal of the load to the NO (Normally Open) terminal of the relay.
    • Connect the COM terminal of the relay to the ground or neutral of the power source.
  4. Control the Relay: Send a HIGH or LOW signal to the IN pin to activate or deactivate the relay.

Important Considerations and Best Practices

  • Isolation: Ensure proper isolation between the control circuit and the high-power circuit to avoid damage or hazards.
  • Flyback Diode: If controlling an inductive load (e.g., a motor), use a flyback diode across the load to protect the relay from voltage spikes.
  • Power Ratings: Do not exceed the relay's maximum voltage or current ratings to prevent overheating or failure.
  • Trigger Voltage: Verify the relay module's trigger voltage compatibility with your control signal source (e.g., Arduino or Raspberry Pi).

Example: Using a Relay with Arduino UNO

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

// Example: Controlling a relay module with Arduino UNO

const int relayPin = 7; // Define the pin connected to the relay module's IN pin

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
}

Notes:

  • Ensure the relay module is powered with 5V from the Arduino's 5V pin.
  • The relay's IN pin should be connected to pin 7 on the Arduino.
  • The load (e.g., a light bulb) should be connected to the relay's NO and COM terminals.

Troubleshooting and FAQs

Common Issues and Solutions

  1. Relay Not Activating:

    • Cause: Insufficient trigger voltage or incorrect wiring.
    • Solution: Verify the control signal voltage matches the relay's trigger voltage. Check all connections.
  2. Relay Stuck in ON or OFF State:

    • Cause: Damaged relay contacts or excessive load current.
    • Solution: Ensure the load does not exceed the relay's maximum current rating. Replace the relay if necessary.
  3. Microcontroller Resetting When Relay Activates:

    • Cause: Voltage spikes or insufficient power supply.
    • Solution: Use a flyback diode across inductive loads. Ensure the power supply can handle the relay's current draw.
  4. LED Indicator Not Working:

    • Cause: Faulty LED or insufficient power to the relay module.
    • Solution: Check the power supply and connections. Replace the module if the LED is damaged.

FAQs

  • Q: Can I use a 3.3V microcontroller to control a 5V relay module?
    A: Yes, if the relay module supports a 3.3V trigger voltage. Otherwise, use a transistor or level shifter.

  • Q: Can I control multiple relays with one microcontroller?
    A: Yes, as long as each relay is connected to a separate GPIO pin and the microcontroller can supply sufficient current.

  • Q: Is it safe to use a relay for AC loads?
    A: Yes, but ensure the relay's voltage and current ratings are suitable for the AC load. Always follow safety precautions when working with high voltages.

  • Q: Why is my relay module making a clicking sound?
    A: The clicking sound is normal and indicates the relay is switching states. If the sound is continuous, check for a faulty control signal or wiring issue.