A4983 + Arduino + Stepper motor = unequal step width

Hi people

I have recently bought 4 pololu 1201 stepper drivers to control my steppers on a cnc project. But unfortunately I had a problem getting them to work properly.

My problem:
The steps on my stepper motor have different angles!!
When running on full and half step mode everything is fine, but on all other setups the motor seems to not turn equally on every step. The step width gets bigger and smaller like the amplitude of a sinus curve. For example the first step turns the axis 1° and for every next step the angle gets wider until it reaches 3° and then goes back again to 1°. I hope that was understandable!

What I did to solve the problem:
-I read the datasheet and connected everything exactly like it’s shown in this video http://www.youtube.com/watch?v=WfS1xIgL0Pc
-I need my stepper motor to run at 1Amp so I turned the potentiometer until the Vref pin read 0,28V (0,28V / 8*0,05ohm = 0,7A which is 70% of 1Amp, right?)
-I changed the driver and the stepper. The problem still occurred.

What might be important:
-The motor has 48 steps per turn, maybe that is the problem?
-I didn’t use decoupling transistors for the supply voltages(5V VDD from Arduino and 12V VMOT from ATX)

The code I’m using:

boolean dir;

void setup(){
  pinMode(6, OUTPUT); //connected servo
  pinMode(7, OUTPUT); //connected servo
  pinMode(11, OUTPUT); //direction
  pinMode(12, OUTPUT); //step

void loop(){
    digitalWrite(11, dir); //set direction
    for (int x=0; x<240; x++){
      digitalWrite(12, HIGH);
      digitalWrite(12, LOW);
      delay(900);              //step 100ms high & 900ms low
    dir = !dir;  //reverse direction -> changes direction, just to see if it works

Well I don’t know what to do next.
Every help is appreciated!! Thanks in advance!!



This is not right; it looks like you are mixing two different approaches for determining the current limit. The 70% only comes into play if you are trying to determine the current limit setting by measuring coil current in full-step mode. If you are calculating the current limit from Vref, the equation is given in the datasheet:

ITripMax = Vref / (8Rs) = Vref / (80.05)

So Vref = ITripMax * 0.4, which means that you want to set Vref to 0.4 V for a coil current limit of 1 A. What happens if you increase your current limit a bit? What stepper motor are you using, and what is your power supply?

- Ben

I had that setting at first. Increasing the current didn’t help. I tried to play around with that setting, it does not seem to change the problem.

My stepper motor: Rated at 5V and 5ohm coil resistance -> 1 A current. 48 steps per turn.
AEG S026/48 (It’s a cheapo one. I have several of those and tried to exchange them, to see what happens. The problem occures on every motor in the same way)

My power supply is the Arduino for the logic ic and an old ATX PC supply for the 12V Vmot.



Hi there,

I did a few more experiments so far.

I hooked up another stepper with 100 steps/turn and a lower current limit. The problem was barely noticeable, but existent. So maybe it’s normal? Maybe because of the low step count of the first stepper the problem is simply more noticeable?

Then I used the first stepper again and registered that the effect is stronger the higher the current is. With 0,5 Amps (half the current limit) the stepper seems to run more smoothly.

When stepping slowly the steps are sometimes clearly visible and sometimes the axis seems not to turn (but it does not miss steps!). I’m afraid the rotation won’t be very linear.



While I haven’t really heard others complain about this kind of thing before, I think what you’re noticing is just an inherent property of your motors and will vary from model to model (as you’ve seen). There could very well be nonlinearities between your motors steps that cause it to not work well with microstepping, which tries to create steps between your motor’s steps through a specific pattern of current limiting. Missing steps would be a sign of a problem, but that is not the case here, which makes me think what you are seeing is normal for your motor. Have you considered trying a stepper motor with more steps per revolution?

- Ben