How to use z_thermal_adjust to compensate hotend expansion?

Basic Information:

Printer Model: Voron 2.4
MCU / Printerboard: SpiderV2.3
Host / SBC: RPI4B
klippy.log
klippy (3).log (68.4 KB)

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Describe your issue:


I found out that I need to adjust SET_GCODE_OFFSET Z_ADJUST=+0.075 every time I’m printing at 275°C instead of 215°C to get a perfect first layer.

I tried configuring temp_coeff to negative and hardcoding ref_temp to be 215, but I got stuck when it told me I could not use the same temperature sensor twice. I guess it’s designed to compensate for frame expansion, not hotend expansion. But still, I need a way to compensate my hotend expansion.

1 Like

Sorry, where is this gone?

1 Like

Added, didn’t think it was relevant, sorry for that

As far as I know, there is no built in possibility.

FWIW, you could probably write a macro that calculates the needed compensation and call it via PRINT_START or similar.

Is it possible to duplicate one sensor to use as if there are two virtual sensors?

Not sure what you are trying to achieve.
You can get the extruder’s target temperature in a macro and from this target temperature calculate your needed offset. Then pass the offset to SET_GCODE_OFFSET

It’s because I’m really not familiar with the coding language used for macros, and I want to see if it’s possible to work around the limitation of [z_thermal_adjust], which is that it can only be used with a brand new, unused sensor.