Did I calculate this properly?

Hey guys, I just received my stepper motor and A4988 motor driver in mail, and now I'm trying to set the adjustable resistor on it. I came across this instructable which says to do this:

"To prevent damage to the driver chip, it uses circuitry to limit the maximum current that can be used. This is set via the adjustable resistor on the board, in co-operation with some of the other components, the sense resistors (S1 and S2) and the resistor (R1). As different drivers may have different components (especially generic Chinese imports) its best to check these values before continuing.
For my stepsticks S1 and S2 are marked 'R10' and R1 is marked '303' (in very small writing !). These correspond to 0.1Ohm for S1 and S2 and 30kOhm for R1. The trimpot should be 10kOhm
According to the A4998 datasheet, and substituting those values, gives
VREF max = (TrimpotMaxR/(TrimpotMaXR+R1)) x VDD = (10,000 / (10,000 + 30,000)) * 5 = 1.25V
ITripMAX (effectively max motor current) = VREF / ( 8 x Sense_resistor) = 1.25 / ( 8 * 0.1 ) = 1.5625A
To calculate amps from measured VREF: A = VREF / 0.8
To calculate VREF required for a target current: VREF = A * 0.8
As my stepper motors are 2.0A, I can't get maximum current from this driver, however,if I drive them at 70% (2.0A x 70% = 1.4A) I want to a VREF of 1.4A x 0.8 = 1.12V, plus driving them at 70% will reduce the temperature of the stepper.
I start with the trim pot turned anti-clockwise, and measure the voltage with my multimeter between the logic Gnd pin and the centre of the trimpot itself, slowly turning it up until I get just under 1.12V"

I tried to calculate it, but there's some things I'm not so sure about. For example, this equation "VREF max = (TrimpotMaxR/(TrimpotMaXR+R1)) x VDD = (10,000 / (10,000 + 30,000)) * 5 = 1.25V", what does the VDD mean? He said somewhere before this he was using a 12v 2a wall wart, is it the logic power then(from my arduino)? Also, he says his sense resistors are marked 'R10' which corresponds to .1 ohms, but mine say 'R100' and googling it says it means .1 ohms too. That can't be right, can it? Any ideas anyone?Thanks.

Motor:

  • DC2.52V 0.9A 1.8 degrees /STEP
    Motor driver:
  • S1 and S2 resitors are marked 'R100'
  • and the R1 resistor is marked '303'
1 Like

If you have Pololu's driver, then follow Pololu's instructions and video.

"Instructables" is among the worst places to look for advice.

I saw that, but I noticed that mine looks a little different than the one they show, would that change what I have to do?

If you have some other A4988, then please give us a link to that, not to the Pololu one. We can't give advice for unknown devices.

The ratio of voltage to current is set by the feedback resistors chosen by the module manufacturer. Polou chose a different value to the one suggested by the A4988 datasheet, so most everyone else uses a different resistor. A photo of the unit showing the markings on the two largest resistors on the board may help identify the correct ratio. But a datasheet or product page is better.

I got mine from here:http://www.ebay.com/itm/282170797928?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

I linked a picture of the top at the bottom

What do you guys think? Should I do what Pololu says, or what the instructable says?

The ebay listing doesn't say enough to let us know what the setting is.

However your photo of the module is clear enough to show the current-sense resistors are labelled "R100" That is probably 0.1 Ohms. (You can check with a multimeter but measuring resistances that low is not easy. Just check that it's not 100 ohms and I'm looking at the wrong resistor.)

The datasheet for the A4988 says the current limit is equal to the reference voltage divided by 8 times the resistance. So for 1 volt on the reference pot, you will get 0.8A max output current. 1.25V will give 1A.