How many steps/microsteps is Arduino initiating with Nema 17 stepper motor

I have a Nema 17 stepper. I understand that with a 1.8-degree step angle (such as the Nema 17 has) will make 200 steps for every full revolution of the motor (360 ÷ 1.8 = 200). I've also read that each 1.8 degree step can be divided up to 256 times, providing a step angle of 0.007 degrees (1.8 ÷ 256), or 51,200 microsteps per revolution.

I'm using the AccelStepper library. When my Sketch instructs the motor to runToNewPosition 80 steps, it's moving a very small distance (about 1.2 degrees), certainly not 40% of a full rotation. So I have to assume the 80 steps I'm calling in my Sketch are microsteps. Am I right?

Nevertheless, I feel like my stepper isn't moving in 80 microsteps either. I just did a test where I completed a 360 rotation with the Sketch moving the motor in increments of 80 steps, and it took about 300 moves to complete the rotation. That's more than 200 steps but far shy of 640 (51,200/80=640).

Am I missing something? Does the AccelStepper library move 2 microsteps for each 1 step noted in the Sketch?

What kind of step motor driver do you have between Arduino and motor?

It's possible to do microsteps of various fractions of a step. 1/256 is certainly not the only option (actually that is not common). Microstepping will be configured on your stepper driver. It has nothing to do with the AccelStepper library. The AccelStepper library only sends pulses and it's the driver's job to decide how to interpret that signal.

If you send pulses too quickly, the stepper will miss steps. Your problem sounds like it could be caused by that issue. You need to experimentally determine what is the minimum pulse interval without missing steps on your stepper.

outsider:
What kind of step motor driver do you have between Arduino and motor?

This is the key question. It is the stepper driver that generates the micro-steps, not the Arduino.

...R
Stepper Motor Basics
Simple Stepper Code

Interesting. I'm using the EasyDriver stepper driver. I'm reading on Easy Driver stepper motor driver that it "defaults to 8 step microstepping mode. (So if your motor is 200 full steps per revolution, you would get 1600 steps/rev using EasyDriver.)"

If my test was accurate, I should be falling in the 2400 steps per revolution zone, which would be half of the 51,200 maximum steps. I'm not with my EasyDriver at the moment, but it looks like I should checking the MS1/MS2 pin to see how it is set.

Thanks for the advice!

forestkelley:
If my test was accurate, I should be falling in the 2400 steps per revolution zone, which would be half of the 51,200 maximum steps.

Those numbers make no sense to me if there are supposed to be 1600 microsteps per revolution.

Post a link to the datasheet for your stepper motor. The Easydriver may not be able to supply the current required by the motor.

...R

Can you post the code you are using? And maybe the schematic of your breadboard setup?

it looks like I should checking the MS1/MS2 pin to see how it is set.

You also need to properly adjust the motor driver current limit, or microstepping won't work.

pert:
If you send pulses too quickly, the stepper will miss steps. Your problem sounds like it could be caused by that issue. You need to experimentally determine what is the minimum pulse interval without missing steps on your stepper.

With the AccelStepper library that means finding the maximum values to both of setAcceleration() and setSpeed() that work without miss-stepping, then backing each of them off 20% or so.

Missing steps is most often caused by resonance, a stepper without a load to drive is the worst possible
situation and is very likely to miss-step with full steps anyway - microstepping reduces resonance a lot.