Documentation

ShillehTek 1-Channel 24V Relay Module for Arduino Raspberry Pi | ShillehTek Product Manual
Documentation / ShillehTek 1-Channel 24V Relay Module for Arduino Raspberry Pi | ShillehTek Product Manual

ShillehTek 1-Channel 24V Relay Module for Arduino Raspberry Pi | ShillehTek Product Manual

ArduinoESP32manualPicoRaspberry PiRelay ModuleshillehtekSwitching

Overview

The ShillehTek 1-Channel 24V Relay Module lets an Arduino, Raspberry Pi, ESP32, or Raspberry Pi Pico switch a single high-voltage or high-current load with a low-voltage logic signal — while running the relay coil itself from a 24V supply. The 24V coil is a natural fit for industrial control panels, PLC-style automation, solar charge gear, and equipment that already has a 24V rail available.

The on-board SRD-24VDC-SL-C relay can switch up to 10A at 250VAC or 10A at 30VDC. It is opto-coupled and uses an active-LOW input — pull the IN pin LOW to energize the coil. A red LED indicates relay state and a green LED indicates power. Three screw terminals (NO, COM, NC) provide both Normally Open and Normally Closed switching options.

Because the coil needs 24V, this module requires an external 24V supply for VCC — your microcontroller's 5V rail cannot power it. The IN pin is still driven by 3.3V or 5V logic, just like the lower-voltage variants.

At a Glance

Coil Voltage
24V DC
Switching Capacity
10A 250VAC / 10A 30VDC
Trigger Logic
Active LOW
Channels
1
Control Pins
VCC, GND, IN
Output Terminals
NO, COM, NC

Specifications

Parameter Value
Coil / Module Voltage 24V DC
Trigger Current ~15-25 mA per channel (at 24V)
Trigger Logic Active LOW (LOW = relay ON)
Trigger Voltage Range 0V (ON) / 3.3V-5V (OFF)
Max Switching Voltage 250V AC / 30V DC
Max Switching Current 10 A
Relay Part SONGLE SRD-24VDC-SL-C
Output Configuration SPDT (NO / COM / NC)
Indicator LEDs Power (green), Relay state (red)
Mounting 2 screw holes
Dimensions (approx.) 50 x 26 x 18 mm

Pinout Diagram

1-Channel 24V Relay Module pinout diagram showing VCC, GND, IN control pins and Normally Open, Common Contact, Normally Closed screw terminals

Wiring Guide

Arduino Wiring

The 24V relay module needs an external 24V power supply for the coil — do not power VCC from the Arduino. Connect the supply's 24V to VCC, the supply's GND to the module's GND and to Arduino GND (shared ground is required), and drive IN from any digital pin.

Module Pin Connect To Details
VCC External 24V supply (+) NOT Arduino 5V or VIN
GND Supply (-) + Arduino GND Shared ground required
IN Arduino Digital Pin 7 Active LOW

Load wiring (typical, switch high-side of a load):

Screw Terminal Connect To
COM One leg of the load circuit
NO Other leg returning to source
NC Leave unused (or wire your "default ON" load)
Warning: Never apply 24V to the Arduino's 5V pin and never connect the relay's VCC to the Arduino's logic rail. The 24V supply only feeds the relay module — the Arduino runs from its own USB or barrel jack. Mains AC voltage is dangerous; if you are switching mains, enclose all wiring in a proper insulated box.
Tip: The relay is active LOW. digitalWrite(relayPin, LOW) energizes the relay; HIGH releases it. Initialize the pin HIGH in setup() so the relay does not click ON during boot.

ESP32 Wiring

The ESP32 uses 3.3V GPIO, which is enough to drive the IN pin's opto-isolator. The 24V coil supply must come from an external source. Tie all grounds together — ESP32 GND, 24V supply GND, and module GND.

Module Pin Connect To Details
VCC External 24V supply (+) NOT ESP32 VIN
GND Supply (-) + ESP32 GND Shared ground required
IN GPIO 23 3.3V drives opto reliably
Tip: Set the IN GPIO HIGH before configuring it as an output, so the relay stays OFF through reset.
Info: Avoid GPIO 0, 2, 12, 15 for the relay control line — those are strapping pins that can affect ESP32 boot mode if held the wrong way at reset.

Raspberry Pi Wiring

The Pi cannot supply 24V — use an external 24V power source for the coil. Drive IN from any 3.3V GPIO and tie the Pi's GND, the 24V supply's GND, and the module's GND together.

Module Pin Connect To Details
VCC External 24V supply (+) NOT Pi 5V
GND Supply (-) + Pi Pin 6 (GND) Shared ground required
IN Pin 16 (GPIO 23) 3.3V active LOW
Tip: Set the GPIO HIGH (idle) before configuring it as an output, otherwise the relay may briefly trigger when your Python script starts.
Warning: Always disconnect the 24V supply when wiring the screw terminals, and never let exposed 24V wires touch the Pi.

Raspberry Pi Pico Wiring

The Pico cannot source 24V — use an external 24V supply for the coil and drive IN from any GPIO. The Pico's 3.3V logic level is enough to switch the opto-isolator.

Module Pin Connect To Details
VCC External 24V supply (+) NOT Pico VBUS or 3V3
GND Supply (-) + Pico GND Shared ground required
IN GP15 Active LOW
Tip: Power the Pico from USB and the relay module from the 24V supply, with grounds tied. This isolates the noisy coil current from the Pico's 3.3V regulator.

Code Examples

Arduino

relay_24v_arduino.ino
// 1-Channel 24V Relay Module - Arduino Example
// IN pin: Digital 7 (active LOW - LOW closes the relay)
// VCC powered from external 24V supply, GND shared with Arduino

const int RELAY_PIN = 7;

void setup() {
  // Set HIGH first so the relay does not click ON at boot
  digitalWrite(RELAY_PIN, HIGH);
  pinMode(RELAY_PIN, OUTPUT);
  Serial.begin(9600);
  Serial.println("24V relay ready");
}

void loop() {
  Serial.println("Relay ON");
  digitalWrite(RELAY_PIN, LOW);   // active LOW
  delay(2000);

  Serial.println("Relay OFF");
  digitalWrite(RELAY_PIN, HIGH);
  delay(2000);
}

ESP32 (Arduino IDE)

relay_24v_esp32.ino
// 1-Channel 24V Relay Module - ESP32 Example
// IN pin: GPIO 23 (active LOW)
// VCC powered from external 24V supply, GND shared with ESP32

const int RELAY_PIN = 23;

void setup() {
  digitalWrite(RELAY_PIN, HIGH); // keep relay off through boot
  pinMode(RELAY_PIN, OUTPUT);
  Serial.begin(115200);
}

void loop() {
  Serial.println("ON");
  digitalWrite(RELAY_PIN, LOW);
  delay(2000);

  Serial.println("OFF");
  digitalWrite(RELAY_PIN, HIGH);
  delay(2000);
}

Raspberry Pi (Python)

relay_24v_rpi.py
#!/usr/bin/env python3
# 1-Channel 24V Relay Module - Raspberry Pi Example
# IN pin: GPIO 23 (active LOW)
# VCC powered from external 24V supply, GND shared with Pi

import RPi.GPIO as GPIO
import time

RELAY_PIN = 23

GPIO.setmode(GPIO.BCM)
GPIO.setup(RELAY_PIN, GPIO.OUT, initial=GPIO.HIGH)  # start OFF

try:
    while True:
        print("Relay ON")
        GPIO.output(RELAY_PIN, GPIO.LOW)   # active LOW
        time.sleep(2)

        print("Relay OFF")
        GPIO.output(RELAY_PIN, GPIO.HIGH)
        time.sleep(2)
except KeyboardInterrupt:
    print("Stopped by user")
finally:
    GPIO.output(RELAY_PIN, GPIO.HIGH)
    GPIO.cleanup()

Raspberry Pi Pico (MicroPython)

relay_24v_pico.py
# 1-Channel 24V Relay Module - Pico MicroPython Example
# IN pin: GP15 (active LOW)
# VCC powered from external 24V supply, GND shared with Pico

from machine import Pin
import time

relay = Pin(15, Pin.OUT, value=1)  # start HIGH (relay OFF)

while True:
    print("Relay ON")
    relay.value(0)   # active LOW
    time.sleep(2)

    print("Relay OFF")
    relay.value(1)
    time.sleep(2)

Frequently Asked Questions

Can I power the 24V module from my Arduino's 5V or VIN pin?
No. The coil needs 24V to engage reliably. You must supply VCC from an external 24V source (a 24V wall adapter, industrial DIN-rail PSU, or battery pack). Connect the supply's GND to the Arduino's GND so the IN signal has a common reference.
Why is my relay ON when I send HIGH and OFF when I send LOW?
This is normal — the module is active LOW. Pulling IN to LOW energizes the coil and closes the relay; HIGH releases it. Flip the logic in your code: use LOW to turn the load ON and HIGH to turn it OFF.
Can I drive the IN pin with a 3.3V Raspberry Pi, ESP32, or Pico?
Yes. The opto-coupler input triggers reliably from 3.3V logic — only the coil voltage needs to be 24V. Tie the 24V supply's ground to the controller's ground for a shared reference.
What's the difference between NO, COM, and NC?
COM is the common contact. NO (Normally Open) is disconnected from COM when idle and connects when the relay is energized. NC (Normally Closed) is connected to COM when idle and disconnects when energized. For most "switch ON when activated" projects, wire the load through COM and NO.
What loads can it switch?
Up to 10A at 250VAC or 10A at 30VDC — enough for an AC bulb, fan, water pump, industrial actuator, or solenoid. For inductive loads, add a flyback diode across the load to protect the contacts.
The relay clicks on briefly when my microcontroller resets — how do I stop that?
Set the IN pin HIGH before configuring it as an output. On Arduino, call digitalWrite(RELAY_PIN, HIGH) before pinMode(RELAY_PIN, OUTPUT). On Raspberry Pi, use GPIO.setup(RELAY_PIN, GPIO.OUT, initial=GPIO.HIGH). On Pico, pass value=1 to the Pin constructor.
Can I use a 12V supply on the 24V module?
No — the 24V coil will not engage at 12V. If you only have a 12V rail, use the 1-Channel 12V Relay Module variant instead. Mismatched coil voltage is the most common reason a relay "doesn't click."

Related Tutorials