I want to control another circuit that is completely isolated from the ESP32. I decided to use an optoisolator. Both the ESP32 and the second control board are powered by 3.3V but they are independent power supplies.
From the datasheet, it has a forward current of 20mA and a max forward voltage of 1.7V. Hence I used a 100-ohm resistor on the ESP32.
For the second control board, I just pulled up the Vo using a 1-kilo ohm resistor.
Datasheet: 6N137
I want if the below circuit is correct and what else can be improved to make it an industry design?
simulate this circuit – Schematic created using CircuitLab
I want to isolate my output from the ESP32 to the second device.