

A relay is an electromechanical switch that uses an electromagnetic coil to open or close a circuit. It allows a low-power signal to control a high-power device, 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 load, 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 of a typical SPDT relay is as follows:
| Pin Name | Description |
|---|---|
| Coil (+) | Positive terminal of the electromagnetic coil. |
| Coil (-) | Negative terminal of the electromagnetic coil. |
| Common (COM) | Common terminal for the relay switch. |
| Normally Open (NO) | Terminal that is disconnected from COM when the relay is inactive. It connects to COM when the relay is activated. |
| Normally Closed (NC) | Terminal that is connected to COM when the relay is inactive. It disconnects from COM when the relay is activated. |
Connect the Coil:
Connect the Load:
Connect the Common Terminal:
Activate the Relay:
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 (connects COM to NO)
digitalWrite(relayPin, HIGH);
delay(1000); // Keep the relay on for 1 second
// Turn the relay off (connects COM to NC)
digitalWrite(relayPin, LOW);
delay(1000); // Keep the relay off for 1 second
}
Note: Ensure the relay module is compatible with the Arduino's 5V output. If the relay requires more current than the Arduino can supply, use a transistor or relay driver circuit.
Relay Not Activating:
Load Not Switching:
Microcontroller Resetting:
Relay Overheating:
Q: Can I use a relay to control an AC load?
Q: What is the purpose of the flyback diode?
Q: Can I use a relay with a 3.3V microcontroller?
Q: How do I know if my relay is SPDT or DPDT?