https://electronicsbeliever.com/optocoupler-operation-as-switch-tutorials/
Optocoupler Operation as Switch Tutorials with Design Sample