I have only just started learning to use optocouplers to provide circuit isolation.
I would like to use an optocoupler to protect my microcontroller from the outside world, everything is run from the one power supply as per the attached circuit. I have both sides of the optocoupler attached to a common ground, this feels wrong, but don't know how it should be done.
How is this situation usually handled?