Arduino and A4988 problems

I got an A4988 to be run by an Arduino, but it acts quite strange. It seems to work but only after the signal to step has stopped for a few seconds. It also ignores the number of pulses to step and only steps roughly 10 times. I wired it following this diagram: A4983 Breadboard except that I also grounded MS1.

Any obvious reasons I would have these issues?

Edit: I’ll try to add more details as I think of them.
The stepper is 1.68 A max, 1.65 ohm and I have the chip running 1.15 V through the coils. (I’ve got a heat sink on it)
I’ve also placed a new chip in the circuit and got identical results so I suspect it’s something I’m doing, not the chip.

Hello.

Do you mean 1.15A?

What is your power supply? Do you have a common ground between your Arduino and the A4988 driver? The A4988 has an internal pull-down on MS1, so you do not need to externally ground it if you want it to be low.

- Ben

I feel particularly stupid now. I’d been solving for the amperage backwards, so I was putting 1.15v through the chip when I was supposed to put 2.77v though it.

Source to read up a bit of electrical it it helps anyone else.

Does that mean that things are working for you now?

- Ben

I’m afraid not. It seemed to work for a very short period before going back to the same pattern as before.

I’m confused about what you mean “putting 1.15V through the chip”. If you are referring to settings for the reference voltage, vref, I think you are computing something wrong.

If your stepper motor is rated for 1.7 A per coil, you should be setting the reference voltage to 0.68 V. However, the driver will overheat at currents this high unless you keep it adequately cooled. I suspect your problem is from overheating, and I suggest you start out by limiting the current to something much lower, such as 1 A per coil (vref = 0.4 V) to see if your problems go away.

- Ben

I did turn it down after you said that, but to no avail. However I discovered something by accident. If I deprive the Arduino of power and give the A4988 5v via a 7508 reg, it seems to work.

In what way does it work? If the Arduino is providing your control signals (step and dir), I would not expect the stepper motor driver to do anything while the Arduino is unpowered.

- Ben

Wow, I guess I was so tired when I posted I left it completely devoid of details.

Well, I have the breadboard receiving 12v on one rail and a 7805 regulates it down to 5v on another rail for the logic of the A4988 and a button for the Arduino. The grounds are connected with via the 7805 and the ground from the Arduino is also plugged in. The button, which only gets power from the 7805, seems to provide enough power to run the entire Arduino and its script.

I intend to get rid of the 7805 and power all the logic from the Arduino to see if that’ll help.

I powered everything from the arduino and got positive results…

Except I’ve discovered two of the four drivers I ordered don’t work right. One causes a short circuit and the other stutters throughout its operation. Does anyone know who I should talk to or even if there’s anything I can do about this?

How did you verify that one causes a short circuit, and are you sure the problem with the stuttering unit isn’t the result of a poorly set current limit?

Your posts in this thread make it sound like you had at least some of the drivers initially connected wrong or at least didn’t really know what you were doing with them. Do you understand what was causing the strangeness you described in your opening post? We test all the drivers before they ship, so it is likely that they were at least working at one point, and problems with multiple units strongly indicates some kind of systematic misuse. We might be able to offer you some sort of discount on replacement units, but first I want to make sure that (a) your drivers really are damaged and (b) you aren’t doing something that is likely to damage replacements.

- Ben