<stepper.h> gives 1/4 steps

Hi ,

I was using Arduino Uno R3 + Big Easy Driver + <stepper.h>, part of my code is as simple as: (I didn’t include the void and loop, etc.)

stepper.setSpeed(30); 
  stepper.step(1000);

However, when I actually measured the speed and steps, the motor moves about 1/4 value that I asked it to do.
By that I mean it only gives 30/4=7.5rpm, 1000/4=250steps.

Has anyone had this issue before? Is it software or hardware? Thanks! By the way, I was using the full step mode, not microstepping.

Best,
Sonia

That snippet of code is not near enough to solve your problem. The first thing that comes to my mind is that you have incorrectly defined the number of steps per revolution. Without being able to see how you have defined it, though, and without knowing anything about your motor, it's only a guess.

Post ALL of your code, and a link to your motor (NOT an e-bay ad), if you want more than sympathy. Which you can't get here, anyway.

PaulS:
That snippet of code is not near enough to solve your problem. The first thing that comes to my mind is that you have incorrectly defined the number of steps per revolution. Without being able to see how you have defined it, though, and without knowing anything about your motor, it’s only a guess.

Post ALL of your code, and a link to your motor (NOT an e-bay ad), if you want more than sympathy. Which you can’t get here, anyway.

Thanks for the reply! Here is all my code:

#include <Stepper.h>

Stepper stepper(200,3,2);

void setup() 
{ 
}

void loop()
{
  stepper.setSpeed(30); 
  stepper.step(200);
  delay(1000);
}

Here are the components I used with the above codes: (no ads here…)
1.Arduino Uno R3
2.motor: https://www.sparkfun.com/products/9238
3. Big Easy Driver (BED): https://www.sparkfun.com/products/10735

And I used full step mode (MS1, MS2, MS3 on BED connect to GND), I expected to have one revolution,
but the above codes only gave me 1/4 of a revolution, also the estimated speed is 1/4 of the expected value (30rpm);
Any advice on that? Thanks a lot!

And I used full step mode (MS1, MS2, MS3 on BED connect to GND), I expected to have one revolution, but the above codes only gave me 1/4 of a revolution, also the estimated speed is 1/4 of the expected value (30rpm);

If you disconnect MS1, MS2, and MS3, and use the default 1/16th stepping mode, and ask the motor to step 3200 times, how far does it rotate?

Its definitely sounds like its quarter-stepping - have you measured the voltage on the MSn pins (and tested for shorts)?

PaulS: If you disconnect MS1, MS2, and MS3, and use the default 1/16th stepping mode, and ask the motor to step 3200 times, how far does it rotate?

It still step 3200/4=800 times... :~

MarkT: Its definitely sounds like its quarter-stepping - have you measured the voltage on the MSn pins (and tested for shorts)?

Yes, I did check to make sure MSn were all grounded. The funny thing is I used AccelStepper.h, and used the same hardware setup, there is no "1/4" issue. But back to Stepper.h library, same "1/4" issue again. Very confused... :~