Relay module 8 channels (5 V, optocoupler) with ESP32

Supply 5 V Bus GPIO
GNDIN1IN2IN3IN4IN5IN6IN7IN8VCCJD-VCC

Pins and ESP32 wiring

PinRoleESP32 pinNotes
GNDGroundGND
IN1Input (the ESP32 drives it)D25LOW = relay on (typical). Each relay has COM/NO/NC screw terminals
IN2Input (the ESP32 drives it)D26
IN3Input (the ESP32 drives it)D27
IN4Input (the ESP32 drives it)D32
IN5Input (the ESP32 drives it)D33
IN6Input (the ESP32 drives it)D23
IN7Input (the ESP32 drives it)D19
IN8Input (the ESP32 drives it)D18
VCCPowerVINNeeds 5 V: use VIN. All 8 coils on: about 0.6 A, more than USB likes
JD-VCCNot wired to the ESP32—Separate coil supply. Keep the jumper to VCC unless you use an isolated supply

Suggested wiring for the 30-pin ESP32 DevKit, avoiding flash, input-only and strapping pins. BoardPilot checks it for you as you wire.

This module is sold for 5 V. Its outputs may be 5 V: use a level shifter or a voltage divider on ESP32 inputs.

Sources

Try it in 3D in BoardPilot

BoardPilot Part data (JSON)

Related parts

Part data: CC BY 4.0, free to reuse with credit to BoardPilot.