Documentation

ShillehTek 8-Channel 5V Relay Module for Raspberry Pi Arduino | ShillehTek Product Manual
Documentation / ShillehTek 8-Channel 5V Relay Module for Raspberry Pi Arduino | ShillehTek Product Manual

ShillehTek 8-Channel 5V Relay Module for Raspberry Pi Arduino | ShillehTek Product Manual

ArduinoESP32manualPicoRaspberry PiRelay Moduleshillehtek

Overview

The ShillehTek 8-Channel 5V Relay Module lets your microcontroller switch up to eight independent loads — lights, fans, pumps, solenoids, AC appliances, motors, or DC devices — from a few GPIO pins. Each channel uses an SRD-05VDC-SL-C electromechanical relay rated up to 10A at 250VAC or 30VDC, with COM, NO (normally open), and NC (normally closed) screw terminals so you can wire either fail-safe or fail-on circuits.

Each relay coil runs on 5V, so the whole board can be powered directly from the same 5V rail that drives a typical Arduino, ESP32 dev board, or Raspberry Pi 5V pin (with current headroom). An on-board optoisolator separates the MCU side from the relay coil side, protecting your Arduino, ESP32, Raspberry Pi, or Pico from coil back-EMF and ground noise. Inputs are active LOW by default — driving an IN pin LOW energizes the corresponding relay coil and switches the COM contact from NC to NO.

The board exposes a header for GND, IN1-IN8, and VCC, plus a JD-VCC / VCC jumper that lets you split the logic power from the relay coil power for full electrical isolation when needed.

At a Glance

Channels
8
Coil Voltage
5V DC
Trigger Type
Active LOW
Contact Rating
10A @ 250VAC / 30VDC
Isolation
Optocoupler input
Logic Inputs
GND, IN1, IN2, IN3, IN4, IN5, IN6, IN7, IN8, VCC

Specifications

Parameter Value
Number of Channels 8
Relay Part Number SRD-05VDC-SL-C
Relay Coil Voltage 5V DC
Coil Current (per relay, energized) ~70 mA
Coil Current (all relays on) ~560 mA
Trigger Logic Active LOW (LOW = relay ON)
Trigger Voltage 3.3V or 5V logic-compatible
Maximum AC Switching 10A @ 250VAC
Maximum DC Switching 10A @ 30VDC
Isolation Optocoupler on each input
Status Indicator Per-channel LED + power LED
Output Terminals Per channel: COM, NO, NC (screw terminals)

Pinout Diagram

ShillehTek 8-channel 5V relay module pinout diagram showing GND, IN1, IN2, IN3, IN4, IN5, IN6, IN7, IN8, VCC input header and per-relay COM, NO (normally open), and NC (normally closed) output terminals

Wiring Guide

Arduino Wiring

Wire VCC and GND to power the board, then drive each IN pin from any digital output. Inputs are active LOW — write LOW to energize the relay, HIGH to release it.

Module Pin Arduino Pin Details
VCC 5V Powers logic and relay coils together
GND GND Common ground with Arduino
IN1 Digital Pin 7 Active LOW
IN2 Digital Pin 8 Active LOW
IN3 Digital Pin 9 Active LOW
IN4 Digital Pin 10 Active LOW
IN5 Digital Pin 11 Active LOW
IN6 Digital Pin 12 Active LOW
IN7 Digital Pin 13 Active LOW
IN8 Digital Pin 14 Active LOW
Warning: The 5V coil draws current any time a relay is energized (roughly 70 mA each). With all 8 relays on at once you can pull around 560 mA, which can brown out a USB-powered MCU. For reliable operation, power VCC from a dedicated 5V/2A supply and tie its ground to the MCU ground.
Tip: Each relay has three output screw terminals — COM (common), NO (normally open), and NC (normally closed). For a switched-on-when-energized circuit (like turning a lamp on), wire your load between COM and NO. For a fail-safe normally-closed circuit, wire between COM and NC instead.

ESP32 Wiring

The ESP32's 3.3V GPIO is enough to drive the optoisolated inputs reliably. Active-LOW means a 3.3V HIGH releases the relay and a 0V LOW energizes it.

Module Pin ESP32 Pin Details
VCC VIN / 5V Use external 5V if many relays will be on at once
GND GND Common ground with ESP32
IN1 GPIO 5 Active LOW (3.3V OK)
IN2 GPIO 18 Active LOW (3.3V OK)
IN3 GPIO 19 Active LOW (3.3V OK)
IN4 GPIO 21 Active LOW (3.3V OK)
IN5 GPIO 22 Active LOW (3.3V OK)
IN6 GPIO 23 Active LOW (3.3V OK)
IN7 GPIO 25 Active LOW (3.3V OK)
IN8 GPIO 26 Active LOW (3.3V OK)
Warning: The 5V coil draws current any time a relay is energized (roughly 70 mA each). With all 8 relays on at once you can pull around 560 mA, which can brown out a USB-powered MCU. For reliable operation, power VCC from a dedicated 5V/2A supply and tie its ground to the MCU ground.
Tip: Avoid using ESP32 strapping pins (GPIO 0, 2, 12, 15) for relay control — the boot-time state of these pins can briefly energize a relay before your code runs. The pin numbers in the table above are safe choices.

Raspberry Pi Wiring

Raspberry Pi 3.3V GPIO drives the optoisolator inputs without any level shifter. Use BCM pin numbers in your Python code to match the GPIO numbers below.

Module Pin Raspberry Pi Pin Details
VCC Pin 2 (5V) or external 5V External 5V recommended to avoid Pi brownout
GND Pin 6 (GND) Common ground with Pi
IN1 GPIO 17 Active LOW (3.3V OK)
IN2 GPIO 27 Active LOW (3.3V OK)
IN3 GPIO 22 Active LOW (3.3V OK)
IN4 GPIO 23 Active LOW (3.3V OK)
IN5 GPIO 24 Active LOW (3.3V OK)
IN6 GPIO 25 Active LOW (3.3V OK)
IN7 GPIO 5 Active LOW (3.3V OK)
IN8 GPIO 6 Active LOW (3.3V OK)
Warning: The 5V coil draws current any time a relay is energized (roughly 70 mA each). With all 8 relays on at once you can pull around 560 mA, which can brown out a USB-powered MCU. For reliable operation, power VCC from a dedicated 5V/2A supply and tie its ground to the MCU ground.
Tip: Set the GPIO output HIGH at boot (before flipping it LOW for ON) so the relay does not click on momentarily during pin initialization. The default state of Raspberry Pi GPIO is input mode, which floats — initialize as output HIGH right away.

Raspberry Pi Pico Wiring

Pico GPIO is 3.3V and works fine with the optoisolated inputs. Active-LOW logic — set the GP pin to 0 to energize a relay.

Module Pin Pico Pin Details
VCC VBUS (5V) or external 5V External 5V recommended for multiple relays
GND GND Common ground with Pico
IN1 GP2 Active LOW (3.3V OK)
IN2 GP3 Active LOW (3.3V OK)
IN3 GP4 Active LOW (3.3V OK)
IN4 GP5 Active LOW (3.3V OK)
IN5 GP6 Active LOW (3.3V OK)
IN6 GP7 Active LOW (3.3V OK)
IN7 GP8 Active LOW (3.3V OK)
IN8 GP9 Active LOW (3.3V OK)
Warning: The 5V coil draws current any time a relay is energized (roughly 70 mA each). With all 8 relays on at once you can pull around 560 mA, which can brown out a USB-powered MCU. For reliable operation, power VCC from a dedicated 5V/2A supply and tie its ground to the MCU ground.
Tip: Initialize Pico GPIO with Pin(n, Pin.OUT, value=1) so the line starts HIGH (relay OFF). Otherwise the pin will momentarily glitch LOW during boot and click the relay on.

Code Examples

Arduino

relay_8ch_arduino.ino
// 8-Channel 5V Relay Module - Arduino Example
// Active LOW: digitalWrite(pin, LOW) energizes the relay.
// IN pins: 7, 8, 9, 10, 11, 12, 13, 14

void setup() {
  Serial.begin(9600);
  pinMode(7, OUTPUT);
  digitalWrite(7, HIGH);  // start with relay OFF
  pinMode(8, OUTPUT);
  digitalWrite(8, HIGH);  // start with relay OFF
  pinMode(9, OUTPUT);
  digitalWrite(9, HIGH);  // start with relay OFF
  pinMode(10, OUTPUT);
  digitalWrite(10, HIGH);  // start with relay OFF
  pinMode(11, OUTPUT);
  digitalWrite(11, HIGH);  // start with relay OFF
  pinMode(12, OUTPUT);
  digitalWrite(12, HIGH);  // start with relay OFF
  pinMode(13, OUTPUT);
  digitalWrite(13, HIGH);  // start with relay OFF
  pinMode(14, OUTPUT);
  digitalWrite(14, HIGH);  // start with relay OFF
}

void loop() {
  // Cycle through each relay one by one
  digitalWrite(7, LOW);   // Relay 1 ON
  delay(500);
  digitalWrite(7, HIGH);  // Relay 1 OFF
  delay(500);
  digitalWrite(8, LOW);   // Relay 2 ON
  delay(500);
  digitalWrite(8, HIGH);  // Relay 2 OFF
  delay(500);
  digitalWrite(9, LOW);   // Relay 3 ON
  delay(500);
  digitalWrite(9, HIGH);  // Relay 3 OFF
  delay(500);
  digitalWrite(10, LOW);   // Relay 4 ON
  delay(500);
  digitalWrite(10, HIGH);  // Relay 4 OFF
  delay(500);
  digitalWrite(11, LOW);   // Relay 5 ON
  delay(500);
  digitalWrite(11, HIGH);  // Relay 5 OFF
  delay(500);
  digitalWrite(12, LOW);   // Relay 6 ON
  delay(500);
  digitalWrite(12, HIGH);  // Relay 6 OFF
  delay(500);
  digitalWrite(13, LOW);   // Relay 7 ON
  delay(500);
  digitalWrite(13, HIGH);  // Relay 7 OFF
  delay(500);
  digitalWrite(14, LOW);   // Relay 8 ON
  delay(500);
  digitalWrite(14, HIGH);  // Relay 8 OFF
  delay(500);
}

ESP32 (Arduino Core)

relay_8ch_esp32.ino
// 8-Channel 5V Relay Module - ESP32 Arduino Example
// IN pins: GPIO 5, 18, 19, 21, 22, 23, 25, 26
// Active LOW logic.

void setup() {
  Serial.begin(115200);
  pinMode(5, OUTPUT);
  digitalWrite(5, HIGH);  // start OFF
  pinMode(18, OUTPUT);
  digitalWrite(18, HIGH);  // start OFF
  pinMode(19, OUTPUT);
  digitalWrite(19, HIGH);  // start OFF
  pinMode(21, OUTPUT);
  digitalWrite(21, HIGH);  // start OFF
  pinMode(22, OUTPUT);
  digitalWrite(22, HIGH);  // start OFF
  pinMode(23, OUTPUT);
  digitalWrite(23, HIGH);  // start OFF
  pinMode(25, OUTPUT);
  digitalWrite(25, HIGH);  // start OFF
  pinMode(26, OUTPUT);
  digitalWrite(26, HIGH);  // start OFF
}

void loop() {
  digitalWrite(5, LOW);   // Relay 1 ON
  delay(500);
  digitalWrite(5, HIGH);  // Relay 1 OFF
  delay(500);
  digitalWrite(18, LOW);   // Relay 2 ON
  delay(500);
  digitalWrite(18, HIGH);  // Relay 2 OFF
  delay(500);
  digitalWrite(19, LOW);   // Relay 3 ON
  delay(500);
  digitalWrite(19, HIGH);  // Relay 3 OFF
  delay(500);
  digitalWrite(21, LOW);   // Relay 4 ON
  delay(500);
  digitalWrite(21, HIGH);  // Relay 4 OFF
  delay(500);
  digitalWrite(22, LOW);   // Relay 5 ON
  delay(500);
  digitalWrite(22, HIGH);  // Relay 5 OFF
  delay(500);
  digitalWrite(23, LOW);   // Relay 6 ON
  delay(500);
  digitalWrite(23, HIGH);  // Relay 6 OFF
  delay(500);
  digitalWrite(25, LOW);   // Relay 7 ON
  delay(500);
  digitalWrite(25, HIGH);  // Relay 7 OFF
  delay(500);
  digitalWrite(26, LOW);   // Relay 8 ON
  delay(500);
  digitalWrite(26, HIGH);  // Relay 8 OFF
  delay(500);
}

Raspberry Pi (Python)

relay_8ch_rpi.py
#!/usr/bin/env python3
# 8-Channel 5V Relay Module - Raspberry Pi Example
# IN pins: GPIO 17, 27, 22, 23, 24, 25, 5, 6 (BCM)
# Active LOW logic.

import RPi.GPIO as GPIO
import time

PINS = [17, 27, 22, 23, 24, 25, 5, 6]

GPIO.setmode(GPIO.BCM)
for p in PINS:
    GPIO.setup(p, GPIO.OUT, initial=GPIO.HIGH)  # start OFF

try:
    while True:
        GPIO.output(17, GPIO.LOW)   # Relay 1 ON
        time.sleep(0.5)
        GPIO.output(17, GPIO.HIGH)  # Relay 1 OFF
        time.sleep(0.5)
        GPIO.output(27, GPIO.LOW)   # Relay 2 ON
        time.sleep(0.5)
        GPIO.output(27, GPIO.HIGH)  # Relay 2 OFF
        time.sleep(0.5)
        GPIO.output(22, GPIO.LOW)   # Relay 3 ON
        time.sleep(0.5)
        GPIO.output(22, GPIO.HIGH)  # Relay 3 OFF
        time.sleep(0.5)
        GPIO.output(23, GPIO.LOW)   # Relay 4 ON
        time.sleep(0.5)
        GPIO.output(23, GPIO.HIGH)  # Relay 4 OFF
        time.sleep(0.5)
        GPIO.output(24, GPIO.LOW)   # Relay 5 ON
        time.sleep(0.5)
        GPIO.output(24, GPIO.HIGH)  # Relay 5 OFF
        time.sleep(0.5)
        GPIO.output(25, GPIO.LOW)   # Relay 6 ON
        time.sleep(0.5)
        GPIO.output(25, GPIO.HIGH)  # Relay 6 OFF
        time.sleep(0.5)
        GPIO.output(5, GPIO.LOW)   # Relay 7 ON
        time.sleep(0.5)
        GPIO.output(5, GPIO.HIGH)  # Relay 7 OFF
        time.sleep(0.5)
        GPIO.output(6, GPIO.LOW)   # Relay 8 ON
        time.sleep(0.5)
        GPIO.output(6, GPIO.HIGH)  # Relay 8 OFF
        time.sleep(0.5)
except KeyboardInterrupt:
    print("Stopped by user")
finally:
    for p in PINS:
        GPIO.output(p, GPIO.HIGH)  # ensure OFF
    GPIO.cleanup()

Raspberry Pi Pico (MicroPython)

relay_8ch_pico.py
# 8-Channel 5V Relay Module - Pico MicroPython Example
# IN pins: GP2, GP3, GP4, GP5, GP6, GP7, GP8, GP9
# Active LOW logic.

from machine import Pin
from time import sleep

relay1 = Pin(2, Pin.OUT, value=1)  # start OFF (HIGH)
relay2 = Pin(3, Pin.OUT, value=1)  # start OFF (HIGH)
relay3 = Pin(4, Pin.OUT, value=1)  # start OFF (HIGH)
relay4 = Pin(5, Pin.OUT, value=1)  # start OFF (HIGH)
relay5 = Pin(6, Pin.OUT, value=1)  # start OFF (HIGH)
relay6 = Pin(7, Pin.OUT, value=1)  # start OFF (HIGH)
relay7 = Pin(8, Pin.OUT, value=1)  # start OFF (HIGH)
relay8 = Pin(9, Pin.OUT, value=1)  # start OFF (HIGH)

try:
    while True:
        relay1.value(0)  # Relay 1 ON
        sleep(0.5)
        relay1.value(1)  # Relay 1 OFF
        sleep(0.5)
        relay2.value(0)  # Relay 2 ON
        sleep(0.5)
        relay2.value(1)  # Relay 2 OFF
        sleep(0.5)
        relay3.value(0)  # Relay 3 ON
        sleep(0.5)
        relay3.value(1)  # Relay 3 OFF
        sleep(0.5)
        relay4.value(0)  # Relay 4 ON
        sleep(0.5)
        relay4.value(1)  # Relay 4 OFF
        sleep(0.5)
        relay5.value(0)  # Relay 5 ON
        sleep(0.5)
        relay5.value(1)  # Relay 5 OFF
        sleep(0.5)
        relay6.value(0)  # Relay 6 ON
        sleep(0.5)
        relay6.value(1)  # Relay 6 OFF
        sleep(0.5)
        relay7.value(0)  # Relay 7 ON
        sleep(0.5)
        relay7.value(1)  # Relay 7 OFF
        sleep(0.5)
        relay8.value(0)  # Relay 8 ON
        sleep(0.5)
        relay8.value(1)  # Relay 8 OFF
        sleep(0.5)
except KeyboardInterrupt:
    print("Stopped by user")

Frequently Asked Questions

What does "active LOW" mean for the inputs?
The relay turns ON when the IN pin is pulled LOW (close to 0V) and OFF when the IN pin is HIGH (3.3V or 5V). This is the most common convention for optoisolated relay boards. Initialize your GPIO output HIGH so the relay starts in the OFF state and does not click on during boot.
Can I power the board from my Arduino or Pico's 5V pin?
For one or two relays at a time, yes. For all channels on simultaneously, the current draw can exceed what an MCU's regulator can supply, causing brownouts. For reliable operation in any configuration, use an external 5V/2A supply for VCC and share its ground with the MCU.
What is the difference between NO and NC?
NO (Normally Open) and NC (Normally Closed) describe the contact state when the relay coil is NOT energized. With the coil OFF: COM is connected to NC. With the coil ON (IN pulled LOW): COM switches over and connects to NO. Pick NO for "switch the load ON when the MCU activates the relay" and NC for "fail-safe ON when power is lost".
What is the JD-VCC / VCC jumper for?
The jumper ties the relay coil power (JD-VCC) to the optoisolator input power (VCC). Removing the jumper lets you supply the two rails separately — for example, drive the input side from your MCU's 5V and the relay coils from a fully isolated 5V supply. For most projects you can leave the jumper in place.
What loads can I switch?
Each relay is rated for up to 10A at 250VAC or 10A at 30VDC — plenty for lamps, fans, pumps, solenoid valves, small motors, and most household AC appliances. For inductive AC loads, add a snubber across the relay contacts to extend contact life. For DC inductive loads (motors, solenoids), add a flyback diode across the load.
My relay clicks on at boot. How do I prevent that?
Active-LOW relays click on when the IN pin floats or is LOW at startup. Initialize your GPIO as an output HIGH the very first thing in your code (Arduino: digitalWrite(pin, HIGH); pinMode(pin, OUTPUT);). On Pico use Pin(n, Pin.OUT, value=1) in one shot. On the Pi, set GPIO.setup(pin, GPIO.OUT, initial=GPIO.HIGH).
Can I switch mains AC voltage safely?
The relay contacts are rated for 250VAC, but mains wiring requires care. Keep AC wiring fully separated from the low-voltage logic side, use proper insulation, fuses, and strain reliefs, and enclose everything in a non-conductive box. If you are not comfortable with mains wiring, use a 12V or 24V load instead.