a4983 stepping speed

I’ve been using Arduino pins 8-13, and obviously ground. 0 and 1 are blank.

These were then connected to EN, MS1, MS2, RST, SLP, STEP, DIR. (and GND to GND).

Do I need anything (cap or diode) bridging the motor windings to stop voltage spikes?


If so…
What size capacitor? How would I connect up the diode?

I’m going to try one last time in the morning and this one CANNOT blow! Is there any other precaution at all I can make to ensure this one doesnt blow?

Thanks again.

If your 1A fuse on the supply line held up for hours, I don’t think you need a bigger driver. I most suspect the power supply to be the problem; have you looked at it with an oscilloscope? You don’t need capacitors on the motor side, but adding some capacitors (100uF or more) to the power supply might help if you do see a lot of spikes there. With the voltage you’re using, they should be rated for at least 50V, and make sure you pay attention to their polarity.

- Jan

Ok, kind of working and we’re being very careful.

We’re now looking into emergency end stops for our linear sliding table. How can i interrupt the step command i send to the driver. As in if i tell it to do 1000 steps, how can i stop it half way through? almost broke my table completely =/.

the way it does the steps at the moment is

    digitalWrite(slp, HIGH);
    digitalWrite(ena, LOW);
    digitalWrite(ms1, HIGH);
    digitalWrite(ms2, LOW);
    digitalWrite(dir, LOW);
    int i;
    int a = strtol(data+1, NULL, 10);
for (i = 0; i<a; i++)
      digitalWrite(steps, LOW);
      digitalWrite(steps, HIGH);

It sounds like you’re not really understanding your system much. You don’t really tell the driver to take 1000 steps; rather, you tell it to take a single step 1000 times. It’s up to your program to stop sending additional step pulses once the end limit is hit. If you’re concerned about your program not being reliable, you could bypass the microcontroller and have the end stops reset or disable the motor driver. However, that would really be an emergency stop that the microcontroller would then not be able to overcome: you would have to manually reset the table before the microcontroller could control the motor again.

- Jan