problem with A4988 Driver
Hello, I just started playing with Arduino.
I’m working on a simple project with a stepper motor.
My setup is basically identical to this one: https://lastminuteengineers.com/a4988-stepper-motor-driver-arduino-tutorial/
The wiring is the same. The difference is that in the article they use an Uno, while I’m using a Nano and I am powering it by 12V and my code is simpler.
As you can see in the video, when I power up my project the motor vibrates strangely for about a second and then starts working normally.
I have no idea what’s causing this. Does anyone have any ideas?
my code:
Last Minute Engineers
In-Depth: Control Stepper Motor with A4988 Driver Module & Arduino
Learn about A4988 Stepper Motor Driver along with Pinout, Wiring, Arduino Code for Microstepping, Controlling Speed & Direction of NEMA 17 Stepper Motor


9 Replies

code seems ok https://wokwi.com/projects/441100356695539713, perhaps your 12v source can't supply enough current or the current limiter on the A4988 isn't set correctly?
to be exact I have it connected like this https://wokwi.com/projects/441101111253045249
maybe I connected power incorrectly?
I am going to check the current limiter
my 12v source have 5A so it should be enough
Stoneware_stepper Copy - Wokwi ESP32, STM32, Arduino Simulator
Run IoT and embedded projects in your browser: ESP32, STM32, Arduino, Pi Pico, and more. No installation required!
it should be fine, Vin is rated to 12v
5A should be fine, check the limiter or perhaps the phasing of your stepper is different
I checked the limiter and the phases, they are fine.
However I noticed that when I remove the connection between SLP and RST the problem disappears, but introduces the new one. Now the motor doesn't operate smoothly when it should. What is expected I guess but maybe its a clue for what's actually going on ?
another thing.
I think it happens when everything is powering up
because this code make it so it vibrates like in the video for 1-2 seconds and then stops for 10seconds.
I also powered it up once with step pin disconnected and it was also vibrating for 1-2 seconds
I connected EN pin to 5V and the problem disappeared, however now it's disabled so that's no use, but maybe its another clue
if EN is HIGH the driver is not enabled, so that makes sense
idk what is causing the vibration you see
thank you for trying to help 😉
tomorrow I am going to try different arduino board.
maybe this one outputs some noisy signals ¯\_(ツ)_/¯
I have no other ideas to try
i'd try a different A4988 too if you can 🙂
Unfortunately I do not have another one.
But if changing boards won't help I will probably buy one