last day (20 days later) » 

1:02 PM
0
Q: What could be the reasons for a stepper motor stuttering with an A4988 driver?

user15278978I am using an A4988 Stepper Motor Driver, which is controlled with an STM32F767ZI on a Nucleo 144 board. The stepper motor takes 12 V with a maximum of 350 mA. When powered, the motor simply flickers and stutters, but moves at a negligible speed. Here is a circuit diagram of the setup, with volta...

 
one reason is trying to push her too fast and she can't handle.
 
@tlfong01 i have slowed it down, and the result is still the same
@gcr i believe the only wiring concern with the motor is that one coil of the motor is connected to a number pair (1A with 1B, 2A with 2B), as outlined in this image (which is what I have done)
@Ernesto nope, it doesn't. i was under the impression that any change to a high signal sent to the step pin of the A4988 would step the motor. i'll give this a go
 
I see from your schematic that you are using a bipolar stepper, but It is a bit difficult to follow you code to figure out your stepping sequence. It is not important which driver your are using, A4988, L298, 297, L293 etc. You might like to skim my answer to the following Q&A. Using L293D Motor Driver to Control Bipolar Stepping Motor 28BYJ48 - raspberrypi.stackexchange.com/questions/97975/…. You might also follow the AdaFruit or other newbie friendly tutorial and let me know the stepping schemes you are using.
You may like to refer to the newbie friendly Components 101 tutorial for a simple full step (no micro step) operation description. A4988 Stepper Motor Driver Module Tutorial - Components 101, 2019aug22 components101.com/modules/a4988-stepper-motor-driver-module. / to continue, ...
It is not clear if you have a 2 coil, 4 coils, 4 wires, 5 wires, or 6 wires stepper. If you have a 6 wire bipolar, and if you wrongly select the wires, you might have strange movements. To make very sure you have selected the correct wires, you see that in my referred answer, I actually spent a couple of hours using a multi-meter and a battery and by hand (and later using a 2 pole 5 throw rotary switch) changed the polarity to actually see the motor stepping small steps of 1.8 degrees. To get a thorough understanding, you might like me, experiment DIY change bipolar to unipolar. configuration.
The Components 101 Tutorial is good for newbies, because it recommend the full step simple wiring method. It also give references for L293D, ULN2003, L298N DC motor drivers which have the same architecture of 2 full H-bridges. A4988 has built in translator for the stepping and so user don't need any phase sequence tables, but then you don't learn the basic principles of stepping motors.
I am sorry I am not helping you to debug your program, but only suggest you to use a lower level stepping driver so you can learn the basic things. But if you do have a strong reason to use A4988, you can let us know the link to the tutorial with well documented full code, then more readers can help debugging. Have a nice project. Cheers.
 
1:43 PM
@tlfong01 thanks for the very detailed information. firstly i am wondering what you mean by a 'lower level stepping driver'. does this mean directly programming it from the main MCU? secondly, what is meant by a 'built in translator'? does that mean i only have to send a PWM high signal to the step pin in order to step the motor?
oh and i am using a stepper motor with 4 wires fyi
 
2:26 PM
(1) Ah, if your stepper motor has only 4 wires, then it is difficult to go wrong. Good.
(2) I am confused about your MCU STM32xxx. I guess you are NOT using this STM32, but only using jumper wires by hand, for testing. Please confirm.
@user15278978 (3) I am also confused about your "step down" box. Is it a "step down voltage regulator", like those usually based on LM2596 IC?
(4) I also got confused about the "potentiometer". I hope you are not doing the wrong way of using a potentiometer to step down from 12V to 5V. Please confirm.
(5) It would be nice if you can give us a photo, showing the step down thing and the potentiometer.
(6) Is your 12V battery strong enough to drive the step motor. Do you have a link to the motor. I hope to confirm if the spec of 350mA is correct.
No hurry to reply. It is bed time now here. See you tomorrow or day after tomorrow. Good luck and cheers.
 
 
6 hours later…
8:29 PM
@tlfong01 i am using an STM32 on a nucleo 144 board, with jumper wires. here is an image
and no, i am not using the potentiometer on the A4988 driver to step down this voltage, i have simply set the current limit to the motor with it
rather than a battery, i am using a 12V dc power supply, which provides up to 4A. i have verified the voltage from this using a multimeter, and it does indeed provide 12V
i really do appreciate your guidance, and hope you have a good rest
 

  last day (20 days later) »