Go Down

### Topic: Stepper Motor Basics (Read 243907 times)previous topic - next topic

#### MarkT

#30
##### Feb 17, 2015, 09:09 pm
It might be more than twice I fear.  This article might be helpful, explaining torque v. speed curves:  http://www.orientalmotor.com/technology/articles/article-speed-torque-curves-for-step-motors.html

So with your load torque measurement taken, look at the graphs for the motor in question
and be prepared to also add in a safety margin on top of that...
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

#### Robin2

#31
##### Feb 17, 2015, 10:28 pm
Thanks for adding that Mark. It looks like it has a lot of useful data.

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

#### polymorph

#32
##### Feb 18, 2015, 12:04 am
Quote
the L298 does have sense resistors to limit current, check the data sheet.
It is more correct to say that the L298 has a place to add sense resistors to enable external ICs to measure and limit current. The L298 has no mechanism to limit current.

In fact, it can be used with the L297 to make a chopper stepper driver.

The advantage to this over the A4988 is slightly increased current (rated at 2A, but you can fit a big heat sink), and increased working voltage at 46V max. The saturation voltage is rather high, due to the use of bipolar transistors. On the order of up to 4.9V total (both opposite legs of an H bridge) at 2A. Plus the voltage drop across the sense resistor.

So I don't recommend it.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8

#### 1:1

#33
##### Feb 18, 2015, 03:08 pm
A simple method to get a rough measurement of the required torque.

Attach some sort of wheel or drum to the shaft that the stepper motor will be required to turn. Wrap some strong thread or fine string around the drum and suspend a small plastic beaker from it. This will obviously only work if the shaft is horizontal.

Add coins to the beaker until the weight is just sufficient to make the drum rotate. Weigh the beaker with the coins in it.

Measure the diameter of the drum where the thread is wrapped and calculate the radius. Suppose the radius in 2cm and the weight is 100grams. Then the torque is 200gm-cm.

Repeat the measurement several times and take an average. Choose a motor with perhaps twice that amount of torque to provide a good safety margin.

...R
I know it's meant for newbies - but maybe supply a link to more text that describes rotational inertia and static/dynamic friction?

Non-linearities such as static friction and backlash/dead zones for that matter can give you all sorts of headaches if you're not aware of them.

Rotational inertia also, ponderous (massive, but well lubricated) equipment will eventually get going with twice the torque rating of whatever it took to break the static friction, but you're still left with a very slow system. You might want 100 times more...   I guess steppers are by their nature speed restricted at the lower end (compared to DC/AC servos which have different limiting characteristics) - maybe the discussion is outside of your defined  context.
The XY problem:  "the over-use of one line responses that simply link though to websites that describe the XY problem"

#### Robin2

#34
##### Feb 18, 2015, 06:49 pm
I know it's meant for newbies - but maybe supply a link to more text that describes rotational inertia and static/dynamic friction?
I would be happy to do so. Have you any suggestions, or perhaps you could write a few lines yourself?

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

#### 1:1

#35
##### Feb 19, 2015, 12:12 amLast Edit: Feb 19, 2015, 11:44 pm by 1:1
I would be happy to do so. Have you any suggestions, or perhaps you could write a few lines yourself?

...R
heh - a few lines!  Sheesh, once I started I couldn't stop ...

I thought it would be useful to provide some additional advice for getting a reasonable estimate of the torque required to get something moving.

A torque is a force applied with a lever arm. In the example in Reply #29 the "lever arm" is the radius of the drum and the force is the weight hanging from the thread. The system will feel exactly the same effect with a stepper at the same rating.

Don't skip the step of using a drum or something round, using a ruler might seem like a nice idea but it will give you erroneous results as it creates it's own torque and the torque will decrease as it rotates past horizontal - by using round lever arm with string it cancels out its own effects and keeps the force vertical at all times (you can point this out once you've attracting interest in your peers and people will think you're very clever).

By doubling the rating you're going to be sure you can get the system at least moving. However there are some effects and considerations that might mean you want to go a lot higher than this, and a small chance lower.

Firstly, there are non-linearaties such as backlash, and 'stiction' (static friction). Might sound technical, but they're things you're no doubt aware of from using everyday mechanical objects. Notice how sometimes things are hard to move initially but once you get them going, they're good? Or sometimes when you turn a knob in the other direction the system doesn't change directions immediately because there is some slack in the mechanism? Well that's stiction and backlash respectively. Why mention them? Well, if you measure your torque and don't take account of them, you could under or over-estimate your rating, although it's not perfect try to make sure your system is in the state that it will be under normal operation, sometimes if a something sits for a long time, dry lubrication, thermal expansion/contraction can cause stiction effects, maybe you want to predict that it'll be there under normal operation and account for it, maybe you know that your system will be warmed up and can ignore it. Backlash is harder to account for, but know that in 99%+ cases it'll only get worse. If you cant eliminate it before measuring torque at least consider the implications, there is a small possibility you could underestimate the torque required.

Another effect that isn't so related to the initial torque measurement but certainly effects your system, is the rotational inertia of the mechanism. Twice the torque might get something moving - i.e. you will get your velocity eventually - but did you get that velocity fast enough? i.e. accelerationâ€¦  Especially relevant if you're wanting to change directions quickly. Think of a bicycle wheel, ever changed a tyre and spun the wheels in your hands to play with the gyro effect? Well, it's not quite the gyro effect I'm talking about (although that certainly is interesting stuff), but what you may have noticed is that the effect is larger when the tyre is on compared to off, that is because the wheel has a higher 'moment of inertia'.

There is more mass, 'at a distance' - sound familiar?

Yes, just like torque!

You may have also noticed it was harder to start and stop spinning? (i.e. it took longer). This is the effect a stepper will have to deal with also. Double rating might not cut it

That being said, for many applications in the world of hobby/arduino/desktop robotics, inertia analysis is overkill as the parts you're moving will likely be mated with over-spec steppers from word go and friction might be the over-ruling factor anyway. But it's nice to get an initial appreciation of it's effects.

As a final word, keep in mind you experience torque, inertia, friction and backlash in the world around you often (steering wheels, can openers, bicycles, door handles etc.) - if all this sounded too technical then just let your intuition guide you.

(edited after a few suggestions from Robin)
The XY problem:  "the over-use of one line responses that simply link though to websites that describe the XY problem"

#### marco1990

#36
##### Feb 19, 2015, 12:29 pm
Hi Robin,
I use your code for driving my stepper motor. I attached here:

byte directionPin = 2;
byte stepPin = 3;
int numberOfSteps = 2000;
//int pulseWidthMicros = 20; // microseconds
int millisbetweenSteps = 25; // milliseconds

void setup() {

Serial.begin(9600);
Serial.println("Starting StepperTest");

delay(2000);

pinMode(directionPin, OUTPUT);
pinMode(stepPin, OUTPUT);

digitalWrite(directionPin, HIGH);
for(int n = 0; n < numberOfSteps; n++) {
digitalWrite(stepPin, HIGH);
// delayMicroseconds(pulseWidthMicros);
digitalWrite(stepPin, LOW);

delay(millisbetweenSteps);

}

delay(3000);

digitalWrite(directionPin, LOW);
for(int n = 0; n < numberOfSteps; n++) {
digitalWrite(stepPin, HIGH);
// delayMicroseconds(pulseWidthMicros);
digitalWrite(stepPin, LOW);    delay(millisbetweenSteps);
}
}

void loop() {
}

My problem is to obtain the angular velocity of the shaft. If my millisbetweenSteps are 25 is correct to take the frequency equal to: f = 1/0.0025 Hz?

Thank you so much Robin

#### ShapeShifter

#37
##### Feb 19, 2015, 01:42 pm
If my millisbetweenSteps are 25 is correct to take the frequency equal to: f = 1/0.0025 Hz?
You've slipped the decimal point one place f = 1 / 0.025 or 40 Hz.

That's the step frequency. The revolutions per second is the steps per second, divided by the steps per revolution: Assuming 200 steps per revolution, that is 40 / 200 or 0.2 revolutions per second. Divide that by 60 and you get revolutions per minute or 0.00333 RPM.

To get angular velocity (degrees per second) take revolutions per second, and multiply by 360 degrees per revolution. So, with 25 ms between steps, and 200 steps per revolution, that gives 72 degrees per second.

#### Robin2

#38
##### Feb 19, 2015, 02:22 pm
Thank you so much Robin

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

#### Robin2

#39
##### Feb 19, 2015, 03:10 pm
Sheesh, once I started I couldn't stop ...
Thanks very much. I sent you a couple of PMs so as not to confuse stuff here

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

#### 1:1

#40
##### Feb 19, 2015, 11:49 pm
Thanks very much. I sent you a couple of PMs so as not to confuse stuff here

...R
Maybe once it's all settled - start a new post, than ask a mod to lock and sticky it ?
The XY problem:  "the over-use of one line responses that simply link though to websites that describe the XY problem"

#### CoffeeMan

#41
##### Feb 20, 2015, 10:51 pm
Hi everyone,

First of all thank you for being such a community.  I started working on a project that will need an arduino and so i thought i would try to figure it out myself. Seeing how much is posted here, I don't feel entirely alone on this quest.

To make this project work I bought:
- Arduino Uno
- a 5.5A/4.6Nm stepper motor
- a Power Microstep Driver (with a range of 3.8 - 8.0A)
- and finally a PSu with a max output of 24VDC & 6.25A

I keep running into the same problem - every time i run a script and initiate it on the hardware, the stepper makes a single step, then the red Alert light on the Driver pops on.

I have tried a number of skripts, redoing the wire configuration, & messing with the SW switches.  I can't think of how to tackle this problem - has anybody else ran into this?

Any advice will be EXTREMELY appreciated.

Thanks Again!

#### polymorph

#42
##### Feb 20, 2015, 11:07 pm
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8

#### Robin2

#43
##### Feb 21, 2015, 11:35 am
Agree with @polymorph.
It would be a big help if others would NOT respond to @Coffeeman here as it will just confuse the purpose of this Thread.

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

#44
Will do. thanks

Go Up