What is a photocoupler?
It is a device used to electrically insulate an input signal from an output signal.
While semiconductor devices generally have only one GND terminal, a photocoupler has one each on the input and output sides, which are electrically insulated inside. To provide electrical insulation, a photocoupler once converts an input electric signal an optical signal and then converts it back into an electric signal.
A photocoupler consists of an LED optically coupled to a photodetector to transmit a signal by means of light.