PC817 optocoupler module 2 channels with ESP32
Supply 3.3-5 V
Bus GPIO
Pins and ESP32 wiring
| Pin | Role | ESP32 pin | Notes |
|---|---|---|---|
| IN1 | Input (the ESP32 drives it) | D25 | Pin order varies between boards: match by the printed label. Channel 1 input (LED side, series resistor on board) |
| IN2 | Input (the ESP32 drives it) | D26 | Channel 2 input |
| G | Ground | GND | Input side ground |
| V1 | Not wired to the ESP32 | — | Channel 1 output, isolated side |
| G1 | Not wired to the ESP32 | — | Channel 1 output ground, isolated side |
| V2 | Not wired to the ESP32 | — | Channel 2 output, isolated side |
| G2 | Not 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
- Sharp PC817 datasheet, Forward voltage about 1.2 V; current transfer ratio 50 to 600 %
Try it in 3D in BoardPilot
Related parts
18650 Li-ion cell in holder28BYJ-48 stepper + ULN2003 driver433 MHz transmitter (FS1000A)74HC595 shift registerA4988 stepper driverActive buzzer
Part data: CC BY 4.0, free to reuse with credit to BoardPilot.