The 4 Channel Relay Module is an electronic component designed to control multiple high-voltage devices using low-voltage signals. It features four independent relays, each capable of switching AC or DC loads. This module is widely used in home automation, industrial control systems, and IoT projects, where it enables safe and efficient control of high-power devices such as lights, fans, motors, and appliances.
The 4 Channel Relay Module has two main sections: the input pins for control signals and the output terminals for connecting the load.
Pin Name | Description |
---|---|
VCC | Power supply input (5V DC). |
GND | Ground connection. |
IN1 | Control signal for Relay 1 (active LOW). |
IN2 | Control signal for Relay 2 (active LOW). |
IN3 | Control signal for Relay 3 (active LOW). |
IN4 | Control signal for Relay 4 (active LOW). |
Terminal | Description |
---|---|
COM | Common terminal for the relay. |
NO | Normally Open terminal (connected to COM when the relay is activated). |
NC | Normally Closed terminal (connected to COM when the relay is deactivated). |
// Example code to control a 4 Channel Relay Module with an Arduino UNO
// Define the relay control pins
#define RELAY1 2 // Pin connected to IN1
#define RELAY2 3 // Pin connected to IN2
#define RELAY3 4 // Pin connected to IN3
#define RELAY4 5 // Pin connected to IN4
void setup() {
// Set relay pins as outputs
pinMode(RELAY1, OUTPUT);
pinMode(RELAY2, OUTPUT);
pinMode(RELAY3, OUTPUT);
pinMode(RELAY4, OUTPUT);
// Initialize all relays to OFF (HIGH state)
digitalWrite(RELAY1, HIGH);
digitalWrite(RELAY2, HIGH);
digitalWrite(RELAY3, HIGH);
digitalWrite(RELAY4, HIGH);
}
void loop() {
// Example sequence to toggle relays ON and OFF
digitalWrite(RELAY1, LOW); // Turn ON Relay 1
delay(1000); // Wait for 1 second
digitalWrite(RELAY1, HIGH); // Turn OFF Relay 1
delay(1000); // Wait for 1 second
digitalWrite(RELAY2, LOW); // Turn ON Relay 2
delay(1000); // Wait for 1 second
digitalWrite(RELAY2, HIGH); // Turn OFF Relay 2
delay(1000); // Wait for 1 second
digitalWrite(RELAY3, LOW); // Turn ON Relay 3
delay(1000); // Wait for 1 second
digitalWrite(RELAY3, HIGH); // Turn OFF Relay 3
delay(1000); // Wait for 1 second
digitalWrite(RELAY4, LOW); // Turn ON Relay 4
delay(1000); // Wait for 1 second
digitalWrite(RELAY4, HIGH); // Turn OFF Relay 4
delay(1000); // Wait for 1 second
}
Relays Not Activating:
Erratic Relay Behavior:
Load Not Switching:
Overheating:
Q: Can I use this module with a 3.3V microcontroller like the ESP8266?
A: Yes, the module is compatible with 3.3V control signals, but ensure the relays are powered with 5V.
Q: Is it safe to switch high-voltage AC loads with this module?
A: Yes, but ensure proper insulation and follow safety guidelines when working with high-voltage circuits.
Q: Can I control all four relays simultaneously?
A: Yes, you can activate all four relays at the same time, provided the power supply can handle the current draw.