PC817 optocoupler module 2 channels with ESP32

Supply 3.3-5 V Bus GPIO
IN1IN2GV1G1V2G2

Pins and ESP32 wiring

PinRoleESP32 pinNotes
IN1Input (the ESP32 drives it)D25Pin order varies between boards: match by the printed label. Channel 1 input (LED side, series resistor on board)
IN2Input (the ESP32 drives it)D26Channel 2 input
GGroundGNDInput side ground
V1Not wired to the ESP32—Channel 1 output, isolated side
G1Not wired to the ESP32—Channel 1 output ground, isolated side
V2Not wired to the ESP32—Channel 2 output, isolated side
G2Not wired to the ESP32—Channel 2 output ground, isolated side

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

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.