Jump to content
  • 0

Auto z-offset issue - first calibration is always way off


DennisM

Question

I'm using protoloft's auto Z height code and I thought it's been working out.

But for some reason, the very first calibration is always way off -- often it thinks the calculated offset is 0, or negative numbers. Here's an example of running it 3 times in a row:

Z-CALIBRATION: ENDSTOP=2.230 NOZZLE=2.223 SWITCH=10.242 PROBE=7.185 --> OFFSET=-1.223500
Z-CALIBRATION: ENDSTOP=2.230 NOZZLE=2.228 SWITCH=10.240 PROBE=9.456 --> OFFSET=1.053000
Z-CALIBRATION: ENDSTOP=2.230 NOZZLE=2.235 SWITCH=10.738 PROBE=9.945 --> OFFSET=1.052000

The second and third ones seem correct, and when actually printing a test print I've confirmed they work and provide the right printing nozzle height. Has anyone come across this?

I think it's possible it might have something to do with my G32 macro, which I crafted together to grab the probe and do both the QGL and the Z calibration in one group, then stow the probe. Here's that macro:

#####################################################################
##   Full calibration macro G32
#####################################################################

[gcode_macro G32]
##  modified to support euclid probe and the new z calibrate klipper plugin
##  https://github.com/protoloft/klipper_z_calibration
gcode:
    SAVE_GCODE_STATE NAME=STATE_G32
    G90                           ; absolute positioning
    G28                           ; auto home X Y Z
    M401                          ; deploy euclid probe
    _QUAD_GANTRY_LEVEL_ORIGINAL   ; QGL macro without probe deploy
    G28                           ; auto home X Y Z
    BASE_CALIBRATE_Z              ; calibrate Z height without probe deploy
    G28 Z                         ; home Z one last time
    M402                          ; stow euclid probe, we're done
    G0 X150 Y150 Z40 F3600        ; move to center of bed
    RESTORE_GCODE_STATE NAME=STATE_G32

Note that the euclid.cfg file renames the original QGL to the one I used above. I don't want to use QUAD_GANTRY_LEVEL in the G32 as it includes the M401/M402 probe steps.

[gcode_macro QUAD_GANTRY_LEVEL]
rename_existing: _QUAD_GANTRY_LEVEL_ORIGINAL

I'm working on a newly built 2.4r2 300mm with a Euclid probe.

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0
On 9/24/2022 at 12:18 AM, DennisM said:

The second and third ones seem correct, and when actually printing a test print I've confirmed they work and provide the right printing nozzle height. Has anyone come across this?

Have the same with my Voron 2.4 and Euclid probe. Seeing the same results no matter what probing I do (QGL, Bed Mesh, Z-Offset) I have stopped worrying about it as the Z-Offset calibration seems to work very well and getting consistent first layer heights despite this little "quirk"

  • Like 1
Link to comment
Share on other sites

  • 0

[gcode_macro PRINT_START]
#   Use PRINT_START for the slicer starting script
gcode:
  G90 #set absolute positioning
  M107 #turn off parts fan
  G28 #home all axis
  
  Attach_Probe_Lock #prevent probe docking until unlocked, from klicky 
  #Z_TILT_ADJUST #Trident *or* 
  QUAD_GANTRY_LEVEL #V2.4
  
  #CLEAN_NOZZLE #requires brush/purge bucket, from decontaminator
  #G28 Z #rehome Z axis 
  CALIBRATE_Z #automatic Z offset, from klipper z calibration  
  BED_MESH_CLEAR
  #BED_MESH_PROFILE LOAD=default #load saved mesh *or*
  BED_MESH_CALIBRATE #generate new mesh
  SET_SKEW  
  Dock_Probe_Unlock #removes probe lock

 

this is what I use and its been flawless

 

P.S - no homing after the last calibrate....

 

 

[gcode_macro BED_MESH_CALIBRATE]
rename_existing: _BED_MESH_CALIBRATE
description: Perform Mesh Bed Leveling with klicky automount
gcode:
    {% set V = printer["gcode_macro _User_Variables"].verbose %}
    {% if V %}
        { action_respond_info("Bed Mesh Calibrate") }
    {% endif %}

    _CheckProbe action=query
    G90
    Attach_Probe
    _KLICKY_STATUS_MESHING

    _BED_MESH_CALIBRATE {% for p in params
           %}{'%s=%s ' % (p, params[p])}{%
          endfor %}

    Dock_Probe

   

Edited by j.walker
Link to comment
Share on other sites

  • 0

So I may not have mentioned it above but this has been working for me for months. I do a single G32 to deploy the probe, QGL, calibrate_z, then stow the probe and it works every time and is very accurate.

Here's what my G32 looks like, and keep in mind in other locations I rename the original QGL to "_QUAD_GANTRY_LEVEL_ORIGINAL" to call below.

Also, it's called "All_Calibrate_G32" so it shows up first in the list of macros on my Klipperscreen macro menu. Easy to find that way.

 

#####################################################################
##   Full calibration macro G32
#####################################################################

[gcode_macro All_Calibrate_G32]
##  modified to support euclid probe and the new z calibrate klipper plugin
##  https://github.com/protoloft/klipper_z_calibration
gcode:
    #SAVE_GCODE_STATE NAME=STATE_G32
    {action_respond_info("Starting full calibration G32")}
    G90                           ; absolute positioning
    G28                           ; auto home X Y Z
    M401                          ; deploy euclid probe
    _QUAD_GANTRY_LEVEL_ORIGINAL   ; QGL macro without probe deploy
    G28                           ; auto home X Y Z
    M400                          ; wait for moves to complete from homing
    BASE_CALIBRATE_Z              ; calibrate Z height without probe deploy
    M402                          ; stow euclid probe, we're done
    G0 X147.5 Y252 Z40 F3600      ; move to finish location

 

Link to comment
Share on other sites

  • 0

I have an issue I'm hoping someone may be able to help with regarding my first layer height using Euclid and protoloft. I currently have G32 (including QGL with Euclid), then calibrate Z as part of my start_print macro. It's configured correctly in my slicer (SuperSlicer) and calls it up flawlessly. However, my issue is that I ALWAYS have to fine tune my first layer even after doing the Protoloft calibrate z at the beginning of every print. Most of the time the nozzle is too low and is squishing to the point that it almost digging into the bed. Here's the results from my Zcalibration:

Z-CALIBRATION: ENDSTOP=0.000 NOZZLE=-0.031 SWITCH=4.123 PROBE=5.200 --> OFFSET=0.566250

after starting the print, I had to increase the offset from 0.56 to 0.80 to get the nozzle just right. Any thoughts or advice? 

Link to comment
Share on other sites

  • 0

I would agree with @Stadi. Heat the bed and nozzle to the desired temperature and let the chamber soak for at least 30min before starting the calibration routines. Heat not only affects the bed but also the frame and gantry. Giving it time to stabilise may reduce the need to use babbystepping to tune z-offset

Link to comment
Share on other sites

  • 0

 

On 2/11/2023 at 11:48 AM, DreadBiscuit said:

I have an issue I'm hoping someone may be able to help with regarding my first layer height using Euclid and protoloft. I currently have G32 (including QGL with Euclid), then calibrate Z as part of my start_print macro. It's configured correctly in my slicer (SuperSlicer) and calls it up flawlessly. However, my issue is that I ALWAYS have to fine tune my first layer even after doing the Protoloft calibrate z at the beginning of every print. Most of the time the nozzle is too low and is squishing to the point that it almost digging into the bed. Here's the results from my Zcalibration:

Z-CALIBRATION: ENDSTOP=0.000 NOZZLE=-0.031 SWITCH=4.123 PROBE=5.200 --> OFFSET=0.566250

after starting the print, I had to increase the offset from 0.56 to 0.80 to get the nozzle just right. Any thoughts or advice? 

When you run Z-Cal multiple times, did the results vary or not?

Link to comment
Share on other sites

  • 0

My Trident with Klicky:

Z-CALIBRATION: ENDSTOP=-0.850 NOZZLE=-0.848 SWITCH=5.002 PROBE=6.301 --> OFFSET=0.201875
Z-CALIBRATION: ENDSTOP=-0.850 NOZZLE=-0.846 SWITCH=5.001 PROBE=6.300 --> OFFSET=0.203125

After an M84: the relative z offset changed but is consistent 

Z-CALIBRATION: ENDSTOP=-0.850 NOZZLE=-0.852 SWITCH=5.046 PROBE=6.286 --> OFFSET=0.138750
Z-CALIBRATION: ENDSTOP=-0.850 NOZZLE=-0.853 SWITCH=5.044 PROBE=6.285 --> OFFSET=0.137500

If your first layer is always quite to low, you have a problem in your config

Edited by iNDeX
Link to comment
Share on other sites

  • 0
On 2/11/2023 at 2:48 AM, DreadBiscuit said:

I have an issue I'm hoping someone may be able to help with regarding my first layer height using Euclid and protoloft. I currently have G32 (including QGL with Euclid), then calibrate Z as part of my start_print macro. It's configured correctly in my slicer (SuperSlicer) and calls it up flawlessly. However, my issue is that I ALWAYS have to fine tune my first layer even after doing the Protoloft calibrate z at the beginning of every print. Most of the time the nozzle is too low and is squishing to the point that it almost digging into the bed. Here's the results from my Zcalibration:

Z-CALIBRATION: ENDSTOP=0.000 NOZZLE=-0.031 SWITCH=4.123 PROBE=5.200 --> OFFSET=0.566250

after starting the print, I had to increase the offset from 0.56 to 0.80 to get the nozzle just right. Any thoughts or advice? 

I found that on my 2.4 I had to do a LOT of switch compensation on Euclid to get the Z-Calibrate to get anywhere near the right place. Also, Z-calibrate is very sensitive to garf on the nozzle. That machine has ~3000 print hrs on it, so I attribute part of the "slop" to wear.  I still baby step every print.  The machine has titanium backers and is always preheated an hour before use. So hard to say what part of the system is being a problem.

Link to comment
Share on other sites

  • 0
On 9/23/2022 at 7:18 AM, DennisM said:

I'm using protoloft's auto Z height code and I thought it's been working out.

But for some reason, the very first calibration is always way off -- often it thinks the calculated offset is 0, or negative numbers. Here's an example of running it 3 times in a row:

Z-CALIBRATION: ENDSTOP=2.230 NOZZLE=2.223 SWITCH=10.242 PROBE=7.185 --> OFFSET=-1.223500
Z-CALIBRATION: ENDSTOP=2.230 NOZZLE=2.228 SWITCH=10.240 PROBE=9.456 --> OFFSET=1.053000
Z-CALIBRATION: ENDSTOP=2.230 NOZZLE=2.235 SWITCH=10.738 PROBE=9.945 --> OFFSET=1.052000

The second and third ones seem correct, and when actually printing a test print I've confirmed they work and provide the right printing nozzle height. Has anyone come across this?

I think it's possible it might have something to do with my G32 macro, which I crafted together to grab the probe and do both the QGL and the Z calibration in one group, then stow the probe. Here's that macro:

#####################################################################
##   Full calibration macro G32
#####################################################################

[gcode_macro G32]
##  modified to support euclid probe and the new z calibrate klipper plugin
##  https://github.com/protoloft/klipper_z_calibration
gcode:
    SAVE_GCODE_STATE NAME=STATE_G32
    G90                           ; absolute positioning
    G28                           ; auto home X Y Z
    M401                          ; deploy euclid probe
    _QUAD_GANTRY_LEVEL_ORIGINAL   ; QGL macro without probe deploy
    G28                           ; auto home X Y Z
    BASE_CALIBRATE_Z              ; calibrate Z height without probe deploy
    G28 Z                         ; home Z one last time
    M402                          ; stow euclid probe, we're done
    G0 X150 Y150 Z40 F3600        ; move to center of bed
    RESTORE_GCODE_STATE NAME=STATE_G32

Note that the euclid.cfg file renames the original QGL to the one I used above. I don't want to use QUAD_GANTRY_LEVEL in the G32 as it includes the M401/M402 probe steps.

[gcode_macro QUAD_GANTRY_LEVEL]
rename_existing: _QUAD_GANTRY_LEVEL_ORIGINAL

I'm working on a newly built 2.4r2 300mm with a Euclid probe.

Did you ever figure this out.  'm alwo using protoloft's auto Z height code and it's been working great but then today it isn't working great.  I keep getting a -.14 to -.19 offset and have to microstep up closer to 0.  I have tried recalibrating my z endstop and probe offset but still no change.  I can run the command Calibrate Z and test manually with G90, G0 z.1 and it nails it.  Then when I go to print my first layer is squished bad.  Nothing changed so Im at a loss.

 

Link to comment
Share on other sites

  • 0

Bumping my old thread here...

Due to health reasons I had to stop 3D printing for a while. My last print on my 2.4r2 was in July of 2023, so I'm just now trying to get things going. After going through the "scary" updates for Klipper & friends, that all ended up working out for me. And I can even get a QGL done with accuracy.

But now when it comes to the auto Z calibrate (this thread) I get numbers > 1.000 which generates an error:

Offset 1.154 is outside the configured range of min=-1.000 and max=1.000

It's very consistent. I have NOT heated up the nozzle nor bed, so this is done cold at the moment, but I can't seem to get this working. On top of that, it's extra confusing because this is in my config:

max_deviation: 3.0
##  Set to 3 from 1 due to glass plate offsets being high

Which to me should allow values > 1.000 ?

Maybe the parameter has changed somehow in an update?

OK, found the issue and will work on things from here. From the z offset notes:

v1.0.1 (2023-05-08)

    Fix a parsing error when only one value was defined for offset_margins
    Remove the max_deviation default value to be able to configure the offset_margins.

So I'll look into the new offset_margins parameter and see how it goes.

Link to comment
Share on other sites

  • 0

I've updated my auto_z.cfg file with these changes, which are a result of an update at some point. I'll try them out tomorrow.

These two items were deprecated and replaced with different parameters.

 

####################################################################
##
##   The maximum allowed deviation of the calculated offset.
##   If the offset exceeds this value, it will stop!
##   The default is 1.0 mm.
##
#max_deviation: 3.0   ## deprecated ##
##  Set to 3 from 1 due to glass plate offsets being high

##  New Jan 2024:
offset_margins: -1.0,1.7
#   The minimum and maximum margins allowed for the calculated offset.
#   If the offset is outside these values, it will stop!
#   The margin can be defined as "min,max" e.g. "-0.5,1.5" or by just one
#   value e.g. "1.0" which translates to "-1.0,1.0" (which is also the default).

 

And this part:

 

####################################################################
##
##   2 * z_offset from the "probe:z_offset" section
##   The distance in mm to move up before moving to the next
##   position. The default is two times the z_offset from the probe's
##   configuration.
##
## clearance: 16  ## deprecated ##

safe_z_height: 16

#   default is 2 * z_offset from the "probe:z_offset" section
#   The absolute z position in mm to move to before moving to the next
#   position. The default is two times the z_offset from the probe's
#   configuration. The minimum safe z height is 3mm.

Note: my probe:z_offset in printer.cfg is "8" so the description of the default would probably just give me 16 as well.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...