Stepper problems with A4988

Hi,

I just bought two of your A4988 Stepper Motor Driver Carrier and made a first test. The small stepper motor out of a printer moves according to the step input, but not according to the number of steps. Even same number of forward and reverse steps result in different angles. More over the microstepping feature has a strange or no effect at all.

The board is attached to a mainboard which delivers the right voltages and and logic signals. The steps are generated by a microcontroller which works perfectly with previous L298/297 setup (Motor is enabled, wait 5ms, clock signal at about 200Hz, wait 5ms, motor is disabled). Current limit is set to 2 amps. The motor has 40 steps/rev, 2.2A max.

40 steps result in a complete revolution in full step mode
40 steps in reverse result in 36/40 rev
40 steps in half step: complete revolution
40 steps in 1/16 step: 1/8 revolution

Thank you for your help

Hello, viniv.

I am sorry you are having trouble with your stepper motor driver. Could you tell me some more about your setup? Is your stepper motor freely rotating (if not, could you tell me what kind of load it is under)? What are you using to supply power? What are you sending your signals with? Could you attach a picture that clearly shows all of your electrical connections?

I noticed that your current limit is set pretty high. Are you using a heat sink or some form of external cooling?

Also, if you have access to another stepper motor, can you try using it and see if you get the same behavior?

It sounds likely at a 2A current limit that you’re not getting even steps because the IC is shutting down occasionally as it reaches the thermal limit. If you have a long run of even steps that are not too slow, you will notice it as a sort of “stutter.”

Another potential problem is if your load is not easily attained, and you skip a few steps because the stepper motor lost grip of the shaft. You would want an acceleration profile in that case.

Thank you for your answers!

I played around with the current limit and now I have set it down to 1.2A. Works great in 1/8 and 1/16 step mode. I realized that the motor does strange things in full step mode when the driver is disabled and enabled again. Sometimes it changes position and loses one step. This happens always when I change direction.

How do you disable the driver? Do you disable it by changing the enable pin, or by putting it into sleep?

If you put it to sleep, you do something to the chip’s step translator that makes it lose a step or something. I say “or something” just because I have no idea what’s actually happening, or even what a step translator is. In this case, check out if you wouldn’t be better served by disabling the outputs via the enable pin, instead of via the sleep pin.

Now, I don’t understand what you said “this happens always when I change direction.” Frankly, you should be more clear in laying out if you’re asking a question or not, and what the whole situation is :). I don’t mean that rudely, I just mean because it helps everyone to have a clear chance at helping out :stuck_out_tongue:

*To further explain, you said “this happens always when I change direction.” I assume you would have no way of knowing if you “missed a step” if you were going in one direction…Unless you have a very exotic setup, I assume you’re just comparing steps forward and steps backward. Secondly, your statement says it only happens when you wakeup from disabling the outputs, but you also say it “happens always when I change directions.”

So, sir or ma’am, you’re being really ambiguous explaining the situation. xD, please put more time into the question