Preview build — page text is a draft awaiting human review. Code badges come from real compiles. The flasher is real but not yet hardware-tested; the Playground is still a preview.

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

CategoryActuator
InterfaceGPIO
Voltage5 V coil
Typical price₹70

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

PinWhat it does
DC+5 V for the relay coil and opto (about 70 mA when on)
DC−Ground
INControl input. Usually active-LOW: LOW = relay on.
COMCommon contact (screw terminal)
NONormally open — connects to COM only when the relay is on
NCNormally closed — connected to COM when the relay is off

Use it with

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.

↑↓ to move · Enter to open