hello , i am using the A4988 stepper motor driver , and there is a problem .
the datasheet specifies that a step is done by the motor on a low to high shift on the step pin .
to test my S motor driver . i am using this simple arduino code :
now the stepper motor has 1.8deg step , so 200 steps must do a full revolution . so the motor has to do a full turn , wait for a second then do an other and so on . according to the datasheet the value of X should not change anything . when X is 0 , everything works . the motor does a 360deg turn every 1s . now the problem is when i use a real value for X . like 1 , 2 , 10 , 50 or 100 . the motor does less than 360degrees . which means that it does not do a full revolution before stopping for 1s . it does less than 360deg stops for 1s then does less than 360deg and so on …
i have been struggling with this for a couple of days now and i can’t understand it .
Your code is difficult to follow because you are using variable names that differ only in case and your spacing does not follow standard conventions, however it looks like you probably have connected pin 3 of your Arduino to the step pin of your A4988. It is possible that your code it sending the right signals, but that the stepper hardware is not set up correctly. Can you post pictures here that show how everything is connected? Did you set the current limit on your stepper driver and, if so, what did you set it to? What kind of power supply are you using? Do you have a datasheet or any other information about your stepper motor you could post here?
i did not set the current limit on the stepper driver though . could that cause a similar problem ? and if it can how can i set the current limit ? (i know it’s done by turning the pot , but how much do i need ?)
Having an inproper current limit setting could cause a lot of strange behaviors. The video in this blog post shows how to set the current on our A4988 driver boards.