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 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!
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

Common Applications and Use Cases

Technical Specifications

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

Key Technical Details

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

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:

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