Drives a motor with a power source fully independent from micro controller (through opto)

Drives a motor through a MOS FET with a power source fully independent from micro controller (through opto). Speed is controlled through PWM. Cables from the photo are connected as follows: yellow => Arduino analog out pin (for PWM), grey => Arduino ground, red => motor power source (e.g. 12V), blue => motor ground, green (2x) => DC motor. For parts list and wiring see Fritzing files.