Wiring my 1205 Stepper and A4983 Driver to Arduino Mega 2560

Do yo have a preferred library or set up code?

I hooked up the 1205 motor the rugged shield and (with some tweaking) it runs fast a smooth. Now I will hook the 1205 back to the A4983 and start playing with the current limiter. Good thought. Thanks

Do you have a four pin configuration?

It looks like it takes about a 1,000 steps to make one revolution although the 1205 is a 200 step/rev. motor and I have set the code to 200 steps per.

I don’t really understand a lot of what you’re asking (e.g. the four-pin configuration question), and you seem to be leaving out a lot of detail while not fully answering my questions, which prevents me from having a clear enough picture of your setup to be able to give you much help.

The 1205 stepper motor does have 200 full steps per revolution, but the A4983 driver supports microstepping. Are you doing anything with the microstepping pins (MS1, MS2, and MS3)? If you leave them all disconnected, the default behavior should be full-step mode (assuming you have version 1202–carrier with regulators–and not 1201).

- Ben

I left out some of the relevant details because I don’t know enough to ask correctly. Thank you for being patient.

I have seen that with some set ups there is a use of 4 pins instead of two. That is about all that I know.

I am not doing anything with the MS1, MS2 and MS3. I looked at my invoice and I have a 1205 motor and a 1202 carrier.

I tried to set the system up just like your diagram. I jumped the 5V to VDD like it is called out at the top of the graphic and I included the two lines that go from VDD and GND to the microcontroller at the bottom of the graphic. I have the 30V going to the VMOT and GND. I have the black going to 1a, green to 1B, red to 2A and blue to 2B. I have STEP going to 22 and DIR to 24.

I hope that this is what you need.

I got it working. I went looking through the forum posts and saw your PDF. https://forum.pololu.com/download/file.php?id=487 I added a third line from the Enable terminal on the board to an open pin. I edited the code only to change the pin call outs from 2, 3 and 4 to 22, 24 and 26.

The motor rotates at a good rate and is smooth and steady.

Thanks for all of the help.

I’m glad to hear you got it working. However, I do not believe the enable pin is responsible for the change in behavior. What happens if you run that same code with the enable pin disconnected?

- Ben

You are right. It works without it. Thank

Hi there, just read this thread - Im very new at all of this - first day :slight_smile:

I was wondering if I could ask one of you to show me the Breadboard?
I have a very similar setup (see my thread here) Ardiuno UNO and a4983 with regulator and stepper motor

Please keep in mind, the best I have achieve today is to make two LEDS blink at different intervals - hooking up the stepper motor + a4983 W/R and the Arduino UNO on the breadboard seem impossible to me right now.

I would really appreacite some help on this

Good to see that this threads problem was solved so well!

I was doing some set up testing on the Arduino Mega 2560 with an LCD board on top. I hooked up the VDD wire, which is the next to the bottom pin on the right, to the 5 Volt pin socket on the LCD. It ran fine the first few times but between tests, the VDD wire came off.

I had the VMOT, at 12 volts, off when I hooked it back up. When I did, the LCD shut down. The display stopped right away but it took about 5 seconds for the back lighting to go dark. When I pulled to wire back out, the display came back on and was apparently un-harmed. I plugged it in and pulled it out over and over and got the same shut down response and recovery.

Then I decided to plug the VDD wire into the 5 volt socket at the end of the Arduino board next to pin 22. I got the same issue and I can’t figure out what is going on? Of course the motor won’t work with the VDD wire in or out.

What can I do to fix this?

Hello, herring_fish.

Are you using the A4988 carrier with voltage regulators, and do you have its 5V pin (at the top left) tied to VDD as shown in the diagram you posted? If so, you should not connect the other VDD pin to your Arduino’s 5V pin.

VDD for the A4988 should be supplied from one and only one source, whether that is the onboard regulator or an external regulated source. The connections in the diagram show the A4988 getting VDD from its onboard 5 V regulator, and supplying the same 5 V to the microcontroller (hence the arrowhead on the red wire going into the microcontroller). However, the Arduino has its own built-in regulators, and its 5V pin is an output, so if you connect the A4988 VDD to both its own 5V and the Arduino 5V, you are effectively shorting two voltage supplies together.

If this is not the problem in your case, could you please post a picture or diagram of your specific setup showing how you have everything connected?

- Kevin

I think that I have it hooked up just like this graphic. I have checked it several times. Of course my next step would be to check all connections…for the third time.

The Arduino does not have a VDD input, so I am not sure what you mean when you say “I have it hooked up just like this graphic”. How are you powering your Arduino? What, if anything, did you connect the lower right VDD pin on the stepper driver to on your Arduino? Do you have the upper left VDD pin on the driver connected to the 5V pin on the driver?

Unfortunately, your picture is too small and dark for me to be able to make out much. Could you try taking closeups of the driver and the connections on the Arduino separately with better lighting?

- Kevin


As I mentioned, you should not have both the 5V-VDD jumper and the other VDD pin connected to 5 V on your Arduino. If you remove one of these connections, does your setup work properly?

- Kevin

No when ever I hook up the 5V pin, the LCD goes down, no matter if the VDD 5V pins are jumped. The motor doesn’t run there way and it did.

It sounds like the stepper driver might be damaged, probably in a way that shorts VDD to ground. It is likely this happened either as a result of improper connections or because your loose VDD wire brushed against and shorted to something (since you mentioned it stopped working after your VDD wire came off).

If you contact us directly with your order information and mention this thread, we might be able to at least offer you a discount on a replacement. However, before you try another board, you should make sure you understand how you were connecting the driver’s VDD to two different 5 V sources at the same time and why that is bad for it.

- Kevin

I bought two replacement boards. I might use the other A4988 to change out the first axis Rugged driver board because it don’t have micro stepping.

OK …so if I jump the 5V to VDD (up in the upper left hand corner) then I don’t need the VDD (in the lower right corner) connected to the Arduino 5V?

Right?


This is correct.

- Kevin