How to set Steps Per Unit values?
This is a short tutorial on how to correctly set Steps Per Unit values for your CNC machine.
Steps per unit value (in further text as SPU) defines how many steps will stepper motor have to
make in order to move the axis for distance of one unit. Units can be in millimeters or in inches.
Stepper motors usually have 200 or 400 full steps per one rotation of its shaft.
One rotation of shaft in degrees is 360°. For motors with 200 steps per revolution this means
one step is equal to 1.8°. For motors with 400 steps per revolution this means one step is equal to 0.9°.
In equation below, we will name this parameter M
With micro-stepping we improve motors resolution, accuracy, smoother movements, we reduce
resonance problems etc. The real compromise is that as you increase the number of micro-steps per
full step the incremental torque per micro-step drops off drastically. Resolution increases but
accuracy will actually suffer.
With micro-step number we define, how many smaller steps is one full step divided into.
Most common values are ½ , ¼ , ⅛… but it is really up to you which micro-step value you will use.
In equation below, we will name this parameter S
Usually CNC machines operate with the help of lead screws and nuts. They can be trapezoidal or
ball screw leads. The pitch of a screw thread is the distance between adjacent threads. When lead
screw is rotated for one revolution, this reflects as linear motion of axis. Distance traveled is equal
to lead screw’s pitch.
In equation below, we will name this parameter P
(Some CNC machines use rack and pinion instead. Distance traveled when pinion makes one
revolution can also be considered as pinion pitch. Similar is also true for toothed belt drive.)
SETTING SPU VALUES OF YOUR MACHINE IN CNC USB SOFTWARE
When we are defining correct SPU values for our machine, we can start from two different initial conditions.
If we know all variable values it’s no problem to calculate correct SPU value.
Correct SPU value = (M*S)/P
If we don’t know all variable values we will have to do some measuring and provide ourselves with
some numbers. Then we will be able to calculate correct SPU value.
We use metric units so our unit is millimeter. If you use imperial units (inches) then values are different.
1) In Settings/Axes/Setup we set our SPU value to some “normal” number, say 200 steps per unit.
2) We jog our machine to suitable location, and set Offset-Current XY . We want to move
X axis from our offset zero position to X=10 position. To measure the distance of machines travel, we can use ruler,
caliper or measuring tape which we place under machines tool.
3) Tool should start at 0 on the ruler.
In MDI window, we enter X10.
Machine should now move from X=0 to X=10, therefore travel for 10mm.
When we execute MDI command we can see that machine travled for 2.5mm instead of 10mm:
Meaning, our current SPU value moves machine axis for wrong distance.
We can ask ourselves:
If ‘Current SPU’ value, moves X axis for ‘Measured distance’ value, what is the ‘Correct SPU’ value
that will move X axis for ‘Entered distance’ value?
4) Equation looks like this:
Correct SPU value = ( Current SPU value * Entered distance value ) / Measured distance value
Current SPU = 200
Entered Distance = 10
Measured distance = 2.5
Correct SPU value= (200*10)/2,5 = 800 SPU
Now we enter correct value for SPU in Settings/Axes/Setup, Enter X10 in MDI window and measure the new distance value.
Measured distance value is now correct. Our steps per unit are correctly set.
It is recommended to repeat this procedure several times and use largest possible travel. Using 10mm travel is good for first pass but if you use maximum possible distance machine can travel, you will obtain much better results.