I've seen some schematics that use optoisolators. But these isolators gnd pin is connected to common ground via a 0 ohm resistor.
Does someone know what is the purpouse of that resistor?
Well a 0 Ohm resistor is just a piece of wire disguised as a resistor.... it's probably just to make it easy to produce different PCBs with non-0 resistors for different purposes.
But you should post a pic of one of those schematics.
the reason for the opto is isolation. to connect the grounds, you just eliminated isolation.
however, you did create a signal that has a maximum current draw to you did protect the pin.
the opto is a tool, just use it as you like.
In the attached schematic there is a dual channel isolator.
You can see they put a 0R between Vcc and Gnd to "isolate", which makes no sense if the 0R is just a wire.
The purpouse of this dual channel is a mistery to me, maybe it's just isolating noise but not big failure current.
Its an optional component - use or not depending on how the thing is powered.
