How to set the Z home offset

  • I have what I thought would be a simple question.



    I don't have an auto leveling probe, I do my leveling manually with 4 screws and a piece of paper (I measured the thickness to 0.1 mm).



    For the longest time I would have trouble with the first layer, sometimes having to give the bed screws a quarter turn to bring the bed up a bit. I would see that the nozzle seemed quite far away from the bed. This went on for the longest time and I just chalked it up to the quality of my printer.



    I realized recently that when I level the bed, I am inserting a piece of paper in between the nozzle and the bed. Obviously, I should be taking the thickness into account as a 0.1mm thick piece of paper accounts for 50 % higher than the nozzle should be for a 0.2 mm first layer height.



    My question is, how do I set (either in Cura or directly in Marlin config) the z home offset to account for the 0.1 mm thickness of my calibration paper?


  • 0scar

    0scar Correct answer

    3 years ago

    It is preferred to get the distance correct by hardware changes (leveling screws). But it is possible to do it with software. You can not only change the Z offset in the slicer or in the configuration of Marlin, but also with G-code commands.



    The "paper drag" method is perfect for determining the correct Z level. Once you leveled with the paper, you do not need to create an offset to account for the paper thickness, however, there are purists that do that. So basically, what we call Z=0 is in fact Z="paper thickness", unless you are a purist. But a slightly larger gap makes printing much easier. Too small heights cause e.g. rippling effects or too much pressure build-up in the nozzle. In order to change your offset after leveling, you could try one of the following methods. This is sometimes a useful method for creating a little extra offset for printing PETG, but personally I do not do that.



    In Ultimaker Cura:
    Open the plugin manager ("Toolbox"->"Browse packages...") and install "Z Offset Setting", a new parameter will be available in the "Build Plate Adhesion" settings menu called "Z Offset". (See also this older, not up-to-date answer)



    In Marlin configuration file, modify the MANUAL_Z_HOME_POS constant:



    //#define MANUAL_Z_HOME_POS 0


    In G-code:



    By adding the following lines to your start G-code (see e.g. this answer) using the G92 G-code command:



    G0 Z0.2 ; Move the head to 0.2 mm (so now 0.3 on your machine)
    G92 Z0 ; Call this Z = 0


    or when you are able to connect to the printer over USB using a printer terminal (e.g. Pronterface, Repetier or OctoPrint) using the M206 G-code command:



    M206 Z-0.2 ; Will raise the Z height by 0.2 mm
    M500 ; Stores the offset in memory


    Alternatively, when you cannot connect through a terminal, putting the last 2 lines in a text file and saving that as a .gcode file on an SD card and "printing" the file will also store the new offset (if M500 is enabled in the configuration file: #define EEPROM_SETTINGS // Enable for M500 and M501 commands)


    I had seen the plugin for cura but it felt hacky to me especially since this seems like it would be a universal requirement for everyone without auto bed leveling. Is this what everyone else does??

    @MatthewGoulart Preferred solution is to correctly level the bed from a hardware point of view (what most people do). From the software solutions I prefer the `M206` / `M500` as this stores this for all models you print. If you do it in the slicer or startcode, you need to remmeber that, e.g. when you change slicer.

    Sorry if this question has an obvious answer, but how would you level it on a hardware level? Are you saying I give the screws an extra 1/8 of a turn after leveling with the paper?

    When you say "Once you leveled with the paper, you do not need to create an offset to account for the paper thickness" are you implying that most people just ignore the offset introduced by the paper? Are you saying I should just not take it into account?

    @MatthewGoulart - Yeah, just ignore it. The paper width *is* your zero starting point.

License under CC-BY-SA with attribution


Content dated before 7/24/2021 11:53 AM