GRBL Steps Per Mm - How To Fine Tune Your Settings

Do you have an initial set of values for your GRBL steps per mm settings? Are you ready to refine those settings to get even more accuracy from your machine? If so, this post is for you. If you do not have an initial set of GRBL steps per mm settings, no problem. Click here to generate your initial steps per mm settings.

Once you have an initial set of GRBL steps per mm (step/mm), we can begin to really fine tune the machine. Again, If you have not calculated your initial settings, click here. The method described below requires the settings be pretty accurate. We don’t want the machine to move 2 inches when we tell it to move 1 inch. We might break our measurement tool.

What You Need

Before we go any further, you will need to have a dial indicator for this. I use the one shown below. It’s a low cost basic setup that will get the job done. You can find fancier more expensive indicators and bases.

Dial Indicator with Magnetic Base

Almost any dial indicator will work. If you have one already great, use that. I found that dial indicators with at least 1 inch of travel work best for this tuning process. Indicators with less than 1 inch of travel make the measurement distance too small. This causes the math below to be more complicated and sensitive to tiny variations in the indicator readings.

There are other ways to do this without a dial indicator but those involve machining a part and then measuring the part. Given the iterative nature of this process, it will take significantly more time.

Introduction

The goal is to tweak the GRBL steps per mm settings (step/mm) for each axis independently.

For example, my initial calculated settings were the following:

$100=314.960 (x, step/mm)

$101=314.960 (y, step/mm)

$102=78.740 (z, step/mm)

You can see how I calculated those by clicking here.

Once I finished the process of tuning each axis, the new settings were…

$100=316.220 (x, step/mm)

$101=315.361 (y, step/mm)

$102=79.136 (z, step/mm)

As you can see the settings are not significantly different. Nonetheless, I have noticed an improvement in accuracy of the machine. That is when I design a part in CAD to be 2 inched long, the finished machined part is much closer to 2 inched than before I made these updates.

Overview

1.   Record the current GRBL settings

2.   Tune one axis at a time

3.   Set the dial indicator parallel to the axis you are tuning

4.   Zero the dial test indicator

5.   Zero the axis on the machine controller

6.   Jog the machine 1 inch

Caution –  Ensure you do not reverse direction of travel between zeroing the indicator and jogging the machine. This will cause the backlash of your machine to be included in the measurements and will cause problems.

7.   Read the dial indicator to determine the actual travel of the machine

8.   Adjust the GRBL steps per mm (step/mm) setting using the formula below

9.   Confirm the GRBL settings were updated

10. Repeat the test starting at step 3 to confirm the new settings

How to Do It…

The first step is to record the current GRBL settings of your machine. If we make a mistake we can go back to these and start again.

This is done by powering on the machine and once a connection is established with the Arduino, type $$ into the command window of Universal Gcode Sender. This will print the current GRBL settings in the display window. Using the mouse cursor, highlight these settings and copy them to a .txt file. I am running Windows so I us Notepad.

Next, I set the dial indicator on my machine so I could measure the movement of the x-axis. See the picture below of the configuration I used for the measurement. Depending on the size and configuration of your machine, your setup may be different. Notice, I do not have the dial indicator contacting the spindle. I did this intentionally. The spindle is round and does not make a good contact point for the end of the dial indicator. Instead, I used a flat part of the mill head. This works because the spindle and head move together. The key is to get the dial indicator set parallel to the axis which you are tuning. We only want to tune a single axis at a time.

Once you have the dial indicator setup, jog the machine so that the dial indicator reads 0 with at least 1 of available travel remaining. I find it’s easier to jog the machine to zero the dial indicator than to turn the dial face because that tends to move the setup. Next, click the X zero button in Universal Gcode Sender (UGS) and then jog the machine 1 inch in the same direction using the machine control software. Confirm the digital read out shows the machine moved 1 inch.

Note – It is important that you move the machine in the same direction that you were going when you found the zero on the dial indicator. We don’t want to jog in the positive and negative direction to set the dial indicator to zero. This can cause the backlash in the machine to affect your measurements. You could end up chasing your tail.  Not fun!

Where to zero your x axis in Universal Gcode Sender (UGS)

Machine Control Tab – Universal Gcode Sender (UGS)

In theory, having just told the machine to move 1 inch, the dial indicator should also read 1 inch. If it does, great you machine is perfect. You are done, no need to read or do anything further.

If not, then you will need to see how much the dial indicator actually reads.

In my case, the indicator read .997” which tells me, the machine traveled .003 inches less than expected. Therefore, I need to increase the number of steps/mm. You may be asking how do I know how much to change the steps/mm setting?

There is a simple formula for that…

Updated Steps/mm = (Current Steps/mm) x (Commanded Travel) / Dial Indicator Reading
Current Steps/mm – The current GRBL settings
Dial Indicator Reading – The actual distance traveled by the machine
Commanded Travel – The distance the machine was told to move form the computer interface
Updated Steps/mm – The new value you enter into GRBL

This can be further simplified if you always command the system to move 1”.

Then the formula becomes…

Updated Steps/mm = (Current Steps/mm) / (Dial Indicator Reading)

I realize this is might be counter intuitive, it was to me until I took a step back and thought about what was happening. If your actual measurement from the dial indicator is less than expect, it means you need to increase the steps per mm setting. Your machine controller gets a command in distance and then calculates how many steps to turn the stepper motor. GRBL uses this step/mm setting to make that calculation. If this value is smaller that needed, fewer steps per a unit distance, then the calculation will say it takes fewer steps to move the desired distance.

It can take a few minutes to wrap your head around. Feel free to experiment with different settings on your machine. You can always change them.

This is an iterative process and I had to do this a few times until I could get repeatable results. Once you have the new GRBL steps per mm value from the equation above, update the GRBL settings.

For the X axis, this is done in the command prompt of Universal Gcode Sender by typing $100 = “the new value” without the quotation marks and then pressing enter. Confirm the setting was updated by typing $$ into the command window. This will print the current GRBL settings.

Once you have the x-axis dialed in, you can move to the y and z axis. These follow the same process described for the x axis. The only difference will be the dial indicator setup. Remember, we want the dial indicator to be parallel to the motion of the axis we are tuning. See the photos below for the dial indicator arrangements I used.

Dial Indicator Setup to Measure Y Axis Travel

Dial Indicator Setup to Measure the Z Axis Travel

Conclusion

Now that you have your GRBL steps per mm set, its time to run a quick Gcode program to test out the new setup. Click here to download example gcode program that will move the spindle in a 1 inch diameter circle. if you add a marker or pencil, the machine will draw a 1 inch circle.

If you have any questions feel free to leave a comment below or send an email to me [email protected]

Thanks for reading. Until next time…

Tim

← Previous post

Next post →

Tag » Cnc 3018 Z Axis Calibration