Cant get motor to turn

Ive got a nema23 4nm motor with these specs

Hooked up to an ST-M5045 microstep driver witha bipolar paralell wiring. (also tried a series wiring with the same results.
With
red blue to A+
black yellow A-
White Brown B+
Green orange B-

Its powered by a 36v 5A power supply.

and the settings on the driver is 2000 pulse/rev with 4a (tried both full and halfcurrent)

The driver it hooked up to the arduino in the folowing manner
PUL+ and Dir+ to the 5v pin on the arduino
Pul- to pin 9
Dir- to pin 8

The code im trying to get to work at this moment is

#include <AccelStepper.h>

// Define a stepper and the pins it will use
AccelStepper stepper(1,8,9);

void setup()
{
stepper.setMaxSpeed(150);
stepper.setAcceleration(100);
}

void loop(){
stepper.moveTo(500);
while (stepper.currentPosition() != 300) // Full speed up to 300
stepper.run();
stepper.stop(); // Stop as fast as possible: sets new target
stepper.runToPosition();
// Now stopped after quickstop

// Now go backwards
stepper.moveTo(-500);
while (stepper.currentPosition() != 0) // Full speed basck to 0
stepper.run();
stepper.stop(); // Stop as fast as possible: sets new target
stepper.runToPosition();
// Now stopped after quickstop
}

However the only thing i get is a small noise from the motor like its instantly starting and then stopping again (like a shudder). I can also hear some high pitch noises comming from the motor sound abit like coilwhine. I have also tried to get it to move at a constant speed with the same result.

Am i doing something completely wrong here? I have gotten the motor to move previously with a arduino motor shield however it was a bit to weak to handle the motor so i switched drivers.

PUL+ and Dir+ to the 5v pin on the arduino
Pul- to pin 9
Dir- to pin 8

Is this the recommended connection?

I think most drivers step on the rising edge of PUL, which would be the falling edge of the Arduino pin 9 output, in your wiring scheme.

Why have you started a new Thread when you were already getting advice in your other Thread.

Have you studied the link to stepper motor basics that I gave 8 days ago?

...R

Please post to the other thread.
Thread locked