Z-home, probing and first layer math...



  • I am trying to debug first layer issues and have been seeing some inconsistencies. It would be useful to understand the math that connects initial z-home height (the piece of paper), initial layer height (slicer setting) and probing. Using both Simplify3D and Cura.

    Prior to all of my print jobs I allow a few minutes for both the print bed and nozzle to reach operating temperature. I do this in order to eliminate, to the extent possible, thermal expansion issues.

    Once everything is at temperature I use "Home All" and check z-home with 0.10 mm, 0.15 mm and 0.20 mm feeler gauges. The objective is to have the 0.15 mm gauge slide under a clean nozzle while slightly scrapping. The 0.20 should not go in and the 0.10 should be loose. In other words: 0.10 mm < z <= 0.15 mm.

    With that set, as well as both extruder and bed now nicely stabilized at temperature, I run "Auto Bed Compensation".

    Then I print.

    I machined my print bed on an industrial CNC milling machine (Haas VF-2), which makes it extremely flat (in the order of 0.01 mm, likely better, flatness). Regrettably the PEI sheet on top of it makes it less so. Still, it's very flat.

    That said, I have a problem with the mount such that the bed has some tilt to it. At the moment it is quite severe, in the order of 1 mm down along the front edge. I will fix this, but this is also what prompted me to try and understand the Duet math involved.

    The probing system relies on me telling it how far the extruder's tip is from the optical probe's trigger point. I can arrive at this number with very good accuracy, certainly in the order of +/- 0.1 mm and better if necessary.

    OK, long intro. Here's are the questions:

    If I set my slicer (using both Simplify 3D and Cura) for, say, a 0.2 mm first layer, how does the board make use of the probing data to direct the z axis?

    Put a different way, how do errors or variations in probe location relative to the extruder tip affect first layer z?

    The optical probe is mounted on the fan duct, which is printed from PLA. The coefficient of thermal expansion of PLA is in the order of 70 um/m°C. Which means it will move about 0.05 mm for a delta-T of 10 °C (about 5 cm of plastic from aluminum mount to optical sensor position). I have actually measured it moving as much as 0.10 mm between the entire machine being at room temperature vs. nicely warmed-up. Clearly this needs improvement. Still, I am after understanding the z-axis first layer math at this point.

    Let's say the optical sensor trigger point setting in the config file is off by 0.1 mm while actually printing (my height calibration was done while cold).

    So, we have:

    • Mechanically set z-home gap of 0.10 mm < z <= 0.15 mm
    • In other words, machine z-home does not touch the PEI sheet
    • Optical sensor trigger point 0.1 mm closer to tip (in z) due to thermal expansion (i.e.: config is 2.5 mm and actual measured distance when hot is 2.4 mm)
    • Slicer first layer set to 0.2 mm thickness
    • Print bed flat within 0.01 mm (with some thermal dependencies)
    • Print bed tilted down 1.0 mm in the front (with some thermal dependencies)

    A few questions:

    • What is the height of the z axis during first layer printing?
    • What is the effect of the z position error of the optical probe trigger point on the commanded z axis first layer height?
    • Should the nozzle's mechanical z home position be set to zero (touching the print surface) instead?
    • Should it be set to a slightly negative value off-build-plate and then use the touch probe to set the working z-zero? If so, how?
    • How does one reliably deal with printing from a cold start vs. hot start, other than calibrating hot and never printing from a cold start again?
    • What is the best approach to automating all of this such that the necessary probing and calibration happens at the start of every print?

    The reason I am asking these questions is that I seem to be getting inconsistent results. The only thought I have at the moment is that the combination of thermal expansion, z-probe related math and slicer settings are conspiring to make things difficult to calibrate.

    I do have the option to mount the optical sensor to an aluminum plate (CTE ~ 23 um/m°C ), and I will. This would require a significant amount of work. If I could avoid it for now it would be great.

    Thanks.


  • Moderator

    @martincho said in Z-home, probing and first layer math...:

    Should the nozzle's mechanical z home position be set to zero (touching the print surface) instead?

    Yes. At some point you need to establish Z0 as the nozzle touching the bed. All else flows from this. Namely via the probe trigger height calibration. Using feeler gauges is fine, but you need to account for the feeler gauge gap at some point.

    @martincho said in Z-home, probing and first layer math...:

    I run "Auto Bed Compensation".

    What exactly are you running. Are you using G32 with a bed.g file, or are you running G29 to create a height compensation map? How have you defined Z0 before this is run?

    @martincho said in Z-home, probing and first layer math...:

    (my height calibration was done while cold)

    Ideally it should be done at printing temp to account for thermal expansion and warping.

    @martincho said in Z-home, probing and first layer math...:

    I have a problem with the mount such that the bed has some tilt to it.

    This could be introducing considerable variability, and will make any further calibration difficult if not impossible.

    @martincho said in Z-home, probing and first layer math...:

    In other words, machine z-home does not touch the PEI sheet

    This is a bit of a problem, as your first layer height will be added to the existing gap.

    @martincho said in Z-home, probing and first layer math...:

    What is the height of the z axis during first layer printing?

    0.2 plus whatever gap exists between Z0 and actual bed surface.

    @martincho said in Z-home, probing and first layer math...:

    What is the effect of the z position error of the optical probe trigger point on the commanded z axis first layer height?

    It will have some effect, but with a good functioning probe the 0.00n variation shouldn't matter too much and is likely to be within the fudge factor of the filament flow rate. If the nozzle is close enough, the bed is hot enough, and the plastic hot enough, and the bed is clean/prepped, it will stick.

    @martincho said in Z-home, probing and first layer math...:

    Should it be set to a slightly negative value off-build-plate and then use the touch probe to set the working z-zero? If so, how?

    Needlessly complex, just have it so that Z0 = the nozzle touching the bed.

    @martincho said in Z-home, probing and first layer math...:

    How does one reliably deal with printing from a cold start vs. hot start, other than calibrating hot and never printing from a cold start again?

    You can add a time delay to your startup gcode to allow for enough heat soak of the bed/hotend. How much is needed will be up to you.

    Here's how I do it though. I have a start.g file that will run as soon as a print is started. It runs before the slicer start gcode. It heats the bed to 65c and waits, then it heats the hot end to 80c and homes the printer. Then it hands off to the slicer start gcode which then sets the temps as configured in the slicer and waits. It then calls a macro to prime the nozzle and starts the print. By the time the print actually starts, the bed has been up to temp for about a minute, which is enough for me.

    @martincho said in Z-home, probing and first layer math...:

    What is the best approach to automating all of this such that the necessary probing and calibration happens at the start of every print?

    You may want to use a start.g file as well. It goes in the /sys folder and runs before every print. It's also handy because if you use multiple slicers like I do, you can modify one file to change the print start behavior. The slicer start gcode just has to set the printing temperatures.



  • Sorry for the late reply. Thanks for your feedback.

    Please see my update on my other thread. The printer is now working reliably but I have some questions about my findings.

    https://forum.duet3d.com/topic/11890/auto-bed-vs-mesh-grid-compensation


Log in to reply