I'm currently trying to understand a circuit for an ESP8266 relay board. As you can see in the schematics below, an optocoupler is used to drive the relay mosfet. I do not understand, why they are using an optocoupler for the control signal.
As far as I know an optocoupler is used to galvanically isolate two circuits from each other, to make absolutely sure, that no voltage spikes, EM-noise, ... will be induced into the microcontroller.
But in that case it doesn't make sense, because the relay is using one common GND and 3.3V Vcc, so why isolating the control signal?
Do I miss something, why the optocoupler is still a good idea?
Thank you very much!