

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 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 load, ensuring safety and reliability.








Below are the general technical specifications for a standard single-pole single-throw (SPST) relay. Specifications may vary depending on the specific relay model.
The pin configuration of a typical 5V SPDT relay is as follows:
| Pin Name | Description |
|---|---|
| Coil (+) | Positive terminal of the electromagnetic coil. Connect to the control voltage. |
| Coil (-) | Negative terminal of the electromagnetic coil. Connect to ground. |
| Common (COM) | Common terminal for the relay switch. |
| Normally Open (NO) | Terminal that remains disconnected from COM when the relay is inactive. It connects to COM when the relay is activated. |
| Normally Closed (NC) | Terminal that remains connected to COM when the relay is inactive. It 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 relay pin
const int relayPin = 7; // Connect the relay module's IN pin to Arduino pin 7
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
}
Relay Not Activating:
Relay Stuck in One State:
Voltage Spikes Damaging the Circuit:
Relay Clicking Noise but No Load Switching:
Q: Can I use a relay to switch AC loads?
Q: What is the purpose of the flyback diode?
Q: Can I directly connect a relay to an Arduino pin?
Q: How do I know if my relay is SPST or SPDT?