← 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
0No specs listed.
Pinout
6| Pin | Name | Functions | Notes |
|---|---|---|---|
| VCC | VCC | POWER | 5V coil supply |
| GND | GND | GND | Ground |
| IN | IN | GPIO | Control (often active-LOW) |
| COM | COM | — | Switch common |
| NO | NO | — | Normally-open contact |
| NC | NC | — | 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
| Pin | Arduino Uno R3 | ESP32 DevKitC (WROOM-32) | Notes |
|---|---|---|---|
| VCC | +5V | 5V | Coil needs 5 V; power from VIN/5V, not 3.3 V |
| GND | GND | GND | |
| IN | D7 | GPIO23 | Control 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