

The 4-channel relay module (5V JD-VCC) is a versatile electronic component designed to control high-power devices using low-power control signals from a microcontroller, such as an Arduino or Raspberry Pi. This module features four independent relays, each capable of switching AC or DC loads. The JD-VCC pin allows for the isolation of the relay power supply from the control signal, improving safety and reducing electrical noise.








The module has two sets of pins: control pins and power pins. Additionally, each relay has three output terminals.
| Pin Name | Description |
|---|---|
| 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) |
| GND | Ground connection for the control circuit |
| VCC | 5V power supply for the control circuit |
| JD-VCC | 5V power supply for the relay coils (isolated from VCC for safety and stability) |
| Jumper Cap | Connects VCC and JD-VCC for shared power supply (remove for separate supplies) |
| Terminal | Description |
|---|---|
| NO (Normally Open) | Open circuit when the relay is inactive; closed when the relay is active |
| COM (Common) | Common terminal for the relay switch |
| NC (Normally Closed) | Closed circuit when the relay is inactive; open when the relay is active |
Powering the Module:
Connecting the Control Signals:
Connecting the Load:
Programming the Microcontroller:
// Example code to control a 4-channel relay module with Arduino UNO
// Ensure the relay module's GND is connected to the Arduino's GND
#define RELAY1 2 // Define pin 2 for Relay 1
#define RELAY2 3 // Define pin 3 for Relay 2
#define RELAY3 4 // Define pin 4 for Relay 3
#define RELAY4 5 // Define pin 5 for Relay 4
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: Turn relays ON and OFF sequentially
digitalWrite(RELAY1, LOW); // Turn Relay 1 ON
delay(1000); // Wait for 1 second
digitalWrite(RELAY1, HIGH); // Turn Relay 1 OFF
digitalWrite(RELAY2, LOW); // Turn Relay 2 ON
delay(1000); // Wait for 1 second
digitalWrite(RELAY2, HIGH); // Turn Relay 2 OFF
digitalWrite(RELAY3, LOW); // Turn Relay 3 ON
delay(1000); // Wait for 1 second
digitalWrite(RELAY3, HIGH); // Turn Relay 3 OFF
digitalWrite(RELAY4, LOW); // Turn Relay 4 ON
delay(1000); // Wait for 1 second
digitalWrite(RELAY4, HIGH); // Turn Relay 4 OFF
}
Relays Not Activating:
Electrical Noise or Interference:
Load Not Switching Properly:
Microcontroller Resetting When Relays Activate:
Can I use this module with a 3.3V microcontroller?
What happens if I remove the jumper cap?
Is the module safe for high-power AC loads?