Z Offset "Theory"

Need some assistance getting started...post here...
kkessler
Posts: 4
Joined: Thu Feb 25, 2016 3:03 pm

Z Offset "Theory"

Post by kkessler » Thu Feb 25, 2016 4:00 pm

I just got a new M2 yesterday, upgrading from a Makerfarm Prusa i3 I had for about a year and a half. While the Makerfarm isn't 1/10th the printer the M2 is, I don't regret starting there, because I learned so much from the constant calibration and tweaking I needed to get the thing to print.

I started by setting the Z Stop and bed leveling, and, after struggling with getting at the Z Stop screw, I was able to set the bed gap to 0.15 mm using a feeler gauge. I then printed the 2mm calibration block as described in the the forum post, and my block was about 2.15 mm high, which would see what I would expect to see. When I read the text of the instructions, though, I see a comment that I should readjust the Z Stop if the difference is greater than 0.1mm from 2 mm, and I see comments in the tread to the effect that the Z Offset makes up for errors and thermal variability of the Z Stop. I don't understand this expectation. If the print head is .15mm above the bed when the printer is zeroed on the Z axis, and the first step in the gcode is Z0.2 before it starts printing, the print head should be 0.35 mm above the bed when the first layer prints, and 9 more 0.2mm layers would make the block 2.15 mm tall. Why would I expect the calibration block to be 2mm unless I set the Z Stop so that the print head just touches the bed? Is there some sort of built-in Z Offset in firmware that is assuming a 0.15mm gap, and the Z0.2 gcode command just moves the hot end 0.05mm up, so that it is really 0.2mm above the bed?

User avatar
PcS
Posts: 667
Joined: Mon Mar 09, 2015 12:19 pm
Location: Michigan

Re: Z Offset "Theory"

Post by PcS » Fri Feb 26, 2016 3:19 am

The first layer is printed at Z zero . Which would be .15 from contacting the bed if set correctly. At .20 layer height you obviously would have .5 of squish for good layer adhesion. Hope this helps explain it. :D

kkessler
Posts: 4
Joined: Thu Feb 25, 2016 3:03 pm

Re: Z Offset "Theory"

Post by kkessler » Fri Feb 26, 2016 3:39 am

The first layer appears to print at 0.2mm. This is the gcode from S3D:

Code: Select all

G28 ; home all axes
G1 Y50 Z0.3 F9600 ; move forward to avoid binder clips
G1 X205 Z10 ; move off platform
G1 Z0.4 ; position nozzle
G92 E0 ; zero extruder
G1 E25 F225 ; purge nozzle
G92 E0 ; zero extruder
G1 X190 Z0.1 E1.0 F1200 ; slow wipe
G1 X180 Z0.25 ; lift
G92 E0
G1 E-1.0000 F2400
G1 Z0.200 F1200   <---------------- Move the Z axis to 0.2 mm
; layer 1, Z = 0.2
T0
; tool H0.200 W0.400
; skirt
G1 X87.931 Y111.797 F18000
G1 E0.0000 F720
G92 E0
G1 X88.275 Y111.551 E0.0126 F2400
G1 X88.300 Y111.535 E0.0135
G1 X89.118 Y111.063 E0.0418
G1 X89.144 Y111.049 E0.0427
If it printed at 0, there would be no meaning to the first layer thickness in slicers.

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

Re: Z Offset "Theory"

Post by Jules » Fri Feb 26, 2016 6:28 am

kkessler wrote:I just got a new M2 yesterday, upgrading from a Makerfarm Prusa i3 I had for about a year and a half. While the Makerfarm isn't 1/10th the printer the M2 is, I don't regret starting there, because I learned so much from the constant calibration and tweaking I needed to get the thing to print.

I started by setting the Z Stop and bed leveling, and, after struggling with getting at the Z Stop screw, I was able to set the bed gap to 0.15 mm using a feeler gauge. I then printed the 2mm calibration block as described in the the forum post, and my block was about 2.15 mm high, which would see what I would expect to see. When I read the text of the instructions, though, I see a comment that I should readjust the Z Stop if the difference is greater than 0.1mm from 2 mm, and I see comments in the tread to the effect that the Z Offset makes up for errors and thermal variability of the Z Stop. I don't understand this expectation. If the print head is .15mm above the bed when the printer is zeroed on the Z axis, and the first step in the gcode is Z0.2 before it starts printing, the print head should be 0.35 mm above the bed when the first layer prints, and 9 more 0.2mm layers would make the block 2.15 mm tall. Why would I expect the calibration block to be 2mm unless I set the Z Stop so that the print head just touches the bed? Is there some sort of built-in Z Offset in firmware that is assuming a 0.15mm gap, and the Z0.2 gcode command just moves the hot end 0.05mm up, so that it is really 0.2mm above the bed?

Well, since we're talking theory: :D (Katie bar the door.....)

Practically versus theoretically, you can't set the actual Z-Home at zero, you would smack the nozzle into the plate, burn any tape or surfacing material on it, and if there is any leftover filament on the nozzle, you've got trouble. So the starting point has to be set physically lower than the tip of the nozzle. The nozzle then tries to " Fill the Gap" underneath it with liquid plastic.

If the gap is too large, the plastic falls uncontrolled for the first layer and isn't squished enough to cause it to stick to the plate. If the gap is too small, the first layer gets smeared out over the plate. And since every layer builds on the first layer, problems can crop up later if the first layer doesn't go down correctly.

The ideal gap size (from 0.15 mm to 0.20 mm) is almost too small to see on a pair of calipers, and because there is some play and bounce in the switch for the Z-Stop, (and the bed has springs under it), it's very difficult to get the gap perfect the first time, even with a feeler gauge.

So we use a 2-step process to fine-tune the gap and give us better prints.

1. First step is setting the Z-Stop, using the 0.15 mm feeler gauge while the nozzle and bed are at temperature. That gets the bed close to the correct starting point. But even if you were to hit the nail on the head, if you use a different filament with different temperatures, that gap between the bed and the nozzle is going to be off. So you would theoretically have to re-set the Z-Stop every time you change filaments. (Which would be a huge PITA.) That's where the second step comes in with the printed squares calibration.

2. We know that if the Z-Stop is set 100% correctly, then printing a square that is designed to be exactly 2.00 mm tall, will print a square that is exactly 2.00 mm tall.
But we know that if the printed square comes out to ...say... a measured 2.04 mm tall, then the Z-stop, as it is currently set, is 0.04 mm too low. The plastic squirted out to fill the volume, but the first layer is going to be taller than the subsequent layers, and the thread will be narrower.

So what? It still bonded to the next layer going up, right?

A difference of 0.04 probably wouldn't make much of a difference - true, but more than that will start to show up as a stringy surface on the bottom of your print. You will start to see separate threads that don't bond to each other on the bottom of the print, and when you lift the print off the bed, it will have a ruined bottom.

(2.00 mm ideal - 2.04 mm actual = -0.04 mm Z-Offset)

The Z-Offset is a global fudge factor that we put into the software that moves the bed up or down by a fraction for the entire print. It's just a way of correcting for a small variance in the starting point of the bed. You cannot physically make an adjustment that small, but the software can, and the difference in print quality is significant.

You subtract the measured value from 2.00 mm, and not the other way around, because the resultant is going to give you the correct Z-Offset number, whether positive or negative, to correct the position of the bed relative to the nozzle. A negative Z-Offset number moves the bed closer to the nozzle. A positive Z-Offset number moves the bed farther away from the nozzle, so the thread isn't so smashed.

3. Having the Z-Offset number fall within half of a layer height (-0.10 to +0.10) is just good practice, it is not a requirement. You can use the Z-Offset number to correct for numbers outside of that range. (For that matter, most calipers do not measure particularly accurately, especially the $30 ones most people have on hand.)

After you determine what the Z-Offset is, you drop that number into the Global Z-Offset slot in the slicer software and you don't have to re-set the Z-Stop. (I find it much easier to do it in the software.)

But..... there are a couple of guys here who successfully turn the Z-Stop bolt by a certain number of flats to adjust the bolt as needed for each spool, because they know how many turns it takes to move the bed up or down by a certain amount, and if you are more comfortable doing it that way, that is always an option. (jimc understands that method if that is what you would rather do.)

Hope that helped to explain it for any other folks who might want more information on why we do this. Taking the time to set the Z-Offset makes for smooth prints that stick just right. I just set the Z-Stop once, then print a few cubes for each type of filament and I save the profiles with the correct Z-Offsets for each filament. (And I don't have to mess with setting Z-Offsets again until I try a new filament.)

Coming from a different 3D printer, you know how important it is to get the calibration correct. This is just an easy way to do it once, set it, and forget it. It will print the same way for that filament from then on.

Okay, I'm done now. (Luv them theoretical discussions!) :lol:

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

Re: Z Offset "Theory"

Post by ednisley » Fri Feb 26, 2016 4:19 pm

The evidence suggests I'm a dullard, but I can't follow that ... [grin]

So, I dispense with all the first-layer offsets & corrections & squishes & overfills: the first layer is exactly like all the others, except for running at a rather slow speed to improve adhesion.

The Z homing switch for my setup trips when the platform is about 2 mm above the nozzle (which means the nozzle must be off to the side to avoid a collision). I set the Z offset to -2.00 mm, which sets the Z=0 position at the platform surface.

With that offset in effect, manually moving to Z=+2.00 puts the nozzle about 2 mm above the platform, which I can measure fairly accurately. Tweaking the offset slightly to make the answer come out right takes one more iteration than it should, because I always get the sign wrong, but I'm making small changes and there's no nozzle-to-platform collision.

With the cold measurement set, I print a set of thinwall squares, measure their height, and adjust the offset to correct any error caused by thermal expansion. An iteration or two of that process gets the offset dead on.

After all that, when I tell the slicer to create a 0.25 mm first layer, the Z-axis value in the G-Code is 0.25 mm, the nozzle is actually 0.25 mm above the platform, and the first layer comes out 0.25 mm thick.

With the Z-axis calibrated correctly, I fine-tune the Extrusion Multiplier so the thinwall square walls come out exactly the same width as the slicer expects.

Now, that I can understand...

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

Re: Z Offset "Theory"

Post by Jules » Fri Feb 26, 2016 4:44 pm

The evidence suggests I'm a dullard, but I can't follow that ... [grin]
Oh, as if........ :lol:

We're doing the exact same thing using slightly different methods. Adjusting the gap so that the first layer comes out to the same size, for both height and width, as the rest of the layers.

User avatar
PcS
Posts: 667
Joined: Mon Mar 09, 2015 12:19 pm
Location: Michigan

Re: Z Offset "Theory"

Post by PcS » Fri Feb 26, 2016 4:50 pm

At the end of the day though for most prints it is pretty irrelevant as long as you get a bottom surface finish you can live with and adequate bed adhesion. The overall height of most printed things will not be off enough to matter in most cases. :D

kkessler
Posts: 4
Joined: Thu Feb 25, 2016 3:03 pm

Re: Z Offset "Theory"

Post by kkessler » Fri Feb 26, 2016 4:58 pm

I'm still on double secret probation on this forum, which means a moderator must approve my posts before they appear, which kind of breaks up the flow of the topic thread, but I'll try to be clear to what I am referring to...

Jules, I think I understand the mechanics of what the Z Offset is, what I don't understand is why it works the way it does. If I have a Z Stop set to perfectly 0.15mm above the bed, the Z=0 point in firmware is physically at the Z=0.15mm point. When the printer is issued the Z0.2 gcode command, which is what happens at the start of the calibration block, the print head is physically at the Z=0.35mm point. Now when I really print the calibration block in this configuration, it turns out the entire block is 2.05 mm high, and assuming that the top 9 layers were really 0.2 mm thick, that means the first layer was printed at 0.25 mm thick, when the print head was 0.35 mm above the bed. That's what I don't understand. I can see how you can use the Z Offset in the slicer to adjust for that 0.05mm variance in the final height.

I understand ednisley approach better (except for the part where he would embed his nozzle in the glass when he homes his Z Axis :o ). At least the nozzle height in firmware matches where the nozzle is physically, and the Z Offset just makes up for the measurement errors.

kkessler
Posts: 4
Joined: Thu Feb 25, 2016 3:03 pm

Re: Z Offset "Theory"

Post by kkessler » Fri Feb 26, 2016 5:01 pm

Oh yes, and I did want to mention that this is just a theoretically discussion. To PcS's point, I followed the directions, and my prints are coming out beautifully.

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

Re: Z Offset "Theory"

Post by Jules » Fri Feb 26, 2016 5:20 pm

PcS wrote:At the end of the day though for most prints it is pretty irrelevant as long as you get a bottom surface finish you can live with and adequate bed adhesion. The overall height of most printed things will not be off enough to matter in most cases. :D
True....and most sensible. :lol:

Post Reply