

A relay is an electromechanical switch that uses an electromagnetic coil to open or close a circuit. It allows control of high voltage or high current devices using a low voltage signal, making it an essential component in automation, control systems, and safety circuits. Relays are widely used in applications such as home automation, motor control, industrial equipment, and automotive systems.
Common applications include:








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 relay depends on its type. Below is the pinout for a common 5V SPDT relay:
| 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. |
| COM | Common terminal. Connect to the load or power source. |
| NO | Normally Open terminal. The circuit is open when the relay is inactive. |
| NC | Normally Closed terminal. The circuit is closed when the relay is inactive. |
Connect the Coil Terminals:
Connect the Load:
Power the Relay:
Below is an example of how to control a 5V relay using an Arduino UNO to switch a 12V LED.
// Define the relay control pin
const int relayPin = 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); // Activate the relay
delay(1000); // Keep the relay on for 1 second
digitalWrite(relayPin, LOW); // Deactivate the relay
delay(1000); // Keep the relay off for 1 second
}
Relay Not Activating:
Relay Chattering:
Load Not Switching:
Burnt Relay Contacts:
Q: Can I use a relay to switch AC loads?
A: Yes, relays are commonly used to switch AC loads. Ensure the relay's contact rating supports the AC voltage and current of the load.
Q: Why do I need a flyback diode?
A: A flyback diode protects the control circuit from voltage spikes generated when the relay coil is de-energized. Without it, the voltage spike could damage sensitive components.
Q: Can I directly connect a relay to a microcontroller?
A: It depends on the relay's coil current. If the microcontroller cannot supply enough current, use a transistor or relay driver circuit.
Q: How do I know if my relay is working?
A: You should hear a clicking sound when the relay switches. You can also measure continuity between the COM and NO/NC terminals to verify operation.