Test g code

I’m looking for a gcode test where the machine actually makes some test cuts specifically to see how the z axis is doing

We usually recommend the test crown around here. It doesn’t do much with the Z axis, the carve portion is at -1mm and the travel portion is at +5mm. Still, that required a properly functioning Z axis in order to work well. Best results if you use it with a pen first, or maybe carve into foam.


When I first cut out the struts I had to keep adding z steps to get the machine to cut through the 1/4" pieces. I changed the z steps from 400 to 100 per mm and that seemed to fix the problem. I’m not sure how accurate it is now so I want some way to definitely check the accuracy of the machine

One way is to use your calipers to measure the thickness of a piece of material. Lay that material on your spoil board and probe to it. Take note of how far down your machine had to go to probe to it. On the webUI of a jackpot that probing distance is shown in the Command area where feedback information is relayed.

Then you can remove that piece of material and probe down to the spoil board. Take note of how far it had to probe down to reach the spoil board. Subtracting the first number from the second — ideally should match the thickness of the material that you measured with the calipers.

The thicker that material is, the easier it is to detect inaccuracy.

First step is to determine the actual travel of the Z axis. This sounds kind of fishy to me.

If you have a 3D printer, you probably have a calibration cube or 20 around somewhere. Jog the machine to put the bit at the top of the cube (typically 20mm – Benchy is 48mm tall, BTW, and will also work for this.)

Remove the object and jog downwards in small increments to a total of the expected object height. If you’re at the spoilboard, steps/mm is at least close. It will certainly be

On the LR, Z steps is pretty simple arithmetic. Lead screws are super easy to get super accurate.

The 400 microsteps/mm is going to be 100% accurate, provided that you have a 4 start (8mm lead) screw, 16× microstepping and a 1.8° (200 full steps/revolution) stepper motor.

If it is not accurate, then figure out where you have something different.

A 0.9° (400 steps/revolution) atepper motor will skew things, but the wrong way from what you saw. This will increase microsteps/mm to 800 all else the same. Motors at increments other than 200 or 400 steps / revolution are rare in NEMA 17 format, so this is probably not it.

The V1 store sells 4 start 8mm lead screws (2mm pitch × 4 starts = 8mm travel /revolution.) It is possible to get 2 and 1 start lead screws which have 4mm and 2mm lead respectively, but this also increases the microsteps / mm to 800 snd 1600 respectively.

Finally microstepping. V1 firmware on the SKR Pro 1.2 sets the TMC2209 drivers to 16× microstepping, but drivers like the A4988 or DRV8825 need jumpers set to get the microstepping correct. The A4988 drivers have a maximum of 16× and the DRV8825 have a maximum of 32×. Both have a default of 1 pulse as a full step with no jumpers installed, but the microsteps will be a power of 2.

So all of these change the microsteps/mm by powers of 2. Therefore the correct value will be divided or multiplied by a power of 2. (1, 2, 4, 8, 16 etc.) Once we have that, we can probably figure out what went wrong.

A value of 100 is almost certainly microstepping at the driver.

1 Like

Although my opinion is probably not accurate, it’s my opinion that most of the people with z being off (or not as accurate as expected) find that z is moving a factor or 2 or 4. In those cases, it’s normally been because they sourced their own lead screws, or got a different lead screw with different specifications.

Sometimes this was done by design of the person building the machine. Sometimes by accident.

Although it might sound like I’m trying to point fingers, it’s not my intention. What I am trying to explain is if you know you sourced your own, not all lead screws are the same, and this might help explain why adjustments are needed for calibration.

If this is on a Jackpot board, then consider that the .YAML file format that it uses for its config file has some strict requirements regarding not having stray trailing spaces, etc. I actually had one stepper motor running either twice as much or half as much as the other stepper motor because my config file was malformed with a stray trailing space.

I checked the z travel and it was very close to being accurate when I changed the steps/mm to 100. I turned out that I had purchased a 4 lead lead screw from Amazon instead of the 2 lead lead screw. I noticed that V1 Engineering is selling a 4 lead screw to keep the gantry from coming down when the power is turned off

100 steps/mm is odd for a lead screw. It probably means thst your drivers are set for 4× microstepping, but basically so long as it works…

A 4 start screw has an 8mm lead with a 2mm pitch. These are the ones that often drop when power is removed. A 2 start screw has a 4mm lead.

Starts are the number of individual threads.

Pitch is the space between threads.

Lead is the linear distance from 1 revolution.

It’s easier to talk about when we’re using the same language :slight_smile:

Longer lead is fewer steps/mm. It is a set number of full steps to rotate the lead screw once. (Typically 200, as each step is typically 1.8° but there are 0.9° motors, too which are 400.) Thst rotation will move the axis by the amount of the lead. So with a 4 start screw, that is 8mm.

So with full steps, you get 200 steps for 8mm, 100 steps for 4mm, 50 steps for 2mm and 25 full steps per mm of travel.

Microstepping increases that.

2× microstepping means 50, 4× means 100, 8× is 200 and 16× is 400.

400 is the default usually as 16× microstepping is generally desireable for noise and smoothness.

For you to have 100, it means thst either you have 32mm lead on your screws (highly unlikely, never heard of screws with a lead that long), or you have a motor that is 50 full steps/revolution (Those do exist but are uncommon, and Ive never seen them in NEMA 17 format), or you have your microstepping at 4×.

This is possible with jumper settings, but if you are using an SKR Pro 1.2, with the TMC2209 drivers, this means that something else is wrong. The V1 firmware sets the drivers without jumpers, and sets them to 16×. If you have the jumpers on the board wrong, this could lead to other issues down the road, so I think it’s best to solve this mystery before then.

Please upload a picture of your board, as wired, so we can figure out what’s happened.

1 Like