the issue I'm facing is that in some of the time the motor won't start after a time it was ON then OFF. if that happen I plunk it on some hard material and it back to work but I need it to work immediately when I send it the number '255' - it should work at max power.
Any idea why the motor have hard time to start working after going OFF ?
It looks like those two diodes are reducing the voltage driving the gate of the FET to only 3.6V. That is in the region where it just will not turn fully on.
The threshold voltage, a point below which the FET is guaranteed to be off, is 2.5V, so at a voltage of 3.6V the FET is just beginning to turn on.
Why did you put those two diodes in the Vcc line?
Also you are using an opto isolator but having a common ground between that and the external motor drive. Thus not isolating the driver side of the circuit like you think you are.
I put those two diode to reduce the voltage across the mini vibration motors as is rated to 3.3V~ .
If I will add a wire to bypass the two diode it will work better?
or - shall I use higher power supply such as 9V or it will be too much for those motors?
GND1 is connected to arduino ground while GND2 is connected to the PSU that provide power to the motor. That is means they are isolated aren't they?
With the schematic shown in post #5 with a PC817 the Vg will only be around 4V.
You need to remove R39 and make R40 around 5K. That should get you closer to 5V but depends on the following?
What is connected to GPIO1?
Are you trying to use PWM?