How To: Calibrate the Z-Offset

Post your advice, tips, suggestions, etc...
User avatar
Jules
Posts: 3144
Joined: Wed Jan 21, 2015 1:36 am

How To: Calibrate the Z-Offset

Post by Jules » Mon Nov 30, 2015 10:21 pm

Note: If you got a new machine after 03/01/16 you likely have the Rev.E version of the machine and you do not need to perform this calibration. Read the Rev. E Beginner's Guide here: viewtopic.php?f=3&t=3542

For users with an earlier version of the M2.....Before you Calibrate the Extrusion Width (viewtopic.php?f=3&t=1964) it's very important to begin your calibrations by making a small adjustment to the starting point for the bed, when beginning a print.

Unless you plan to spend a lot of time getting your Z-Stop set perfectly, (and I'm not knocking it, because a lot of the experts do it that way), the odds are that you are not going to have it set correctly. And when you switch to a different kind of filament, it will definitely be wrong. (Lot of reasons for this - but the main one is going to be due to the heat expansion of the bed and nozzle at the different temperatures.)

We are talking about a difference in starting point that is no thicker than a strand of hair, meaning the difference between a perfect print and total failure.

To make the adjustments that you need:

In the G-Code section of the printing parameters in S3D, there is a Global Z-Offset slot. (There is also a Z-offset in Slic3r that should work the same way.)
Z-Offset.jpg

1. Step one is to print Ed's calibration square below. (Print with 0.20 mm layer height, 0.40 mm layer width, at 100% layer height.)
calibration.zip
(1.98 KiB) Downloaded 2042 times
2. Measure the height of the printed square with calipers, (as accurately as possible), subtract the measurement from 2.0 mm and then enter that resultant number into the Z-Offset slot in your profile. (If the square is not tall enough, you'd enter a positive number, if it's too tall, you'll add a negative adjustment.) A positive number in the Global Z-Offset slot moves the bed farther away from the starting point for the first layer, so that the thread gets laid down evenly instead of getting squished out. A negative Z-Offset adjustment number brings the bed in closer before printing, so that the thread can stick to the plate with the correct bonding ratio.

I generally run a second and maybe third square, just to fine-tune it, until I get a square exactly 2.0 mm tall.
Gap 4.jpg
Gap 4.jpg (46.33 KiB) Viewed 32055 times
That's it, and it's pretty easy - but you'd be amazed at how many problems not doing this will cause. :roll: At a minimum, you'll want to determine the Z-Offset for each type of filament (PLA, ABS, PETG, Wood, Flex, etc.). I used to calibrate each spool of filament, but you will still get very good results if you just calibrate for the type.

Note: You want to perform this Z-Offset adjustment after you have correctly set the Z-Stop, which is a separate procedure.

Second Note: Don't forget to save this Z-Offset value into your profiles for this particular type of filament. You will want to test for this value at least once for each type of filament that you plan to print. (PLA, PETG, ABS, Wood, Flex, PC, Nylon)

*******************************************************************************************************************************************

BIG NOTE: If you have a Dual setup, you will be forced to set one gap that has to work perfectly for both nozzles. Since those might be extruding at different temperatures, you will have to adjust how you set the gap by changing how far down you seat each nozzle first.

Write-up on that procedure here:

viewtopic.php?f=13&t=2917

Have fun! :D
Last edited by Jules on Fri Apr 29, 2016 3:48 pm, edited 12 times in total.

User avatar
SouthSideofdaSky
Posts: 103
Joined: Wed Jul 09, 2014 9:35 pm

Re: How To: Calibrate the Z-Offset

Post by SouthSideofdaSky » Tue Dec 01, 2015 5:43 pm

Bookmarked! This makes a lot of sense.

I'm going to play the devil's advocate (or maybe just the idiot :D ) for a minute. As I mentioned in passing in my other thread yesterday ( viewtopic.php?f=7&t=3120 ), I currently tweak my Z by changing the First Layer Height instead of the G-Code offset. Is there a difference?

For example, I have found that I seem to get great prints when the first layer is about 0.18 mm tall (determined by measuring several skirts from successful prints at several locations with a caliper). Therefore, for my standard layer height of 0.2 mm I set the First Layer Height to 90% so that my first layer will be (0.20 mm)*(0.9) = 0.18 mm tall.

Then, when I change the layer height like I'm trying to do in my other thread, I adjust the First Layer Height accordingly so that it still comes out at 0.18 mm (which might not even be a good thing to do...I'm still learning about settings for different layer heights obviously). For example, at your suggestion I tried a print with 0.27 mm layer height. For that print I set the First Layer Height to 67% because (0.27 mm)*(0.67) = 0.18 mm.

I don't know how much sense that makes. :? Am I misunderstanding this setting entirely? Please educate me on the error of my ways!

User avatar
ednisley
Posts: 1061
Joined: Fri Apr 11, 2014 5:34 pm
Location: Halfway up the Hudson
Contact:

Re: How To: Calibrate the Z-Offset

Post by ednisley » Tue Dec 01, 2015 8:25 pm

SouthSideofdaSky wrote:Is there a difference?
The intent of the Z-axis home switch (or whatever you call it) is to set the Z=0 coordinate origin exactly at the platform surface: the nozzle will be flush with the platform. Turning the bolt (or whatever) so the switch trips at exactly the right point requires more finesse than many folks (myself included) find reasonable or possible. For example, turning the bolt 1/6 turn = 1 wrench flat changes the switch trip point by 0.12 mm, about half the usual layer thickness and enough to wreck first layer adhesion.

The Z offset value is a Finagle Constant that directly sets the Z coordinate when the switch trips, so that you can adjust the Z=0 position without adjusting the bolt. For example, if the switch trips when the platform is 3 mm below the nozzle, you set the Z offset to +3.0 (or maybe -3.0, your mileage may vary), so that the Z=0 position corresponds to the nozzle tip. Changing the Z offset allows you to fine-tune the Z=0 position by exact values, not putzing with a mechanical setting that can make things worse.

The slicer generates G-Code assuming that Z=0 corresponds to the platform surface. When the layers are 0.20 mm thick, the commands producing the first layer will have a Z coordinate of 0.20, the second layer will be Z=0.40, and so on. If you set only the first layer thickness to 0.25 mm, then those commands have Z=0.25, the next layer will be at Z=0.45, and so on.

You can certainly have compensating errors in all those settings that null out to produce a perfect first layer, but changing any one of them then requires compensating changes in all the others, because none of them have any basis in reality.

IMO, it's better to lock down the bolt, do the calibration dance to set the Z offset value, slap Z=0 at the platform surface where it belongs, and then have layer heights that mean what they say. But, then, I'm that type of guy... [grin]

User avatar
Jules
Posts: 3144
Joined: Wed Jan 21, 2015 1:36 am

Re: How To: Calibrate the Z-Offset

Post by Jules » Tue Dec 01, 2015 8:56 pm

SouthSideofdaSky wrote:Bookmarked! This makes a lot of sense.

I'm going to play the devil's advocate (or maybe just the idiot :D ) for a minute. As I mentioned in passing in my other thread yesterday ( viewtopic.php?f=7&t=3120 ), I currently tweak my Z by changing the First Layer Height instead of the G-Code offset. Is there a difference?

For example, I have found that I seem to get great prints when the first layer is about 0.18 mm tall (determined by measuring several skirts from successful prints at several locations with a caliper). Therefore, for my standard layer height of 0.2 mm I set the First Layer Height to 90% so that my first layer will be (0.20 mm)*(0.9) = 0.18 mm tall.

Then, when I change the layer height like I'm trying to do in my other thread, I adjust the First Layer Height accordingly so that it still comes out at 0.18 mm (which might not even be a good thing to do...I'm still learning about settings for different layer heights obviously). For example, at your suggestion I tried a print with 0.27 mm layer height. For that print I set the First Layer Height to 67% because (0.27 mm)*(0.67) = 0.18 mm.

I don't know how much sense that makes. :? Am I misunderstanding this setting entirely? Please educate me on the error of my ways!
I've never tried doing it by modifying the first layer height, so i've got no idea if it works out better or not. (It's obvious you've figured out a way to make it work, so that's cool.)

But - the advantages to doing it the other way with the Z-Offset, are that you just have to set it up correctly once, and then you can use 100% layer heights at the size that you want them, and you don't have to keep doing the math to determine what your first layer multiplier has to be, and your first layer isn't a thin shell, it will actually match your other layers.

I'd get tired of the math - (I'm actually a huge fan of doing things the lazy way whenever possible!) ;)

User avatar
SouthSideofdaSky
Posts: 103
Joined: Wed Jul 09, 2014 9:35 pm

Re: How To: Calibrate the Z-Offset

Post by SouthSideofdaSky » Wed Dec 02, 2015 5:05 pm

Thanks to both of you for the info and explanation. I suppose "having compensating errors in all those settings that null out to produce a perfect first layer" is kind of what I'm doing. I currently have the endstop bolt set so that I can just barely slide a piece of paper between the nozzle and the bed, so not quite exactly at the platform surface. Like Ed said, it's tricky for me to hit it exactly.

I'll have to try this. Always a work in progress! :D

Ryan_
Posts: 9
Joined: Tue Apr 12, 2016 7:58 am

Re: How To: Calibrate the Z-Offset

Post by Ryan_ » Thu Apr 28, 2016 7:23 am

I printed the calibration square, measured it as 2.12mm then entered that into Slic3r as -0.12 in the Printer settings > General > Z-offset field. It appears to have had no effect whatsoever-- the second calibration square also measured 2.12mm.

I also tried to do this in Pronterface through settings > options > z offset-- also no effect. Any ideas?

User avatar
Jules
Posts: 3144
Joined: Wed Jan 21, 2015 1:36 am

Re: How To: Calibrate the Z-Offset

Post by Jules » Thu Apr 28, 2016 8:27 pm

I suspect we need one of the Slic3r experts to step in and tell us how they do it. I would have thought that was what it was for, but different slicers do things in different ways, so maybe it's not. (You checked that the calipers were zeroed?)

User avatar
ednisley
Posts: 1061
Joined: Fri Apr 11, 2014 5:34 pm
Location: Halfway up the Hudson
Contact:

Re: How To: Calibrate the Z-Offset

Post by ednisley » Fri Apr 29, 2016 1:29 pm

Ryan_ wrote:It appears to have had no effect whatsoever-
Almost certainly, there's a G92 Z instruction in the Start G-Code block that gets glued to the front of the instructions sent to the printer. The numeric value hardcoded in that instruction overrides everything else you tweak in all the firmware.

It's part of the initial homing dance the printer does before each print, so you can't remove it. I think both Slic3r and S3d allow you to plug their offset values into that instruction, but I haven't tried to make that work.

If you change the value of the existing Z parameter by 0.12, it'll do what you want. To get more distance between the nozzle and the platform, subtract the change from the existing G92 Z value (-2.00 - 0.12 = -2.12). To get less distance, add the change (-2.00 + 0.12 = -1.88).

User avatar
Jules
Posts: 3144
Joined: Wed Jan 21, 2015 1:36 am

Re: How To: Calibrate the Z-Offset

Post by Jules » Fri Apr 29, 2016 3:38 pm

Ryan_ wrote:I printed the calibration square, measured it as 2.12mm then entered that into Slic3r as -0.12 in the Printer settings > General > Z-offset field. It appears to have had no effect whatsoever-- the second calibration square also measured 2.12mm.

I also tried to do this in Pronterface through settings > options > z offset-- also no effect. Any ideas?
Oooopsie! My bad! I thought you were a different Ryan.....

You just joined recently so you probably have the M2 Rev E. version of the machine, and you are correct, changing the Z-Offset in the software does absolutely nothing for you. (It's interesting to learn that it also does not work in Slic3r though, so that was helpful.)

You do not have to change the Z-Offset with your machine - it stays at the same Starting Height that you set in the Quick Start App, no matter what the software says. (Different firmware, different method of calculating the starting point, different results when you print a calibration square.)

For the Rev. E machines, your height is perfectly set. Do not perform this Z-Offset calibration.

(And if you have not done so....read the Beginner's Guide for the Rev.E machines here: viewtopic.php?f=3&t=3542 )

Ryan_
Posts: 9
Joined: Tue Apr 12, 2016 7:58 am

Re: How To: Calibrate the Z-Offset

Post by Ryan_ » Tue May 03, 2016 1:46 am

Sorry, I have the previous version with the V3b hotend, 24v. I'm intending to upgrade to the V4--in which case I don't have to fiddle with the Z-stop bolt, which is a pain.

Post Reply