← All parts

5V Relay Module (1-Channel)

Generic

Single-channel relay board with an opto-isolated driver so a 5V logic pin can switch mains/high-current loads. Frequently active-LOW. Screw terminals expose COM/NO/NC.

In stock

Specifications

0

No specs listed.

Pinout

6
PinNameFunctionsNotes
VCCVCC
POWER
5V coil supply
GNDGND
GND
Ground
ININ
GPIO
Control (often active-LOW)
COMCOM
Switch common
NONO
Normally-open contact
NCNC
Normally-closed contact

Interactive pinout

Highlight:
BOARD

Click a pin to copy its name · tap a tag above to spotlight a bus.

Starter code

Community starter examples — minimal, unofficial, and provided to get you wiring fast. Verify against the manufacturer datasheet before relying on them.

Arduino (C++)

arduino
// 5 V relay module — community starter example
#if defined(ESP32)
  #define RELAY_PIN 23   // ESP32: GPIO23
#else
  #define RELAY_PIN 7    // Uno: D7
#endif

void setup() {
  pinMode(RELAY_PIN, OUTPUT);
  digitalWrite(RELAY_PIN, HIGH);   // many modules are active-LOW (HIGH = off)
}

void loop() {
  digitalWrite(RELAY_PIN, LOW);    // energize
  delay(1000);
  digitalWrite(RELAY_PIN, HIGH);   // release
  delay(1000);
}

MicroPython

python
# 5 V relay module (ESP32) — community starter example
from machine import Pin
import time

relay = Pin(23, Pin.OUT)   # GPIO23; many modules are active-LOW

while True:
    relay.value(0)   # energize
    time.sleep(1)
    relay.value(1)   # release
    time.sleep(1)

Wiring

PinArduino Uno R3ESP32 DevKitC (WROOM-32)Notes
VCC+5V5VCoil needs 5 V; power from VIN/5V, not 3.3 V
GNDGNDGND
IND7GPIO23Control signal; most boards trigger active-LOW
COM/NO/NC--Switched load side (mains/DC) - isolated from logic

Typical uses

  • Switching mains / high-power DC loads from a GPIO
  • Home-automation appliance control

Related parts

2