Stepper moving on its own?

Is this the project.
Do you also have the problem when step, direction and opto power is removed from the driver.

I don't see any opto power on that diagram,
but I suppose you have connected it to 3.3volt of the Due.
Leo..