yesterday when i ask about driving circuit, someone told me that it is a little use in optocoupler when i use the same ground everywhere. because so far (iam a green hand in electronic) i just connect the ground to the netral phase, i don't know how to create or connect the ground properly, so how to create a grounding, or how to connect it wisely? from this picture also it has some grounding but not connected one another
Here is one of the simplest opto-couplers that I can think of.
It would be simpler if the flashlight was replaced by the sun.
The receiver indicates the relative brightness of light hitting the sensor.
As light brightness changes, the amount of current flowing in the circuit changes.
Do you see any reason why the two circuits require a common ground to operate correctly?
Now add some dangerous voltage to the circuit, either by accident or by design.
Now add a common ground.