Stepper Motor Calculations

From A Quick CNC Wiki
Jump to: navigation, search

There are several different equations that you should know in order to setup your machine properly. If you don't want to go through the work of figuring out the numbers you must use, here is a quick reference table with information on what our machines come setup as standard. (These settings assume you are not using the Microstepping feature of our electronics).

Axis Motor Steps Per Revolution Leadscrew Revolutions Per Inch Steps Per Inch Clock Speed
X
200
5
1000
3.3 KHz (at 200 IPM)
Y
200
5
1000
3.3 KHz (at 200 IPM)
Z
200
12
2400
2 KHz (at 50 IPM)

Steps per Inch

The standard calculation used by Mach3 and other CNC control software is the number of steps per inch. That is the number of steps your motor must turn in order for your machine to move 1 inch on any particular axis. This equation is dependent not only on the stepper motor your choose, but the type and size of leadscrew. This equation also takes into account microstepping, which allows your motors to move a fraction of a step (usually with less power).

Equation 1: Calculating Steps per Inch

The first coefficient is the number of turns your leadscrew must travel to move an inch, the units are revolutions per inch. The next value you must input is the number of microsteps your electronics are configured for. This will be a unitless number that will be a fraction of a fraction (a whole number). If you are not microstepping, just leave the value as 1. Finally you need to know the number of steps the stepper motor will turn in order to go one full revolution. For help calculating that value, please see Equation 2.

Example 1: A leadscrew with 5 turns per inch, with 1/8 microstepping, and 1.8 degree per step motor (200 steps per revolution, see Example 3).

Example 1: Example of a Common Setup

Steps per Revolution

The stepper motor will play a factor in the above equation. This will depend on the type of stepper motor you select. Some motors can be odd, and move in different amounts for each step. This equation is helpful in determining how many steps your stepper motor requires to move one full revolution. Typical stepper motors are 1.8 degrees per step, which is 200 steps per revolution.

Equation 2: Calculating Stepper Motor Steps per Revolution

Example 2: Some stepper motors are able to move in very small increments. In this example, it moves 0.9 degrees per step or 400 steps per revolution.

Example 2: Example of 0.9 Degree Stepper Motor

Example 3: Most stepper motors, including the ones we sell, move 1.8 degrees per step, or 200 steps per revolution.

Example 3: Example of 1.8 Degree Stepper Motor

Steps vs. Frequency

When setting up Mach3, you must specify the clock speed that the system must send pulses out at to ensure your machine moves a specific speed. Setting the clock speed too low and your machine speed too high can have a huge negative effect on machine performance (missed steps, limited speed). This clock speed is governed by the number of steps the motor must turn to move the machine an inch, and the maximum top speed the machine will obtain in inches per minute. (It is also governed by your computer speed, and the allowable speed of your electronics! You must test your computer while running the Mach3 Drivertest tool, see: Testing Computer Speed).

Equation 3: Finding Kernel Speed, Steps per Second.


The first coefficient is the desired speed in inches per minute. This can be an arbitrary value, or a number that has been found through Stepper Motor tuning. Some machine speeds will be limited by the style of drive mechanism (leadscrew or belt) and the friction on the system. This number will be found through lots of trial and error. The second coefficient required will be the number of steps the motor must turn for the machine to move an inch. This value can be found using Equation 1. The answer will be the number of steps (or pulses) required to move the machine at the top speed. It can be given in Hz, or KHz (by dividing by 1000).

Example 4: If we want our motors to travel at a maximum rate of 200 inches per minute, and our step per inch rate is 8000 (see Example 1) our Steps per second can be found as 26.7 KHz.

Example 4: Finding steps per second for a given speed and step rate.