A4983 and A4988 Getting Started Guide

I appreciate your replies, Derrill, but I have to admit I’m getting more and more confused (must almost be Friday). Please bear with me and my questions:

  • If I use my motor in full step mode (unlikely if it’s really 18 deg per step) and I supply 12V to the board (and the motor is rated for 12V), do I need to worry about the current limiting pot’s setting? Does the A4998 ignore the pot in full step mode? If not, then what do I set it to?
  • The reason I thought I might need greater than 12V power supply to achieve micro stepping is from the first paragraph of ‘Current Limiting’ that you mentioned: “To achieve high step rates, the motor supply is typically much higher than would be permissible without active current limiting. For instance, a typical stepper motor might have a maximum current rating of 1 A with a 5Ω coil resistance, which would indicate a maximum motor supply of 5 V. Using such a motor with 12 V would allow higher step rates, but the current must actively be limited to under 1 A to prevent damage to the motor.” So, do I need a higher voltage power supply if I think I’m going to use the 1/16 micro stepping mode?
  • I’m confused about how to set the current limiting pot value. If I use the formula you mentioned (Current Limit = VREF x 2.5) and let’s say I measure 0.3V on the VREF pin (does it matter if I’m in full step mode or something else? Do I hook up the A4998 per the .pdf on page 1 of this thread while doing this?) does that mean I turn the pot until my DMM shows “0.75A” while connected in serial to one of the coils?

Apologies in advance for my obtuseness.

The A4988 does not ignore VREF when it is in full step mode, so as I said in my previous post, I recommend always setting the current limit to the rated current of your motor. For full-step mode or any of the microsteping modes, you can set the current limit on the A4988 using the VREF measuring instructions and this formula from the “Current Limiting” section of the A4988 product page:

Current Limit = VREF × 2.5

The A4988 product page has a “Minimal wiring diagram for connecting a microcontroller to an A4988 stepper motor driver carrier (full-step mode)” This diagram shows the connections necessary for full-step mode. If you what to use one of the microstepping modes, you can also connect the MS1, MS2, or MS3 pins to 5V according to the mode you want to use. When setting the current limit, you can measure the voltage at the VREF via. A reading of 0.3V on the VREF via would correspond to a current limit of 0.75A. If you are setting the current limit by measuring the voltage at the VREF via you do not need to also measure the current through your motor’s coil.

You do not need to use a higher voltage than your stepper motor is rated for to do microstepping. What the paragraph from the A4988’s product page that you referenced is saying is that if you find that you are not able to step your motor as fast as you want to (i.e. you try to apply a step signal that has a large number of pulses per second, but the stepper motor won’t take a step on each pulse), increasing the supply voltage might help the motor step faster.

-Derrill

If I understand you correctly:

  1. Turn the trim pot all the way counter clockwise (minimum value)
  2. To achieve the rated current of 100mA for the Portescap stepper, I adjust the trim pot until my DMM reads 0.04V

Is that right? And do I need to repeat this if I change my micro stepping mode?

Anyone? I’ve searched YouTube for examples of setting up the A4988 but only found 1


which I believe was uploaded by the author of this thread.

  • If my motor is rated at 12V and I use a 12V power supply, do I need to calibrate the A4998? If not, what does that mean-do I have to set the trim pot all the way to the left (CCW)?
  • If the calibration is done in full stepping mode per the .pdf guide on Page 1, can I assume that setting is appropriate for all micro stepping modes? The stepper motor I have is 18 deg per step so I’m pretty sure I’ll need to use the 1/16th mode.

The VREF voltage of 0.04V is correct for a current limit of 100mA. You should not need to change the current limit to do micro stepping. You only need to change the current limit if you change to a different stepper motor or change the voltage going to the VDD pin.

-Derrill

Thanks Derrill.

Thank you for doing this. It is very valuable for beginners like me.

I have a couple of questions for you.

  1. Why are you not using any capacitors for the calibration process?
  2. I have seen recommendation of a 100 uf at the Vmot. You are using smaller than than and also one for the Vdd. What are the reasons?

Thanks.

Farzad

We did not make the original post on this thread or the guide it mentions, but since the original poster might not be checking this thread regularly (his last edit was November 2013 as of this writing), I can offer some answers to your questions.

The A4988 Stepper Motor Driver Carrier product page has a note that explains why we recommend adding a large electrolytic capacitor across VMOT and ground. To summarize, it helps prevent destructive LC voltage spikes, which can exceed the maximum voltage rating (35V ) for the A4988 and permanently damage the board. These spikes can occur whenever you connect or turn on your power supply, even if you are just setting the current limit and the stepper motor is disconnected, so we recommend having the capacitor installed whenever you apply voltage to VMOT. A 100 uF capacitor should be fine in most cases; we recommend using at least 47 uF in the note on the product page that I referred to above. As for the capacitor across VDD and ground, installing a capacitor here is not as crucial in most cases, but it could help filter any noise that might be on that supply line.

-Brandon

Thanks, Brandon.

Farzad

And I have a new question.

First - I was able to run my motor for the very first time and thanks to the instructions on this forum.

Then, in the Test instructions, it looks like the MS1 is being fed 5 volts. While this I imagined would come from one of the PWM pins of arduino, it doesn’t look like it comes from any particular part. Can it be powered (HIGH) using the 5V output of the arduino?

Also, is it the intent to set the MS1, MS2, MS3 to H,L,L to configure the A4988 into half steps?

Thanks.

Farzad

If you are using the A4988, the MS1, MS2, and MS3 pins are all pulled-down internally. Assuming MS2 and MS3 are tied to ground or left disconnected, tying MS1 high will put the driver in half-step mode and leaving it disconnected or tying it to ground will put the driver in full-step mode. You can connect MS1 to a digital pin on your Arduino to control the step-mode, or tie it to either the 5V pin or GND pin (depending on what microstep mode you want) if you don’t need control over it. I am not sure the intent of the original poster, but tying 5V to the MS1 pin with MS2 and MS3 tied to ground will put the A4988 in half-step mode.

-Brandon

Thanks, Brandon.

Farzad

Hello, I have a A4988 stepper motor driver and trying to control small stepper motor with these specs - 3.75 degree, 24V, 60 ohm. The stepper motor is unipolar, 6 wires and I set them as “bipolar half winding” ie I’m using one end and the centre tap of each phase.My calculations was 24V \ 60 Ohm > 0.4A so I set the current limit of the A4988 to 0.4A, the power suply is 19V and everything looks fine. The motor run smooth, full step, half step, direction reverse is OK. The problem - when the motor stop and stall, it start overheating.I tested the motor runing about 10 min. and the temperature of the stepper motor is no more 40 - 50 degree Celsius. In IDLE with power up it start heating, and after 5 min. it is hard to tuch with finger. To be clear, I use an optoisolated breakout bord and control the driver with Mach3 via PC parralel port.
I also tested to reverse the directions of windings with no result. The motor start overheating after stop running. Any advices would be very helpfull.

Hello.

When the stepper motor is holding its position, is when it will draw the most current. If you tell me what you measured for Vref, I can verify what your current limit is set to.

The way you have your stepper motor connected to the driver with one side to the center of each coil, means that the resistance of the portion of the coils you are using is half, so it is possible that the stepper motor is drawing twice the rated current. We recommend connecting the stepper motors as shown in the FAQs on our stepper motor product pages. If you connect it like this does the motor run cooler?

- Grant

Thank you Grant.
The resistance between one end and center of the coil is 60 Ohm, the measured Vref is 0.16V x 2.5 = 0.4 A
Here is my stepper motor

The measured resistance between ends of each coil is 120 Ohm, so if I use both ends , my calculation is 24 V / 120 Ohm = 0.2 A?

I did some math based on the number you gave to find the power that motor would use:

P = I^2 × R = (0.4 A)^2 × 60 ohm = 9.6 Watts

When the stepper motor is holding its position, the power used by the motor is going to be dissipated as heat, so the heat you are getting from the motor might not be unusual. Since you are controlling it with a bipolar stepper motor driver, it is also possible that the stepper motor is drawing twice as much power because the stepper motor driver is driving two separate coils at once.

If the motor is fine when you are moving it, you might try just disabling the driver when the motor is not moving. You might also try using the whole coil on each side since the added resistance should cause the current to decrease (as your calculation shows) and halve the power dissipation.

- Grant

Thank you for the answer Grant. I was qurious why this motor generate too much heat driving it with A4988 as bipolar.When it run with its original unipolar driver with MTD1120F chip, the teperaure is no more 50 C". Is there any other parameter, may be the inductance of the coil, wich is in relation with heating? What will be happen if I lower the V mot.?

(1) I assume you are setting the motor to the same current limit in both cases. If not, that would be the main reason it is heating.

(2) Given (1), the bipolar mode will run a given current through twice as much copper. The unipolar mode will run a given current through only half the coils at a given time, so it will produce about half as much heat loss (and half as much torque.)

Bipolar also has a little more (probably insignificant) induction/ACripple/someECEconceptIdontReallyUnderstand losses because the direction is changing more.

I agree with Tomek and expect what he said to probably be the case for the additional heat you are observing.

In your case, the current limit of the driver is probably not really limiting the current of the motor since you are using the stepper motor at its rated voltage, so lowering the supply voltage will probably cause the motor to dissipate less power, but you will also get less torque from the motor.

- Grant

Thanks for the answers.