

A relay is an electromechanical switch that uses an electromagnet to open or close a circuit. It allows a low-power signal to control a high-power circuit, making it an essential component in many electronic and electrical systems. Relays are widely used in applications such as home automation, industrial control systems, automotive electronics, and power distribution systems. They provide electrical isolation between the control circuit and the high-power circuit, ensuring safety and reliability.








Below are the general technical specifications for a standard single-pole, double-throw (SPDT) relay. Specifications may vary depending on the specific relay model.
The pin configuration for a standard 5-pin SPDT relay is as follows:
| Pin Number | Name | Description |
|---|---|---|
| 1 | Coil (+) | Positive terminal of the relay coil. Connect to the control signal or power. |
| 2 | Coil (-) | Negative terminal of the relay coil. Connect to ground. |
| 3 | Common (COM) | Common terminal for the relay switch. Connect to the input power or signal. |
| 4 | Normally Open (NO) | Terminal that is disconnected from COM when the relay is inactive. Connects to COM when the relay is activated. |
| 5 | Normally Closed (NC) | Terminal that is connected to COM when the relay is inactive. Disconnects from COM when the relay is activated. |
Below is an example of how to control a 5V relay using an Arduino UNO:
// Define the pin connected to the relay module
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 (activate)
digitalWrite(relayPin, HIGH);
delay(1000); // Keep the relay on for 1 second
// Turn the relay off (deactivate)
digitalWrite(relayPin, LOW);
delay(1000); // Keep the relay off for 1 second
}
Note: If using a bare relay (not a relay module), you will need a transistor and a flyback diode to safely interface the relay with the Arduino.
Relay Not Activating
Relay Stuck in One State
Voltage Spikes Damaging the Circuit
Microcontroller Resetting When Relay Activates
Can I use a relay to switch AC loads? Yes, as long as the relay's contact ratings support the AC voltage and current of the load.
What is the difference between NO and NC terminals? The NO (Normally Open) terminal is disconnected from the COM terminal when the relay is inactive, while the NC (Normally Closed) terminal is connected to the COM terminal when the relay is inactive.
Do I need a relay module to use a relay with an Arduino? A relay module simplifies the connection process by including a transistor, flyback diode, and isolation circuitry. However, you can use a bare relay with additional components like a transistor and diode.
Can a relay handle both AC and DC loads? Yes, most relays can handle both AC and DC loads, but you must check the relay's contact ratings for each type of load.