Stepper motors running too hot with A4988

I’m trying to build a new controller for a robot, to extend the more limited capabilities of the controller that comes with the robot. Among other things, the robot contains two of these. The ones I’m controlling are the SY39ST34-0166A motors - current/phase of 160mA and resistance/phase of 75 ohms.

I’m using Pololu A4988 stepper motor controllers to control them.

I have everything working, I can control the motors perfectly. However, they get very hot, much hotter than they get with the original controller for the robot. With the original controller, they barely get warm. With my A4988 controller, they get much too hot to touch before I just turn things off. This is a problem because the stepper motors are in a plastic box that starts to smell like its melting if I don’t turn off the controller. The motors are probably still below their rated max temp, but it’s too hot to run in the enclosure they’re in. It is not an option for me to replace the enclosure or modify the physical robot in any way.

According to the specs on the motor, the current/phase is 160mA. So I used the trimpots on the A4988s to adjust the current limit. Based on the equation on Pololu’s website, I should set the trimpots to show a voltage on the REF pin of .091 volts ((2.5/.16)/.7).

The thing is, if I read the current going to one of the leads on the motor, I get 220mA, and that’s at a resting state for the motor. Shouldn’t it be maxing out at 160mA? And, to add to the confusion, I dropped the VREF measurement all the way down to .015 volts, which should give me a max current of 27mA - but I’m still seeing 220mA!?

So am I understanding this right? It would seem that the Pololu controller is letting through much more current than it should. However, when I did drop the current setting down to 27mA, I could no longer move the motor. It just gave weak twitches in response to my step commands. So it does seem like the power is going down after all. But then why is it still getting so hot, and why does my multimeter still show 220mA?

Then I turned the current limiter trimpot all the way down, which theoretically shouldn’t let ANY current through. I didn’t measure the current on the leads, but the motors still got too hot - up to 80c after 10 minutes (not stepping - just connected to the A4988s but not moving).

Any advice would be appreciated!

- Dave

Hello, Dave.

It looks like you mixed up the current limit and VREF in your current limiting equation. Since the value you ended up with is correct, it was probably just a typo, but using a current limit of 0.16A and solving for VREF, the equation from the A4988 carrier’s product page becomes:

VREF = 0.16 / 2.5

Which comes out to a VREF voltage of 0.064V. Please note that as explained on the product page dividing by 0.7 is only appropriate if you are using the motor exclusively in full-step mode. Are you using any microstepping modes? Since your motor is in an enclosure, if you can get away with a little less torque, it might help to leave the 0.7 factor out, even if you are in full-step mode.

Also, please note that because of the way a stepper motor works, it is normal for it to draw more current when holding than when stepping. You should be measuring the current through the coil while the motor is holding, which it sounds like you are doing already. It is concerning that you still measure 220mA after dropping the VREF voltage down to 0.015V. How are you measuring the current through your motor coil? Could you post some pictures of your setup that show all of your connections? Could you try setting the VREF voltage to the 0.064V mentioned above and measuring the current through the coil again?

-Brandon