Wrong step, when waking Pololu 1182


I’m trying to run a grid of 64 Steppermotors, which needs to be pretty precise. For this I’m using the Pololu 1182. I’ve been working on it for a while, but have run into some strange problems, which is affecting the performance.

First, whenever I wake the drivers the motors jump. I’m suspecting that this is to have them at a full step position. The step either seems to be random, or in the opposite direction of what it should be. This is messing up some calibrations and some checks i have in place to be able to determine the motors position. Is there any way to do a sort of soft start to prevent this? Or do I have recalibrate every time I run the motors?

Second, It seems they might have some trouble shifting direction. I’m not completely sure it’s not my code, but it seems that when i try to change direction quickly, they don’t react. I’m checking my code to see wether or not the problem is there, but I was wondering if it was anything you have had experience with, and that I should be aware of.

I’m running quartersteps, with 12V 1,2A motors, powered by a large battery. All the motors have been running smoothly, so I don’t expect the power to be a problem. Each motor has it’s own driver, so the second problem might be because of the code, since all of them run the same way.

Oh, and will it be a problem running at 1,2A? I’m thinking that with such a ‘small’ increase in current(Over the 1A where I don’t suspect much heat), I wouldn’t have to worry about temperature and such, when I’m only running the motors for maximum 1 minute at a time. I have turned up the current-limiter very high, since I’m thinking the motors can’t draw anymore than 1,2A, with a supply of 12V and an inner resistance of 10 Ohm, so I’m thinking that’s not a problem.

If you need any other information, feel free to ask.


First problem: it sounds like you are using sleep when you should be using enable.

Second problem: motors have a limit to what kind of torque they can deliver for a given step speed. It is possible you are exceeding this, but you should rule out your code first. (Also, you want to make sure you aren’t trying to go faster than the minimum timing characteristics specified by the A4988 datasheet.)

Power (and correspondingly heat) increases with the square of the current (I^2*R) so current you add, adds more than you might intuitively think it should. If it doesn’t seem to be performing erratically for you, then the current is probably okay. If you limit the current and it works better, it’s probably an issue.

- Ryan