https://electronicsbeliever.com/optocoupler-circuit-design-and-detailed-analysis/
Optocoupler Circuit Design and Detailed Analysis