The 8-Channel 5V Relay Shield is an electronic device designed to interface with microcontrollers like the Arduino UNO, allowing for the control of up to eight separate high-power devices. This shield is ideal for applications in home automation, industrial controls, and other scenarios where electrical isolation between a low voltage control circuit and a high voltage or high current load is required.
Pin Number | Description | Type |
---|---|---|
IN1 | Control signal for Relay 1 | Digital |
IN2 | Control signal for Relay 2 | Digital |
IN3 | Control signal for Relay 3 | Digital |
IN4 | Control signal for Relay 4 | Digital |
IN5 | Control signal for Relay 5 | Digital |
IN6 | Control signal for Relay 6 | Digital |
IN7 | Control signal for Relay 7 | Digital |
IN8 | Control signal for Relay 8 | Digital |
GND | Ground | Power |
VCC | 5V Supply | Power |
JD-VCC | Relay Power Jumper | Power |
// Example code to control an 8-Channel 5V Relay Shield with an Arduino UNO
void setup() {
// Initialize all the relay control pins as OUTPUT
for (int i = 2; i <= 9; i++) {
pinMode(i, OUTPUT);
}
}
void loop() {
// Turn on each relay one after the other with a 1-second delay
for (int i = 2; i <= 9; i++) {
digitalWrite(i, HIGH); // Turn on relay
delay(1000); // Wait for 1 second
digitalWrite(i, LOW); // Turn off relay
delay(1000); // Wait for 1 second
}
}
Q: Can I control the relays with a 3.3V signal? A: The relays are designed for 5V TTL signals. A 3.3V signal may not reliably activate the relay.
Q: How many relays can I activate at once? A: You can activate all eight relays simultaneously, provided the power supply can handle the current draw.
Q: Can I use this shield with other microcontrollers besides Arduino? A: Yes, any microcontroller with compatible 5V digital outputs can control this relay shield.