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

Supply 5 V Bus GPIO
GNDIN1IN2VCCJD-VCCCOM1NO1NC1COM2NO2NC2

Pins and ESP32 wiring

PinRoleESP32 pinNotes
GNDGroundGND
IN1Input (the ESP32 drives it)D25LOW = relay on (typical)
IN2Input (the ESP32 drives it)D26LOW = relay on (typical)
VCCPowerVINNeeds 5 V: use VIN
JD-VCCNot wired to the ESP32—Separate coil supply. Keep the jumper to VCC unless you use an isolated supply
COM1Not wired to the ESP32—
NO1Not wired to the ESP32—
NC1Not wired to the ESP32—
COM2Not wired to the ESP32—
NO2Not wired to the ESP32—
NC2Not wired to the ESP32—

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.