I am trying to make the Pololu A4988 Stepper Driver work with my Arduino Uno. I want to have the stepper rotate 90 degrees in one direction pause for couple seconds and then rotate back
In my Arduino sketch I have it:
send 50 step pulses separated by a 10ms delay
wait 2 seconds and change the direction pin
repeat
My problem is that this works as expected for about 60 seconds and then it starts acting erractically, stepping in random directions even when it shouldn’t be stepping (I can shoot a video if need be)
What am I doing wrong? Why does it start behaving erractically after a short time?
It sounds like the chip might be overheating. What do you have the current limiting set to? You can’t practically set it higher than approximately 1A per coil without doing something extra to cool it.
Edit: I just noticed that your wall wart doesn’t actually supply that much current, so it might be the thing that is having trouble too.
I have a heat sink attached it via thermal tape. When it starts acting funky the heat sink is hot, though not enough to really burn skin.
I am not certain what the current limiter is set to (I need to get a new multimeter that can measure current above 200ma). Which way should I turn it to lower it?
Turning the pot counterclockwise decreases the current. If your multimeter can measure voltage, you can set the current by measuring the “ref” voltage.
Oh boy, I think this might be the first time I get to use ohmn’s law in a practical way!
To measure the REF do I probe between ground and the little circle that is connected to the trace that runs to the third pin from the left on the bottom of the chip?
Unfortunately, I don’t know what you can set it to with that heat sink, you will have to experiment. You said your power supply can only source 1.3 A, so you want to set it low enough so that the voltage from your regulator is not dropping when the motor is drawing current. If your multimeter could measure current, you could measure how much you were drawing from the supply!
Ok, I upgraded the power supply to an ATX power supply out of an old computer. The 12 volt rail is capable of 15 amps.
I also, got a better multimeter that can measure the amps from the driver, and I now have the current limiter set at .7 amps
Unfortunately, its still acts weird after a couple minutes. I did three tests where I timed how long it took to start acting erratically and measured the temperature of the heat sink at the time of failure.
It consistently takes about 3 minutes to start acting up. And the temperature of the heat sink (as measured by a thermocouple and my fancy new multimeter) was 183, 185 and 148 degrees Fahrenheit.
What is going on? The driver should be able easily handle 1 amp without a heat sink, right? Why is it overheating?
Sorry I did not notice sooner, but someone here pointed out to me that your motor wants to draw 3.0A at 1.53V so in your 12V setup it will want to draw approximately 24A. Probably the current is overshooting the current limit you configured and the chip is overheating. Since it seems like it is working for a while, you might be able to solve your problem by limiting the current even more, or lowering the drive voltage.
I am afraid I only have 3.3, 5 and 12 volt at my disposal, and if I power it using the 3.3v nothing happens at all (presumably because the driver needs 8 volts minimum. You are right about lowering the current further. If I put it down to about 300mA it seems to be able to go indefinitely. Monitoring the temperature with the thermocouple shows that the temp gets up to about 140-150F and stabilizes
It sounds like these drivers and these just won’t work with each other the way I had hoped.
Out of curiosity, how did you figure it is attempting to draw 24 amps?
To expand slightly on what Ryan said, the motor will try to draw current proportional to the voltage it is being supplied with. If it is rated at 1.53 V to draw 3 A, increasing the voltage to 12 V will proportionally increase the current it draws to 23.53 A.