Step Calibration

I can't calculate the steps for my cnc machine , I looked at several examples and each one came up different and was wrong .If I tell the machine to move 20mm and it moves 5mm ,my driver is a A4988 set at .25 steps ,then reset the previous value and run again, it either is waaaay off or just wrong , what is the actual formula to calculate the steps for X,Y,Z ??

With GRBL there are steps and then there are “STEPS”

You need to access the FIRMWARE settings.
Most GRBL CNC programs will allow you to do that and modify the steps for the actual RESOLUTION.

So if yours is currently 50 it would need to be 200.
Different steppers have different resolutions and it is not the A4988 that deals with the aspect you need to change.

There are lots of tables and formulas out there to get it exact that depend on the model of stepper to do what you want.

Heads up most GRBL firmware settings need you to move to the next setting before you save them in the software.

This page gives you a good run down.


ps. I have a couple of steppers for which there was no exact model number so I simply upped the steps until I got what I needed and cross checked that with a digital vernier.

Well Bob I think my problem is with the steps traveled ,for example if I put the machine to move 20mm and it moves say 9mm then its not meeting the recommended request , as for speed that I can play with to get the speed im looking for depending on the part being cut .Now for me to put the machine setting for say $100=(X) at 640 my motor will Jam and make a high pitch sound which means to me its over clocked to produce that type of output .I hope you were able to see my UGS settings

I cannot see any settings attached.

There are a few parts to UGS settings and it is worth getting to know them all.

Besides the steps that are set in GRBL (not the driver itself) you also need to set $100 to $122.

If it starts to whine then you may have the acceleration factors and max rate wrong.
Reduce them by half to see if that helps the noise.

It is not unusual for steppers to whine a little but stalling is a different matter.
Did you set your driver voltages correctly too ?


Alright , well Bob, my setting are the same as in the link you sent me , and my voltage for the stepper driver is .95 v GRBL 1.1 standard nothing setup or changed , and the reason is that when I apply the calibration I get a jam on the motor now perhaps my $130 is to high or perhaps my $120 , either way I have much more reading to do b4 I can understand how to manage this new interest .

Thanks again Bob


Those settings are DEFAULT only and may not apply to all set-ups.
Take your time and play with them so you understand them better.

Also if you are using a program that allows you to save the settings to a file rather than the Arduino etc. then make a back up.
I have 3 sets that I load depending on the work I am doing from almost ultra slow to go like a bat out of hell.


Thanks again Bob for your assistance ,so its back to school after 30yrs lol

No idea what you are talking about. You will have to provide context.

Looks like one of those odd ball maths questions !


Is that..



Which gives different answers !
Calculator ??

200/1.25225.4=8128mm or 8.128mm??

Neither is correct.

200/1.25225.4 does not equal 8128mm or 8.128mm because for the result to be in mm one of the numbers to the left would have to be in mm as well, which none of them are. You may ask well as if 200/1.25225.4 = 8128 nano parsecs, which it also does not.

200/1.25225.4 = 8128

Rodger please try to keep your GRBL questions to the same thread rather than peppering them around.

As I explained before jumping numbers and especially "8.128" to "8128" in the parameters is not a good thing.

Use smaller increments to ramp up the parameters.

If you persist in peppering the same topics I will have no option but to mute you for a while.


Quite so:

Installation & Troubleshooting
For problems with Arduino itself, NOT your project

Merging across forum section involves some effort - often it's just simpler to delete misplaced posts, especially if they're from repeat offenders.

Thanks AWOL.

@Rodger I will be following AWOL's advice in future and simply deleting related posts thrown randomly around.
At this point it is incumbent on you to learn to use the forum a little better.


Oh Sorry Bob ,I didn't realize I need to keep in the same thread , OK so for X$110 1600 should be alright ill try that when i get home , so how do you calculate that number I really don't like not knowing what I should already know is there a course I can take to know this stuff better I don't know how many times I read and re-read the same stuff and not know where to get the answers .

Oh Sorry Bob ,I didn't realize I need to keep in the same thread

Hello Roger,
As someone who answered your question:

I have a setup that im not sure about , here is my question :- 200/1.25225.4=8128mm or 8.128mm??

All I saw was a random question with no context and no background so I answered as asked. I thought it an odd question but I had no idea that it was part of this discussion. By doing what you did when the question is part of an ongoing discussion you just caused confusion and probably didn't get a helpful answer.

Obviously ( :confused: ), if you want to discuss a new subject then start a new discussion.

There is no simple "course" for most of this.

there are calculations A plenty around the internet but I found a lot of them confusing for new people starting out.

In most instances it is as already said.
Get the steps right for the travel first even if it is slow.
If you call up 10 mm make sure it does 10 mm even if it take a few minutes to get there.
Do that for each axis
If motors match then quite often it is just replicate the number on the following two axis.

ONLY and I do mean ONLY when you have that can you play with the other params.
AT this point you know the travel is correct so you will not touch those again.

Now you can play with max rate.
Again start small and increment small. For the most part you can ignore decimal points here as I have never had to use those.

When you are happy with those results then finally you can move onto acceleration and IGNORE the max rate.

So you will be doing this in three seperate stages. each one will help you tune the next.
If at any point you encounter a whine or issue that is unacceptable then you may occasionally reduce the other params. But do so in small amounts.

Steppers will for the most part always have a "small" amount of whine by thier very nature.


Alright Bob I know my steps/mm are correct I think you showed me how to do that , but when I try to send a test like G0 X508 F100 it moves perhaps 2 or 4 mm , this is how I calculated the result 200/1.25 multiplied by (1/2 steps driver)=320 multiplied by 25.4 = 8128 ,now when i put in incremental values like 1300 for Max Rate $110 at times ill get Alarm 23 or Alarm:24 or check Door ,and other times instead of the X axis moving the “Y” axis will move to the positive side very slow .

I attached my setting perhaps you can see whats wrong because I sure cant see it .

Thanks Again Bob

GRBL5.txt (1.59 KB)

Be a little while before I can compare against mine but right now you have the max travel all set to 200 while you told it in your post above to move 508 mm.
I can see that causing an alarm as you told it to move more than it thinks it can.

Once again dont try bug numbers to play with as you will get problems.
What is the spec of your machine travel wise ?
As a temporary set of numbers make the max travel 5 mm less that the machine actually has.
Then when trying moves stay below those numbers from absolute zero.

BTW you should not need to specify the feed as most of the programs I use will accept a simple G0 Xnn etc.
It will default to the max feed rate already set in the params.

Also your X axis ( $100 ) and ( $110 ) look much too large.

My settings below as a quick visual ONLY Note that these are from a machine that uses an oddball X stepper

"$0", "value": "10"
"$1", "value": "25"
"$2", "value": "0"
"$3","value": "0"
"$4","value": "0"
"$5", "value": "0"
"$6","value": "0"
"$10","value": "1"
"$11","value": "0.010"
"$12", "value": "0.002"
"$13","value": "0"
"$20","value": "0"
"$21","value": "0"
"$22","value": "0"
"$23","value": "0"
"$24","value": "25.000"
"$25","value": "300.000" << LOWER than default
"$26","value": "250"
"$27","value": "1.000"
"$30","value": "1000"
"$31","value": "5" << Used with minimum laser power for targeting
"$32","value": "1" << Laser enabled but not used with relay control of spindle (allows me to quick change)

"$100","value": "1600.000" Stock stepper twin lead 8 mm
"$101","value": "1600.000" Stock Stepper twin lead 8 mm
"$102","value": "600.000" NON STD Stepper with NON STD lead.

"$110","value": "600.000" NON STD used as a rough travel speed match
"$111","value": "500.000" Stock STD
"$112","value": "100.000" Set slower for small <1.5mm bits to prevent breakage

"$120","value": "25.000" Going much more than this causes my machine to whine quite a bit 
"$121","value": "25.000" Going much more than this causes my machine to whine quite a bit
"$122","value": "10.000" Deliberatly kept lower to avoid tool damage in fine bits

"$130", "value": "300.000" My max X
"$131","value": "260.000" My Max Y
"$132", "value": "50.000" I have 90 mm but only choose to use 50mm

Ok the reason why I put 508 is because if I put 20 then I guess that would be in inches when im using mm and as for $100=8128 I got that from the formula ,such as 200/1.25225.4 =8128mm ,im using half step revolution on the driver setting ,also I thought the feed was necessary to tell the machine so that the motors have times to build up speed ,now if my calculations are wrong ,where is it wrong and what is the right calculation .That would explain why when I tell the machine to move say 508mm(20") it moves 3mm

Ok I see my mistake since im setup in mm then 20 would be in mm not inches so no conversion is necessary , and you say that 8128 is kinda high but my lead screw is 1.25 with a 1:1 ratio with the motor and a 1/2 step on the motor driver now is that wrong Im confused .

Thanks Bob much appreciated

We have mentioned at least twice the need for your stepper motor specs and are they all the same ??
These allow us to look up exactly what you are trying to do for travel distance.

Are you using lead screws or belts ? (please don't say belts its been such a long time since I had to do those things)
All screw here and all metric pitched mostly 8mm twin starts which is why I am at 1600 for $100 & $101.

As for the other params it is always worth starting at half the defaults to begin with and ramp up.
You have a couple of links to the defaults page if you come unstuck.

I see you are working in both imperial and metric.
Better to stick to just one and avoid the conversions. It can be done but more often it is easier to do one or the other and not try to do both in the same breath so to speak.

As I think I said earlier don't try to do all 3 axis at once...
Just get one axis sorted out.
the rest will seem simpler after that.


PS the reason a lot of people have problems using the PRUSA calculator is that it does not ask for how many lead starts you have on a lead screw. Also vital information. It is up to you to determine that and pre apply a calculation of X1 or X2 or X4 etc. It defaults to X1. That often leads to only half or quarter travel. But if you measure your actual travel it is then easy to deduce what you need to do.