

A relay is an electromechanical switch that uses an electromagnetic coil to open or close a circuit. It allows control of high-power devices using low-power signals, making it an essential component in automation, control systems, and various electronic applications. Relays are widely used in home appliances, automotive systems, industrial machinery, and microcontroller-based projects.








Below are the general technical specifications for a typical relay. Always refer to the datasheet of the specific relay model for precise details.
The relay typically has 5 pins for SPDT configuration. Below is the pinout description:
| Pin Name | Description |
|---|---|
| Coil+ | Positive terminal of the electromagnetic coil. |
| Coil- | Negative terminal of the electromagnetic coil. |
| Common (COM) | Common terminal for the switch. |
| Normally Open (NO) | Connected to COM when the relay is activated (coil energized). |
| Normally Closed (NC) | Connected to COM when the relay is not activated (coil de-energized). |
Below is an example of how to control a relay using an Arduino UNO:
// Relay control example with Arduino UNO
// Connect the relay module's IN pin to Arduino pin 7
// Ensure the relay module is powered with 5V and GND
#define RELAY_PIN 7 // Define the Arduino pin connected to the relay module
void setup() {
pinMode(RELAY_PIN, OUTPUT); // Set the relay pin as an output
digitalWrite(RELAY_PIN, LOW); // Ensure the relay is off initially
}
void loop() {
digitalWrite(RELAY_PIN, HIGH); // Turn the relay on
delay(1000); // Keep the relay on for 1 second
digitalWrite(RELAY_PIN, LOW); // Turn the relay off
delay(1000); // Keep the relay off for 1 second
}
Relay Not Activating:
Load Not Switching:
Relay Buzzing or Clicking Rapidly:
Overheating:
Q: Can I use a relay to control an AC load with a DC control signal?
A: Yes, relays are designed to isolate and control AC loads using a DC control signal. Ensure the relay's contact rating supports the AC load's voltage and current.
Q: Why is a flyback diode necessary?
A: A flyback diode protects the control circuit from voltage spikes generated when the relay's coil is de-energized. Without it, the voltage spike could damage sensitive components like transistors or microcontrollers.
Q: Can I directly connect a relay to an Arduino pin?
A: No, most relays require more current than an Arduino pin can supply. Use a transistor or a relay driver module to control the relay safely.
Q: How do I know if my relay is SPDT or DPDT?
A: Check the relay's datasheet or inspect the pin configuration. SPDT relays have 5 pins, while DPDT relays typically have 8 pins.
By following this documentation, you can effectively use a relay in your electronic projects while ensuring safety and reliability.