Arduino and Schmaltz Easy Stepper Controller Confusion

I am trying to control a 4-wire NEMA 17 stepper motor using the Easy Stepper Driver board. With nothing connected to MS1 and MS1, my understanding is that I should be in 1/8 microstepping mode. As the documentation explains, that should give me 1600 steps per revolution. The motor normally is 200/rev, and at 1/8, that should be 1600/rev.

However, each time I transition PIN 9 (STEP) high, the motor seems to move 4 steps.

I have a counter to stop and pause 2 seconds at 1600 steps, and after1600 steps I do observe ONE SINGLE COMPLETE REVOLUTION.

However, each time it steps, it seems to jump 4 at a time.

I am concerned, because I want to add a button, and when I press the button I want to get exactly 1/1600 of a revolution, no more. Can I achieve that? Why does the motor step seemingly move four steps at a time.

//-------------------------

int count = 0;
void setup() {
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
digitalWrite(8, LOW);
digitalWrite(9, LOW);

pinMode(2, INPUT);
pinMode(3, INPUT);
}

void loop() {

if (count > 1600)
{
count = 0;
delay(2000);
}
digitalWrite(9, HIGH); // Motor jumps 4 right here (It seems).
delay(100);
digitalWrite(9, LOW);
delay(1000); // I am seeing 4 jumps, pause, 4 jumps, pause, etc.

count = count + 1;

}

Post a link to the datasheet for your stepper motor.

When you say "jumps 4 steps" do you mean 4 full steps or four micro-steps.

If you think you have it set for 8x micro-stepping and it is jumping 4 micro-steps my guess is that you have really set it for 2x micro-stepping.

...R
Stepper Motor Basics
Simple Stepper Code

To make it easier for people to help you please modify your post and use the code button </> so your code looks like this and is easy to copy to a text editor. See How to use the Forum

I am going to describe by observation a different way.

I am using Arduino with this stepper motor:

With the Easy Stepper Driver Board:

This motor is normally 200 steps/rev.

I know I am in microstepping (1/8 step) mode, the default, because when I send EXACTLY 1600 steps, I observe EXACTLY one complete revolution.

However, when I increase the delay between steps to "delay(500)", I observe much inaccuracy from microstep to microstep. Sometimes, at some microsteps, the motor doesn't move at all. Other steps, it moves more. It seems like, at some at some microsteps, it is "catching up".

The is NO mechanical load on the motor.

Is microstepping this way just VERY inaccurate?

I wanted to be able connect a button and get one exactly microstep per button press, but it looks like that will just not be possible. Am I right?

It looks like I will get 1.8 degrees ever 8 button presses. But the individual microsteps may or may not be proportional due to inaccuracy of each microstep.

Thanks,

Mark

markmokris:
I know I am in microstepping (1/8 step) mode, the default, because when I send EXACTLY 1600 steps, I observe EXACTLY one complete revolution.

Good to have that confirmed clearly.

However, when I increase the delay between steps to "delay(500)", I observe much inaccuracy from microstep to microstep. Sometimes, at some microsteps, the motor doesn't move at all. Other steps, it moves more. It seems like, at some at some microsteps, it is "catching up".

When it is working like that will it make a full revolution accurately or does it miss steps?

Microstepping is achieved by making the motor coils work against each other so it is never going to be as precise as full steps.

Have you the current limit on the Easydriver correctly set for 400 mA to match the motor's specification?

What voltage is your motor power supply? Stepper motors generally work better with higher voltages - within the range acceptable to the motor driver.

...R

Thanks for your reply Robin!

You asked "Does it miss steps?" It misses microsteps. I think for every 8 microsteps, it hit-or-misses several. But by the end of 8 microsteps, it has caught up, having produced the equivalent of an accurate full step.

I am using an 18V variable 3A bench supply. I started at 12V (which the motor is), but have gone higher. The bench supply has a current meter.

I having adjusted the pot on the Easy Driver board, but I have noticed no significant effect on the microstepping "problem". Current doesn't seem to exceed .6 A on the bench supply meter.

Maybe this is as good as it gets for microstepping with the motor and Easy Driver?

I also have a 2A bipolar stepper motor and a Big Easy Stepper Driver. I may prototype that with the Arduino and see what kind of accurate microstepping I get in that case.

Mark

markmokris:
You asked "Does it miss steps?" It misses microsteps. I think for every 8 microsteps, it hit-or-misses several. But by the end of 8 microsteps, it has caught up, having produced the equivalent of an accurate full step.

Does that mean that it will accurately perform a full revolution?

I am using an 18V variable 3A bench supply. I started at 12V (which the motor is), but have gone higher. The bench supply has a current meter.

Can you go to 24v to see if that improves things? (Assuming that is OK with the Easydriver).

The meter on the power supply is not relevant because it is measuring the current at 18v and because it is not measuring the minute changes of current going into the stepper coils

also have a 2A bipolar stepper motor and a Big Easy Stepper Driver.

Whatever the datasheet says 2A is too much for an A4988 unless you have a big heat sink and a cooling fan. 1.3 or 1.4 amps is more realistic. I believe drivers using the TB6560 chip can manage up to 3amps so should be comfortable at 2A.

I don't have enough personal experience of microstepping to know if your problem is common or not.

...R

Microstepping is achieved by making the motor coils work against each other so it is never going to be as precise as full steps.

Whaaaa? :o

The phases are 90 degrees apart, you could not make them "work against each other" even if you tried!

Some people have a mistaken view of microstepping where they think if you set 1/8th microstepping, on a standard 1.8 degree motor, the motor will turn exactly 1.8/8 degrees with every step input.

You can't expect that.

What you can expect, and the whole point of microstepping, is that the motor will go from 0 degrees to 1.8 degrees much more smoothly than when full-stepping.

In any case, I don't think that motor with the 30 ohm (!) winding resistance is a good candidate to get 'accurate' microsteps out of.

Daenerys:

Microstepping is achieved by making the motor coils work against each other so it is never going to be as precise as full steps.

Whaaaa? :o

The phases are 90 degrees apart, you could not make them "work against each other" even if you tried!

Some people have a mistaken view of microstepping where they think if you set 1/8th microstepping, on a standard 1.8 degree motor, the motor will turn exactly 1.8/8 degrees with every step input.

You can't expect that.

What you can expect, and the whole point of microstepping, is that the motor will go from 0 degrees to 1.8 degrees much more smoothly than when full-stepping.

In any case, I don't think that motor with the 30 ohm (!) winding resistance is a good candidate to get 'accurate' microsteps out of.

Okay. If this is accurate (and I have no reason to doubt what Dany is saying), this is probably the answer I was looking for.

The point of microstepping is to get smoother full steps, but you cannot expect completely accurate microsteps?

Very interesting! Can I get a different motor with a different resistance that will get me closer to more accurate microsteps?

Thanks,

Mark

Daenerys:

Microstepping is achieved by making the motor coils work against each other so it is never going to be as precise as full steps.

The phases are 90 degrees apart, you could not make them "work against each other" even if you tried!

So how do you get a motor to stop part way between its natural step positions.

I think you are mixing up phases and poles.

...R

So how do you get a motor to stop part way between its natural step positions.

Put equal current thru each phase?

I suppose you can consider that the motor coils "work[ing] against each other" but I would consider it more as the two coils working together.

But to return to the OP:

Can I get a different motor with a different resistance that will get me closer to more accurate microsteps?

The people who care about microstepping accuracy are the 3D printing people. Because inaccuracy shows up as weirdness on their high-resolution 3D prints.

If I needed accurate microsteps, I would find out what motors/drivers the 3D people are using. I don't offhand know what combinations are working for them, but I have seen online discussions about it.

What is your application that depends upon accurate microsteps?

Daenerys:
I suppose you can consider that the motor coils "work[ing] against each other"

That's what I had in mind. The two teams in a tug-of-war are simultaneously working against each other and working together. if one stopped pulling the other team would fall on the ground.

If I needed accurate microsteps, I would find out what motors/drivers the 3D people are using. I don't offhand know what combinations are working for them, but I have seen online discussions about it.

Any bipolar motor with sufficient torque and A4988 type drivers. Nothing special.

...R

The application for this stepping motor is a ham radio HF magnetic loop antenna. A large variable capacitor tunes the magnetic loop. This kind of antenna is very selective and has a very small bandwidth where a SWR (standing wave ratio) approaches 1:1. You almost cannot tune it by hand and expect to hit the lowest SWR.

Plus, the antenna may be mounted away from the operator (me). So you really need a small, very slow motor that can change direction.

20171119_085942.jpg

Anyway, I prototyped this motor:

It is a 2 A motor rather than the .4 A motor I was using. I went to a Big Easy Stepper Board to handle the larger current requirement.

In 1/16 microstepping mode, the motor turns very slowly and very smoothly. It looks like I can hook up a push button, and get one single microstep with each button press. It doesn't miss steps. That's all I was after.

I guess I needed a more robust motor. At .4 A, I guess I cannot expect each individual microstep to be accurate.

I didn't know about A4988 controller boards until this thread. It seems like they do everything the Big Easy Stepper Driver does. They're cheap and I just ordered 5 of them.

I wonder why the Big Easy Stepper Board even exists.

Thanks for your help!

Mark

I would be surprised if your problem has anything to do with using a low current motor.

And, as I said earlier an A4988 won't be able to provide 2 amps. However you may find that the bigger motor has enough torque with 1.4 amps or so.

...R