Go Down

Topic: Setting current limit using NEMA17 + Pololu A4998 (Read 898 times) previous topic - next topic

sidlauskas

Hi everyone,

I am trying to set a current limit for the stepper motor (full step mode), but not sure if this is the right way I am doing it. I just want to be sure that I get everything out of this motor that i can.

I use LDO-42STH47-1684AC stepper motor and the specifications of this motor can be found here: http://i00.i.aliimg.com/img/pb/573/914/609/609914573_464.jpg

Stepper motor I use have a maximum current rating of 1.68A/phase. In full step mode, the current through the coils is limited to 70% of the current limit, so to get a full step coil current of 1.68A, the current limit should be 1.68/0.7 = 2.4A, which corresponds to a VREF of 2.4A/2.5 = 0.96V

I used potentiometer on the board to set a VREF to 0.96V and I checked it from the + probe on the turnpot and - on a ground pin with multimeter.

Is the right way of setting the current limit?

Robin2

The Pololu web page for its A4988 explains the process of setting the current limit.

The simplest way is to measure the voltage at the reference pin and adjust the potentiometer according to the formula they give Current Limit = VREF × 2.5

In that case your calculations should use 1.68 amps as the current limit.

If that is set correctly and if you measure the current in a coil while the motor is powered but stationary it should be 1.68 * 0.7 = 1.176 amps.

Be very careful not to disconnect the motor from the driver when the driver is powered up. You will instantly fry the driver.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

sidlauskas

The Pololu web page for its A4988 explains the process of setting the current limit.

The simplest way is to measure the voltage at the reference pin and adjust the potentiometer according to the formula they give Current Limit = VREF × 2.5

In that case your calculations should use 1.68 amps as the current limit.

If that is set correctly and if you measure the current in a coil while the motor is powered but stationary it should be 1.68 * 0.7 = 1.176 amps.

Be very careful not to disconnect the motor from the driver when the driver is powered up. You will instantly fry the driver.

...R
And how to measure the current in a coil?

rpt007

1. switch all power off
2. disconnect one end of one coil and connect it to your Multimeter (amp/ current measuring mode)
3. connect the second wire of your multimeter with the driver (where the wire to the motor was before)
4. select the range your max current is expected (e.g. If you expect 1.2A, select 2A range)
5. power your arduino, driver and test
Before you ask:
Did you really read and understand How to use this forum ?
AND:
Do you have already some solution or is a part of the problem sitting in front of the screen?  :)

Chagrin

In all seriousness, run the motor for a while then press your finger on it. If it's too hot to hold your finger on it for a few seconds then you have too much current. And of course if the motor feels quite cool and it's still capable of powering your project then there's no need to increase the current.

The maximum current rating is all about the heat tolerance of the motor. Too much current and it gets too hot and starts burning the insulation on the windings.

MarkT

You can also measure the power from the supply (VI), and compare to the power the motor expects (I-squared-R) - expect something like 60  to 80% efficiency in the A4998.

For instance if motor is 2 ohms and 1.5A, then it ought to get 4.5W, so with a 12V supply you
might expect around 0.5 to 0.7A drawn from the supply.

If you want to measure current in the winding you have to step one step at a time till the highest
reading is obtained, that's the current amplitude.  You also have to rig the multimeter properly with
screw terminals or croc-clips so you can't accidentally break the circuit and push inductive spikes back
at the driver.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Robin2

And how to measure the current in a coil?
It is not really necessary to do that.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

rpt007

@Chagrin:

Quote
In all seriousness, run the motor for a while then press your finger on it.
I like your pragmatic engineering approach :-) !!
Was close to give a similar answer below but then I remembered having been corrected by some precisely calculating physicists, that this is not the way to solve such a problem.

Next time I will be an engineer again ...
Before you ask:
Did you really read and understand How to use this forum ?
AND:
Do you have already some solution or is a part of the problem sitting in front of the screen?  :)

Robin2

Next time I will be an engineer again ...
Back in the day when car engines sometimes overheated I had a simple philosophy. If the temperature gauge stops rising things will be OK.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

sidlauskas

I have one more question to you guys. Right now I use AccelStepper library to control the stepper motor and it works great except that the motor skip steps on higher speed & acceleration rates. What could be the reason of that?

The motor won't skip steps only on very slow speed/acceleration rate like in this example: http://www.airspayce.com/mikem/arduino/AccelStepper/Bounce_8pde-example.html

But it starts skipping them when I set maxSpeed and acceleration to 500.

BTW. The motor won't skip steps at that speed without acceleration.

Robin2

except that the motor skip steps on higher speed & acceleration rates. What could be the reason of that?
I don't think you have told us what power supply you are using (volts and amps).

Generally speaking higher voltages facilitate higher speeds.

If you have max speed at 500 and acceleration at 500 does that mean that it goes from 0 to max speed instantly? If so that would partly explain the problem.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

MarkT

#11
Jun 27, 2016, 09:59 pm Last Edit: Jun 27, 2016, 10:00 pm by MarkT
Steppers always(*) skip if you try to drive too fast or accelerate too fast.  The mechanical load
is a strong controlling factor so you have to measure the maximum speed and accelerations
that allow reliable operation.  Little thing called the laws of physics at work there.

(*) Having said that I have an ultra-miniature (6mm diameter!) stepper than can go from 0 rpm
to 2400 rpm instantly, but its moment of inertia is many orders of magnitude smaller than even
a 28BYJ-48....
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

sidlauskas

Steppers always(*) skip if you try to drive too fast or accelerate too fast.  The mechanical load
is a strong controlling factor so you have to measure the maximum speed and accelerations
that allow reliable operation.  Little thing called the laws of physics at work there.

(*) Having said that I have an ultra-miniature (6mm diameter!) stepper than can go from 0 rpm
to 2400 rpm instantly, but its moment of inertia is many orders of magnitude smaller than even
a 28BYJ-48....
How I can calculate those maximum speed & acceleration rates? Or I should just try different rates combinations and find which works best?

Robin2

I don't think there is any alternative to experimentation - unless you are super good at engineering maths.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

MarkT

There are far too many factors to calculate other than very roughly, its not like a DC motor with
a single torque/current ratio.  Resonance and winding inductance are both big issues here.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up