1-channel relay module (5 V coil)
Relay module pinout (DC+, DC−, IN, NO/COM/NC), active-LOW logic, 3.3 V trigger on ESP32 and Pico, and why motors and pumps need a contactor.
Community draft — report a mistake
3.3 V or 5 V? The coil runs on 5 V, but the IN pin only drives an optocoupler LED. Pick a module rated for a 3.3 V trigger when using ESP32 or Pico — some 5 V-only modules never fully release from a 3.3 V HIGH.
A relay module lets a 3.3 V or 5 V GPIO switch a separate circuit through an electrically isolated contact. The coil, flyback diode, transistor and (usually) an optocoupler are already on the board.
230 V mains can kill. The low-voltage side (DC+, DC−, IN) is safe to wire yourself. The screw terminals carry mains when you switch household loads — have a licensed electrician wire that side, fit an MCB and earth, and keep the module in a closed, non-metallic enclosure.
Contact ratings are for resistive loads. The “10 A 250 VAC” printed on the relay is for heaters and lamps. A pump or motor pulls several times its running current at start-up, which welds or burns these small contacts. For any motor or pump, let this relay switch only the coil of a contactor (rated AC-3 for motors) or your existing pump starter, and let the contactor switch the load.
Switch the live wire only — never neutral or earth.
Pinout
| Pin | What it does |
|---|---|
DC+ | 5 V for the relay coil and opto (about 70 mA when on) |
DC− | Ground |
IN | Control input. Usually active-LOW: LOW = relay on. |
COM | Common contact (screw terminal) |
NO | Normally open — connects to COM only when the relay is on |
NC | Normally closed — connected to COM when the relay is off |
Use it with
- 1-channel relay module (5 V coil) with Arduino Nano Arduino C++
- 1-channel relay module (5 V coil) with Arduino Nano ESP32 Arduino C++
- 1-channel relay module (5 V coil) with Arduino Uno R3 Arduino C++
- 1-channel relay module (5 V coil) with ESP32-C3 SuperMini Arduino C++
- 1-channel relay module (5 V coil) with ESP32-C6-DevKitC-1 Arduino C++
- 1-channel relay module (5 V coil) with ESP32 DevKit V1 Arduino C++
- 1-channel relay module (5 V coil) with ESP32 DevKitC (38-pin) Arduino C++
- 1-channel relay module (5 V coil) with ESP32-S3-DevKitC-1 Arduino C++
- 1-channel relay module (5 V coil) with LOLIN S2 Mini Arduino C++
- 1-channel relay module (5 V coil) with NodeMCU ESP8266 Arduino C++
- 1-channel relay module (5 V coil) with Raspberry Pi Pico W MicroPython
- 1-channel relay module (5 V coil) with Wemos D1 mini Arduino C++
- 1-channel relay module (5 V coil) with XIAO ESP32C3 Arduino C++
Common errors
Relay clicks on at boot
The GPIO floats before setup() runs and an active-LOW module reads that as "on". Set the pin HIGH as the first line of setup(), and add a 10 kΩ pull-up from IN to 3.3 V for a hard guarantee.
Relay won't turn off on ESP32
A 3.3 V HIGH may not be enough to switch a 5 V-only opto off. Use a 3.3 V-trigger module, or drive IN through a small NPN transistor.
Board resets when the relay switches
Coil switching and the load inject noise. Power the module from a separate 5 V supply with a shared GND, and keep load wiring away from logic wiring.