The current is set to 1.5A as per this Method 1.
A4988 datasheet shows 2A as the max current.
The current is set to 1.5A
That is one of your problems. The A4988 can supply only 1 Ampere continuously unless you have good forced air cooling and a finned heat sink. Especially at low speed, it will certainly overheat and shut down at the 1.5A setting -- if that is actually what you have done.
Since different boards have different current sense resistors, the calculation in the link you posted may not be correct. What is the value of the current sense resistor on your A4988 module? Post a clear, close up photo if you do not know how to recognize it.
This is a much better driver: https://www.pololu.com/product/2966
That will work, but notice the pointed set screws. They are for SINGLE use, you need to file flats on the shafts and ensure the set screw point always goes on the flat. Doing other will mean the hub will not easily come off the shaft because of the divot caused by the point.
Paul
Can't see the resistors in that photo. It is anyone's guess what the actual current limit setting might be.
But the photo brings up another problem. Breadboards are designed for low power logic circuitry, and the tracks will burn if subjected to motor currents.
In turn, that leads to intermittent connections, which if wiggled while the power is on, will instantly destroy the A4988 driver.
Either solder the motor wires directly to the driver, or use screw terminals if provided, or solder everything to a PCB protoboard, perhaps like the one shown below (from Adafruit), which can handle motor currents.

If the wheels are on the ground, and you use a full step to start with, then a stepper motor will miss steps.
A stepper motor can not drive wheels, it has trouble to start, and it can not do high speeds. A stepper motor has a very specific use, such as in printers or 3D printers.
Try half stepping, that should help at low speeds.
I'm not sure if half stepping is enough. Those wheels are 70 mm (2.75") in diameter. That is not okay to drive those directly with a stepper motor. That is not what stepper motors are for.
To drive wheels, you need a normal DC motor. If you want to know how far it got, then you can add an encoder to the wheel or axis.
Perhaps because you are changing the speed many times per step, which will confuse the calculations of the current step - for instance by changing between 0 and 1 speed repeatedly during a single step - I can't imagine the author of the library imagined setSpeed() would be called 10000 times a second.
If you monitor the currentPosition(), you can do the speed update no faster than the step rate, for instance.
If I had to guess, I would say resonance is your problem!
Change the drivers to 8x microstepping and see if this problem goes away.
You are right. I figured that out too. When speed was in 80-100rpm range, the resonance would cause the connections to break in the breadboard.
Thank you
Note that if the connections between stepper driver chips and motors are intermittent, the drivers will likely be destroyed.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.
