Stepper Motor Vibrating and not turning with easy driver

I am using a nema 17 0Ncm 12V 0.4A Stepper Motor and powering it with a 12v 15A power supply.
This is being used in conjuction with an easy driver and an arduino uno.

Now the issue is i cannot get it to turn but only vibrate or turn what seems to be one step back and forth(very jittery)

Specifation for the stepper motor as well as wiring diagram attached:

Manufacturer Part Number 17HS15-0404S
Step Angle 1.8°
Step Accuracy 5%
Holding Torque 40Ncm(56.6oz.in)
Rated Current/phase 0.4A
Phase Resistance 30.0ohms
Voltage 12.0V
Inductance 58mH±20%(1KHz)
Weight 240g

I have attached 4 wires of the stepper in every combination possible to the easy driver but currently have it at:
A+ green
A- black
B+ blue
B- red

My arduino code is coming directly from schmalzhaus easy driver code:

void setup() {
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
digitalWrite(8, LOW);
digitalWrite(9, LOW);
}

void loop() {
digitalWrite(9, HIGH);
delay(1);
digitalWrite(9, LOW);
delay(1);
}

I have wired the arduino with 8 to the direction and 9 to the step as per the instructions on the easy driver website. I have also tried to GRBL with gcode sender and the same thing happens along with trying various other code from the web.

Does anyone have any idea of how to fix this or lead me in the right direction?

Try this Simple Stepper Code

You can easily identify the pairs of wires for each coil by measuring the resistance with your digital multimeter.

I presume you have a separate power supply for the motor and you are NOT trying to draw motor power from the Arduino board.

Make a pencil drawing showing how everything is connected and post a photo of the drawing.

…R
Stepper Motor Basics

tkbadger:
I am using a nema 17 0Ncm 12V 0.4A Stepper Motor and powering it with a 12v 15A power supply.
This is being used in conjuction with an easy driver and an arduino uno.

Incorrect setup - all chopper drivers need the power supply voltage to be more than the product
of winding current and winding resistance - usually much more (10 to 30 times is common).

A chopper driver like the easy driver expects a low impedance motor (0.5 to 2 ohms typiclally)
and controls its current by chopping. You have a high impedance motor (30 ohms), which
means from a 12V supply the chopper cannot chop or control the current at all.

Your options are:

24V supply - then it will work OK, won’t be very fast.
low impedance motor - work well, and much faster (though 24V is better for that)
use an H-bridge shield and lose microstepping, but get full or half steps at nominal current - very slow motor though.

The current setup may be improved to a vaguely working state if you are lucky - have
you checked you have the A and B windings correctly identified? Have you set the
EasyDriver’s current setting appropriately (setting it to somewhat under 0.4A may
allow some chopping to occur, note)

Thanks for the replies.
On this sparkfun page it shows a motor that is recommended in their guide to be used with the easy driver but that has a resistance of 32.6ohm and very similar specs to my own motor.

Isn’t that motor a high impedance motor yet they are using it with the easy driver?

Would you recommend that I get a 24v power supply and just stick with that or do you have any suggestions for low cost motor drivers like the easy driver that i can use?

Thanks alot for the help

You trust Sparkfun to get it right?

[ These days all the bargain NEMA17 motors are 1.7ohm 1.7A or thereabouts,
its hard to source high impedance motors - which is why the cheap DRV8825
modules are great ]

In your Original Post you say the coil resistance is 30 ohms and the coil current is 0.4 amps. Assuming those values are correct that motor can be driven by an Easydriver as the Easydriver can manage up to 0.75 amps.

If you measure the resistance and get a very different value let us know and we can reconsider things.

As @MarkT has said a high voltage power supply will be better as long as it is within the design range of the Easydriver.

You need to adjust the potentiometer on the Easydriver to limit the current to 0.4 amps to protect the motor.

Low impedance motors generally use higher currents that cannot be accommodated by the Easydriver.

I have some of those Sparkfun motors and they work fine with Pololu A4988 drivers and an 18v power supply. I don't have a convenient power supply with a higher voltage.

...R

Robin2:
I have some of those Sparkfun motors and they work fine with Pololu A4988 drivers and an 18v power supply. I don't have a convenient power supply with a higher voltage.

...R

And by fine you mean slow... If you want 2000rpm (acheivable with the right motor) its not "fine".

MarkT:
And by fine you mean slow... If you want 2000rpm (acheivable with the right motor) its not "fine".

I agree completely.

But I don't recall reading that the OP needs 2000rpm.

And I certainly don't need it. IIRC mine achieve about 1000 steps per second or 5 rps or 300 rpm

I was offering advice related the motors the OP already has.

I am better informed now than when I bought my motors and I might indeed choose low-impedance motors in preference. But price is also a significant factor and the Sparkfun motors seemed the best deal at the time.

...R

But a stepper that can reach 1000's of rpm will also give many times more torque at 300rpm for
the same input power as the high impedance one... That means less power is needed, or a smaller
motor. Look at the overall system efficiency and you'll see why low impedance is taking over, they
perform better in every aspect and cost the same to make (or slightly less as its quicker to wind
with thicker wire).

With cheap bipolar drivers like the DRV8825, A4988 etc, the control electronics for bipolar is no
longer expensive.

MarkT:
But a stepper that can reach 1000's of rpm will also give many times more torque at 300rpm for
the same input power as the high impedance one...

I don't think anyone is disputing any of that.

However the OP (and myself) happen to have bought high impedance motors. In my case they are adequate for my purpose.

...R