Documentation

ShillehTek 4-Channel 12V Relay Module Board for Arduino & Raspberry Pi | ShillehTek Product Manual
Documentation / ShillehTek 4-Channel 12V Relay Module Board for Arduino & Raspberry Pi | ShillehTek Product Manual

ShillehTek 4-Channel 12V Relay Module Board for Arduino & Raspberry Pi | ShillehTek Product Manual

ArduinoESP32manualPicoRaspberry PiRelay Moduleshillehtek

Overview

The ShillehTek 4-Channel 12V Relay Module lets your microcontroller switch up to four independent loads — lights, fans, pumps, solenoids, AC appliances, motors, or DC devices — from a few GPIO pins. Each channel uses an SRD-12VDC-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.

The relay coils run on 12V, so the board needs a separate 12V DC supply for the relay side. The optoisolated input side accepts a 3.3V or 5V logic-level trigger from any microcontroller. 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-IN4, 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
4
Coil Voltage
12V DC
Trigger Type
Active LOW
Contact Rating
10A @ 250VAC / 30VDC
Isolation
Optocoupler input
Logic Inputs
GND, IN1, IN2, IN3, IN4, VCC

Specifications

Parameter Value
Number of Channels 4
Relay Part Number SRD-12VDC-SL-C
Relay Coil Voltage 12V DC
Coil Current (per relay, energized) ~30 mA
Coil Current (all relays on) ~120 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 4-channel 12V relay module pinout diagram showing GND, IN1, IN2, IN3, IN4, 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.

Because this is a 12V relay module, you cannot power the board from the MCU. Use a separate 12V DC supply (a wall adapter or bench supply rated for at least 140 mA continuous) and share grounds with the MCU.

Module Pin Arduino Pin Details
VCC External 12V supply (+) Do NOT connect Arduino 5V to VCC
GND GND Common ground with Arduino and 12V supply
IN1 Digital Pin 7 Active LOW
IN2 Digital Pin 8 Active LOW
IN3 Digital Pin 9 Active LOW
IN4 Digital Pin 10 Active LOW
Warning: The relay coils require 12V DC. The VCC pin must be connected to a 12V supply, NOT to your microcontroller's 5V or 3.3V rail. Tie the 12V supply ground to the MCU ground so the IN signals share a common reference. The optoisolator handles the rest of the isolation between the 12V coil side and your 3.3V / 5V logic side.
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.

Because this is a 12V relay module, you cannot power the board from the MCU. Use a separate 12V DC supply (a wall adapter or bench supply rated for at least 140 mA continuous) and share grounds with the MCU.

Module Pin ESP32 Pin Details
VCC External 12V supply (+) Do NOT connect ESP32 VIN to VCC
GND GND Common ground with ESP32 and 12V supply
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)
Warning: The relay coils require 12V DC. The VCC pin must be connected to a 12V supply, NOT to your microcontroller's 5V or 3.3V rail. Tie the 12V supply ground to the MCU ground so the IN signals share a common reference. The optoisolator handles the rest of the isolation between the 12V coil side and your 3.3V / 5V logic side.
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.

Because this is a 12V relay module, you cannot power the board from the MCU. Use a separate 12V DC supply (a wall adapter or bench supply rated for at least 140 mA continuous) and share grounds with the MCU.

Module Pin Raspberry Pi Pin Details
VCC External 12V supply (+) Do NOT connect Pi 5V to VCC
GND Pin 6 (GND) Common ground with Pi and 12V supply
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)
Warning: The relay coils require 12V DC. The VCC pin must be connected to a 12V supply, NOT to your microcontroller's 5V or 3.3V rail. Tie the 12V supply ground to the MCU ground so the IN signals share a common reference. The optoisolator handles the rest of the isolation between the 12V coil side and your 3.3V / 5V logic side.
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.

Because this is a 12V relay module, you cannot power the board from the MCU. Use a separate 12V DC supply (a wall adapter or bench supply rated for at least 140 mA continuous) and share grounds with the MCU.

Module Pin Pico Pin Details
VCC External 12V supply (+) Do NOT connect Pico VBUS to VCC
GND GND Common ground with Pico and 12V supply
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)
Warning: The relay coils require 12V DC. The VCC pin must be connected to a 12V supply, NOT to your microcontroller's 5V or 3.3V rail. Tie the 12V supply ground to the MCU ground so the IN signals share a common reference. The optoisolator handles the rest of the isolation between the 12V coil side and your 3.3V / 5V logic side.
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_4ch_arduino.ino
// 4-Channel 12V Relay Module - Arduino Example
// Active LOW: digitalWrite(pin, LOW) energizes the relay.
// IN pins: 7, 8, 9, 10

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
}

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);
}

ESP32 (Arduino Core)

relay_4ch_esp32.ino
// 4-Channel 12V Relay Module - ESP32 Arduino Example
// IN pins: GPIO 5, 18, 19, 21
// 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
}

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);
}

Raspberry Pi (Python)

relay_4ch_rpi.py
#!/usr/bin/env python3
# 4-Channel 12V Relay Module - Raspberry Pi Example
# IN pins: GPIO 17, 27, 22, 23 (BCM)
# Active LOW logic.

import RPi.GPIO as GPIO
import time

PINS = [17, 27, 22, 23]

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)
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_4ch_pico.py
# 4-Channel 12V Relay Module - Pico MicroPython Example
# IN pins: GP2, GP3, GP4, GP5
# 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)

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)
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?
No — the relay coils need 12V DC. Connect VCC and GND to a separate 12V supply, then tie that supply's ground to your MCU ground so the IN signals have a common reference. The optoisolator on each input keeps the 12V coil side and the 3.3V / 5V logic side electrically isolated.
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 12V 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.