# Electronic – Why do we need a ramp for stepper motor

motorstepper motor

I am a newbie and trying to understand how i can run a stepper motor. The concept i had in mind was that steppers need digital pulses to run, and i tried it out too. I was able to run the stepper i am using very easily. But lately I came across a link where they have used a ramp for starting a stepper justifying it by saying that

"if we try to start the stepper motor with fast pulses then it just sits there and hums away not turning, We need to start the stepper off slowly and gradually increase the speed of the steps (ramping up)."
Source:http://www.societyofrobots.com/member_tutorials/book/export/html/314

My question is why does the stepper then starts up with regular square pulses? Why do we need a ramp? All the other forums and tutorial always talk about providing digital pulses to the stepper for starting it up, why is the concept of ramp generation not discussed there? Is it a bad practice to run stepper with digital pulses?

When the controller steps the motor, the rotor has to move far enough (angle) that when the next coil (or coil pair) is energized it will pull the rotor in the correct direction. If the rotor has not moved through enough angle, then the coils will pull the rotor backwards and the motor just sits there and buzzes. You can find many illustrations and animations online that explain how normal operation works- imagine if the rotor only moved a fraction of the intended amount.

The rotor, shaft, and whatever is connected to the shaft all have inertia and there is friction of various kinds.

The maximum speed the stepper can turn the shaft is related to the torque available from the motor and the torque required to turn the shaft (available torque drops as RPM increases, and the required torque generally increases as the RPMs increase). That's not directly related to the inertia.

To actually get to the maximum (or some fraction thereof) you can only accelerate the RPM so fast without missing steps. The maximum acceleration is related to the inertia and the excess available torque at a given RPM. If the motor is doing all it can just to keep up with the current RPM then you can no longer accelerate. If the RPM are low enough, you don't need to ramp it up, you can simply tell it to step, but that will typically be only a fraction of the RPM the motor is capable of. Often linear ramps are used for simplicity, but a more convex curve would be optimal.

Here is a motor torque curve from Oriental Motor (a major Japanese maker):

To predict the maximum rate of acceleration you need to know the torque and the mass moment of inertia. If you exceed the maximum rate of acceleration at a given loading then the motor will lose steps, so a reasonable safety margin is a good idea.