# A4983 and A4988 Getting Started Guide

Hello.

Yes, the Ton/Toff requirements mean that you can theoretically supply a 500 kHz signal on the step line and expect the driver’s outputs to respond appropriately, but this is a case where theoretical maximum speed is so far from reality that it doesn’t really even make sense to consider it a theoretical speed. You will not get these stepper motors to turn at 150,000 RPM! Coil inductance and rotor inertia limit the stepper motor’s ability to respond to the rotating magnetic field; if you step the field too quickly, the rotor won’t step (it might do weird things like vibrate in place, rotate in reverse, or seemingly move in a random sequeunce).

The maximum step rate of your stepper motors will depend on things like your supply voltage, the current limit you have set, and the load on your motor. Also, achieving the highest step rates generally requires you to accelerate the motor by gradually increasing frequency of the signal on the step pin. If you want a ballpark figure for maximum achievable step rates, you should look at the pull-out torque graphs on the stepper motor product pages. Given the highest pps (pulses per second) datapoints on these graphs, I’d say you shouldn’t expect more than 10 or 20 revolutions per second. You will not get 100 RPS. I suggest you try it for yourself, starting with low speeds and gradually ramping the speed up until the stepper motor stops rotating.

The signal on the step pin is pretty simple. Just drive the pin high for at least a microsecond every time you want the stepper motor to advance by one step, and make sure to drive it low for at least one microsecond before you drive it high again. For example, if you want to make the stepper motor turn at 60 RPM (1 revolution per second), you could put the driver in full-step mode and alternate between driving the step pin high for 2.5 ms and low for 2.5 ms. This will cause it to take one step every 5 ms, or 200 steps every 200*5ms=1s. The simplest input you can provide the step pin is probably a 50% duty cycle PWM, and the PWM frequency will control the step rate.

- Ben

[quote=“Ben”]Hello.

Yes, the Ton/Toff requirements mean that you can theoretically supply a 500 kHz signal on the step line and expect the driver’s outputs to respond appropriately, but this is a case where theoretical maximum speed is so far from reality that it doesn’t really even make sense to consider it a theoretical speed. You will not get these stepper motors to turn at 150,000 RPM! Coil inductance and rotor inertia limit the stepper motor’s ability to respond to the rotating magnetic field; if you step the field too quickly, the rotor won’t step (it might do weird things like vibrate in place, rotate in reverse, or seemingly move in a random sequeunce).

The maximum step rate of your stepper motors will depend on things like your supply voltage, the current limit you have set, and the load on your motor. Also, achieving the highest step rates generally requires you to accelerate the motor by gradually increasing frequency of the signal on the step pin. If you want a ballpark figure for maximum achievable step rates, you should look at the pull-out torque graphs on the stepper motor product pages. Given the highest pps (pulses per second) datapoints on these graphs, I’d say you shouldn’t expect more than 10 or 20 revolutions per second. You will not get 100 RPS. I suggest you try it for yourself, starting with low speeds and gradually ramping the speed up until the stepper motor stops rotating.

The signal on the step pin is pretty simple. Just drive the pin high for at least a microsecond every time you want the stepper motor to advance by one step, and make sure to drive it low for at least one microsecond before you drive it high again. For example, if you want to make the stepper motor turn at 60 RPM (1 revolution per second), you could put the driver in full-step mode and alternate between driving the step pin high for 2.5 ms and low for 2.5 ms. This will cause it to take one step every 5 ms, or 200 steps every 200*5ms=1s. The simplest input you can provide the step pin is probably a 50% duty cycle PWM, and the PWM frequency will control the step rate.

• Ben[/quote]

Thanks for the explanation! I’ll try it and see what is happening. Take care!

Hi,

I have problems calibrating and using my A4983 driver. When I connect my 12V DC supply to the driver I smell within 10 seconds solder and see some smoke (melting solder?) from the driver. I’m not a pro but I can tell that it isn’t good. I followed (I hope) the starter guide posted in the first post. I can not see any unwanted solder bridges.
I made following connections (for calibration/current limiting):

• grounded STEP, DIR, MS1, MS2, MS3, and ENABLE
• grounded GND logic supply
• connected SLEEP to RESET
• VDD logic supply to the 5V pin of my arduino
• connected 5V to VDD for selecting 5V logic
• 1A, 1B and 2A connectd to a stepper motor (pololu #1200) to red, blue and black wire respectively.
• 2B is also connected to the stepper motor (with wire green) but got my multimeter between it to measure the current. It measured 0,00mA.

I measured all pins and they are grounded or are high (sleep and reset are high). The used power supply is 12,2 V.
I don’t know what I have to do now, hopefully someone can tell me what is wrong. What can I measure to know if it is still alive? I’m afraid of trying it again cause I may damage the driver even more (if it is still alive).
Thanks

UPDATE
I feel like a fool but apparently I switched the polarity of the power supply. I thought it was correct so I never checked it. The motor works fine now!
Sorry for the useless post.
I could hear the local radio station coming out of the motor when I touched the current limit pot on the driver with the screwdriver. Strange.

Looks like someone else had that same experience:

Hi

I have tried to calibrate the Pololu A4983 driver when hooked onto a Pololu #1206 Bipolar stepper as per instructions in the first post.

During calibration i get 0 Amps current, through coil number 2.(coil with green and black wires)
Even though i couldn’t calibrate the pot setting on A4983, i ran the motor using the Arduino code and A4983.
I get the desired rpm but the stepper heats up in 5 mins for no load condition.
I am able to repeat this 5 min test any number of times, but i am nervous about the heating problem.

Moreover if i measure a volt drop across coil 2, during calibration, i observe a 7V reading.
The vmot pin on the A4983 has been set to 8V.
Any guesses as to what i am doing wrong during calibration?

Thanks
Sam

Hi,

I have another question. I have a Pololu #1206 bipolar stepper and a A4983 driver. What should I change in the Arduino code to get 1 RPM as the speed for my stepper? Also, What is the lowest and highest RPM that is possible.

aerosam

It looks like you might be doing all kinds of things wrong. Regarding the current, if your motor is moving and things are getting hot, you are obviously using some current; if you are not seeing it in your measurement, there is something wrong with the measurement. Whether or not there is a mechanical load should not affect your stepper motor much; if it’s getting too hot, you might need to lower the current. Another problem is that 8V is right at the lower limit of the range, why are you setting it there?

For your speed questions, it seems like you really are not understanding the very basics, so you should read up on stepper motors more. For the low end, you are asking the motor to make little steps that are portions of a full revolution, and you can wait as long as you want between steps to get arbitrarily low RPMs. For the upper end, it depends on things like your voltage and load, but you should be able to get several hundred RPM (several rotations per second).

- Jan

Hello.

I just want to point out that various components will generally heat up in applications like this, and that is not necessarily a bad sign. For example, the stepper motor driver IC can operate comfortably at temperatures that would burn you. You need to determine if your components are merely heating up (expected) or overheating (bad). You can help protect your stepper motor by setting the current limit of the motor driver to a value at or below your stepper motor’s rated current. The A4983 driver has built-in thermal shutdown that protects it from being damaged by overheating. If it starts cutting out after your motor has been running for a little while, it is probably overheating and you should take steps to keep it cooler (e.g. lower the current limit, add a heat sink, or improve air flow).

Also, because the stepper motor driver actively limits current, measuring coil output voltages with a multimeter while the stepper motor is connected is not likely to give you a meaningful result. Instead, try measuring the voltages with the stepper motor disconnected, or you can look at the coil voltage with an oscilloscope. (Note: do not connect or disconnect the motor while the driver is powered, as doing so could permanently damage the driver!)

- Ben

Hi Jan

The calibration problem seems to be solved. I changed my multimeter and the A4983 driver, set VMOT to 12V.
Now the motor doesn’t heat up and life seems good.
I am still having problems with getting a desired rpm.
I believe that the motor steps when it transitions from low to high. MS1/2/3 are all grounded to ensure that the motor takes full steps
1rev=200steps.
I want 200steps in 60 secs (i.e rpm=1)
Could you please tell me what i am doing wrong,in the code

[code]void setup()
{
pinMode(enablePin,OUTPUT);
pinMode(stepPin,OUTPUT);
pinMode(dirPin,OUTPUT);

//For some strange reason enable pin,should be low for the motor to start!!
digitalWrite(enablePin,LOW);
digitalWrite(dirPin, HIGH);

}

void loop()
{
//Hypothesis–Motor steps when stepPin transitions from LOW to HIGH
//MS1,MS2,MS3 all held at LOW.
//MS1 grounded through a 100kOhm resistor?–Is this necessary?
//Motor should rotate at 1/60 rps
digitalWrite(stepPin,HIGH);
delayMicroseconds(2);//Hold at high for 2 microsecs
digitalWrite(stepPin,LOW);
delayMicroseconds(300000-2);

//Nothing happens if maintained at high
//digitalWrite(stepPin,HIGH);

//Nothing happens if maintained at low
//digitalWrite(stepPin,LOW);

}[/code]

delayMicroseconds(300000-2);

That function takes an unsigned integer as an argument, which means the argument must be less than 65536. The compiler is just converting your argument of 299998 into an unsigned integer by disregarding all by the two low bytes, which means it is only delaying for 37854 us. Are you seeing a step rate of approximately 8 RPM?

delay(300);

- Ben

Thanks Ben

Will try the code change and let you know.
Currently it seems to go a lot faster than 8rpm.

Sam

Thanks Ben

That solved it.

Sam

decrDude,

Your guide is a lifesaver. One thing I’d like to suggest for your guide, make sure on your diagram it says “Digital Pin 2, Digital Pin 3, etc” Ive been fighting with this because i had it hooked up on analog and was attempting to run right from your code. Was actually getting movement, but couldn’t figure out why…sporadic behavior…etc…Thanks to Ben and Ryan on this forum, everything works perfectly!

Great guide! It made it very easy to get my motor up and running.

Instead of measuring current in one of the legs of motor, I measured the total Vmot current and divided by 2. This was easier because my power supply has a built-in current meter. Anybody see a problem with that?

Hello.

We recommend measuring coil current because it is not accurate to measure the current total current drawn from your power supply if the stepper motor driver is actively limiting the current. This is because the inductance of the motor coil can keep current circulating through the coil even when no current is being drawn from the power supply. You can also get an accurate measure of the current limit by using a multimeter to measure the current limit reference voltage.

Also, even if the power supply current were an accurate representation of the coil current, you would need to divide by 1.4 to determine what you have the current limit set to (assuming you are in full-step mode), not 2. In full-step mode, both coils are always energized at approximately 70% of the current limit (specifically, sqrt(2)*current limit/2), which means:

current limit = coil current / 0.707

or

current limit = (coil current * 2) / 1.41

- Ben

I have a question about testing the coil current. Where is that done on the board exactly. I thought I was doing it right but my A4983 caught fire so I guess I didn’t can someone tell me exactly where to connect my multimeter to measure the current at the coil with no motor attached. This is the stepper motor I’m using pololu.com/catalog/product/1200. What should the reading on the multimeter be with that motor.

Thanks

Got it working with my other driver. Measured .420 amp at the coil. Wish I didn’t have to wait so long for a replacement

I am sorry you had so much trouble. What was the issue you had when your driver caught fire? I would like to add it to my gotchas if I think it will be a common mistake.

I have updated the initial post and added an updated pdf to address some of the issues people have been having. Hope it helps!

hey guys, i’ve been on this pretty much all day (and i can’t really tell you what i wasted that much time on).
heres the problem: i tried to follow the guide and i’m pretty sure i did everything correct - apart from the DMM stuff.

the facts: i have one stepping motor (#1209) and an 4988. everything set up like described - the part about calibrating the 4988. the thing is, if i connect the motor without the DMM i get a noise from the motor. there definitely is current flowing.
if i connect the dmm on one of the coils (chip -> dmm -> coil “in” -> coil “out” -> chip) and power everything on again i get a VERY silent noise. i can only hear it if i’m very near and everything else is silent. definitely not much going on there. additionally, the DMM keeps telling me that there are 0A.

i guess i’m doing something stupid and maybe even obvious with the DMM, but i don’t see the problem. maybe someone else can help me out with a tip or two…

edit:
by now i’ve tried using the test-program on the arduino and the motor actually moves. still, the DMM won’t show any current. thats a bit weird because the motor clearly moves…