The Single Pole Double Throw (SPDT) relay module is an electromechanical switch designed to control circuits using either low-power or high-power signals. It features three terminals: Common (COM), Normally Open (NO), and Normally Closed (NC). This configuration allows the relay to switch between two circuits, making it a versatile component for various applications.
The SPDT relay module typically has the following pins:
Pin Name | Description |
---|---|
VCC | Power supply pin (5V DC) |
GND | Ground connection |
IN | Control signal input (activates the relay when HIGH) |
COM | Common terminal for the load circuit |
NO | Normally Open terminal (connected to COM when the relay is activated) |
NC | Normally Closed terminal (connected to COM when the relay is not activated) |
Below is an example of how to control an SPDT relay module using an Arduino UNO:
// Define the relay control pin
const int relayPin = 7; // Connect the IN pin of the relay module to 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() {
// Turn the relay ON
digitalWrite(relayPin, HIGH); // Send a HIGH signal to activate the relay
delay(5000); // Keep the relay ON for 5 seconds
// Turn the relay OFF
digitalWrite(relayPin, LOW); // Send a LOW signal to deactivate the relay
delay(5000); // Keep the relay OFF for 5 seconds
}
Relay Not Activating:
Load Not Switching:
Relay Clicking but No Load Response:
Microcontroller Resetting When Relay Activates:
Can I use the SPDT relay module with a 3.3V microcontroller?
What is the purpose of the built-in LED?
Can I control multiple relays with one microcontroller?
Is the relay safe for high-power applications?