This document describes tools for calibrating a Z endstop and forperforming adjustments to bed leveling screws.
Calibrating a Z endstop¶
An accurate Z endstop position is critical to obtaining high qualityprints.
Note, though, the accuracy of the Z endstop switch itself can be alimiting factor. If one is using Trinamic stepper motor drivers thenconsider enabling endstop phase detection toimprove the accuracy of the switch.
To perform a Z endstop calibration, home the printer, command the headto move to a Z position that is at least five millimeters above thebed (if it is not already), command the head to move to an XY positionnear the center of the bed, then navigate to the OctoPrint terminaltab and run:
Z_ENDSTOP_CALIBRATE
Then follow the steps described at"the paper test" to determine theactual distance between the nozzle and bed at the given location. Oncethose steps are complete one can ACCEPT
the position and save theresults to the config file with:
SAVE_CONFIG
It's preferable to use a Z endstop switch on the opposite end of the Zaxis from the bed. (Homing away from the bed is more robust as then itis generally always safe to home the Z.) However, if one must hometowards the bed it is recommended to adjust the endstop so that ittriggers a small distance (eg, .5mm) above the bed. Almost all endstopswitches can safely be depressed a small distance beyond their triggerpoint. When this is done, one should find that theZ_ENDSTOP_CALIBRATE
command reports a small positive value (eg,.5mm) for the Z position_endstop. Triggering the endstop while it isstill some distance from the bed reduces the risk of inadvertent bedcrashes.
Some printers have the ability to manually adjust the location of thephysical endstop switch. However, it's recommended to perform Zendstop positioning in software with Klipper - once the physicallocation of the endstop is in a convenient location, one can make anyfurther adjustments by running Z_ENDSTOP_CALIBRATE or by manuallyupdating the Z position_endstop in the configuration file.
Adjusting bed leveling screws¶
The secret to getting good bed leveling with bed leveling screws is toutilize the printer's high precision motion system during the bedleveling process itself. This is done by commanding the nozzle to aposition near each bed screw and then adjusting that screw until thebed is a set distance from the nozzle. Klipper has a tool to assistwith this. In order to use the tool it is necessary to specify eachscrew XY location.
This is done by creating a [bed_screws]
config section. For example,it might look something similar to:
[bed_screws]screw1: 100, 50screw2: 100, 150screw3: 150, 100
If a bed screw is under the bed, then specify the XY position directlyabove the screw. If the screw is outside the bed then specify an XYposition closest to the screw that is still within the range of thebed.
Once the config file is ready, run RESTART
to load that config, andthen one can start the tool by running:
BED_SCREWS_ADJUST
This tool will move the printer's nozzle to each screw XY locationand then move the nozzle to a Z=0 height. At this point one can use the"paper test" to adjust the bed screw directly under the nozzle. Seethe information described in"the paper test", but adjust the bedscrew instead of commanding the nozzle to different heights. Adjustthe bed screw until there is a small amount of friction when pushingthe paper back and forth.
Once the screw is adjusted so that a small amount of friction is felt,run either the ACCEPT
or ADJUSTED
command. Use the ADJUSTED
command if the bed screw needed an adjustment (typically anything morethan about 1/8th of a turn of the screw). Use the ACCEPT
command ifno significant adjustment is necessary. Both commands will cause thetool to proceed to the next screw. (When an ADJUSTED
command isused, the tool will schedule an additional cycle of bed screwadjustments; the tool completes successfully when all bed screws areverified to not require any significant adjustments.) One can use theABORT
command to exit the tool early.
This system works best when the printer has a flat printing surface(such as glass) and has straight rails. Upon successful completion ofthe bed leveling tool the bed should be ready for printing.
Fine grained bed screw adjustments¶
If the printer uses three bed screws and all three screws are underthe bed, then it may be possible to perform a second "high precision"bed leveling step. This is done by commanding the nozzle to locationswhere the bed moves a larger distance with each bed screw adjustment.
For example, consider a bed with screws at locations A, B, and C:
For each adjustment made to the bed screw at location C, the bed willswing along a pendulum defined by the remaining two bed screws (shownhere as a green line). In this situation, each adjustment to the bedscrew at C will move the bed at position D a further amount thandirectly at C. It is thus possible to make an improved C screwadjustment when the nozzle is at position D.
To enable this feature, one would determine the additional nozzlecoordinates and add them to the config file. For example, it mightlook like:
[bed_screws]screw1: 100, 50screw1_fine_adjust: 0, 0screw2: 100, 150screw2_fine_adjust: 300, 300screw3: 150, 100screw3_fine_adjust: 0, 100
When this feature is enabled, the BED_SCREWS_ADJUST
tool will firstprompt for coarse adjustments directly above each screw position, andonce those are accepted, it will prompt for fine adjustments at theadditional locations. Continue to use ACCEPT
and ADJUSTED
at eachposition.
Adjusting bed leveling screws using the bed probe¶
This is another way to calibrate the bed level using the bed probe. Touse it you must have a Z probe (BL Touch, Inductive sensor, etc).
To enable this feature, one would determine the nozzle coordinatessuch that the Z probe is above the screws, and then add them to theconfig file. For example, it might look like:
[screws_tilt_adjust]screw1: -5, 30screw1_name: front left screwscrew2: 155, 30screw2_name: front right screwscrew3: 155, 190screw3_name: rear right screwscrew4: -5, 190screw4_name: rear left screwhorizontal_move_z: 10.speed: 50.screw_thread: CW-M3
The screw1 is always the reference point for the others, so the systemassumes that screw1 is at the correct height. Always run G28
firstand then run SCREWS_TILT_CALCULATE
- it should produce outputsimilar to:
Send: G28Recv: okSend: SCREWS_TILT_CALCULATERecv: // 01:20 means 1 full turn and 20 minutes, CW=clockwise, CCW=counter-clockwiseRecv: // front left screw (base) : x=-5.0, y=30.0, z=2.48750Recv: // front right screw : x=155.0, y=30.0, z=2.36000 : adjust CW 01:15Recv: // rear right screw : y=155.0, y=190.0, z=2.71500 : adjust CCW 00:50Recv: // read left screw : x=-5.0, y=190.0, z=2.47250 : adjust CW 00:02Recv: ok
This means that:
- front left screw is the reference point you must not change it.
- front right screw must be turned clockwise 1 full turn and a quarter turn
- rear right screw must be turned counter-clockwise 50 minutes
- rear left screw must be turned clockwise 2 minutes (not need it's ok)
Note that "minutes" refers to "minutes of a clock face". So, forexample, 15 minutes is a quarter of a full turn.
Repeat the process several times until you get a good level bed -normally when all adjustments are below 6 minutes.
If using a probe that is mounted on the side of the hotend (that is,it has an X or Y offset) then note that adjusting the bed tilt willinvalidate any previous probe calibration that was performed with atilted bed. Be sure to run probe calibrationafter the bed screws have been adjusted.
The MAX_DEVIATION
parameter is useful when a saved bed mesh is used,to ensure that the bed level has not drifted too far from where it was whenthe mesh was created. For example, SCREWS_TILT_CALCULATE MAX_DEVIATION=0.01
can be added to the custom start gcode of the slicer before the mesh is loaded.It will abort the print if the configured limit is exceeded (0.01mm in thisexample), giving the user a chance to adjust the screws and restart the print.
The DIRECTION
parameter is useful if you can turn your bed adjustmentscrews in one direction only. For example, you might have screws that starttightened in their lowest (or highest) possible position, which can only beturned in a single direction, to raise (or lower) the bed. If you can onlyturn the screws clockwise, run SCREWS_TILT_CALCULATE DIRECTION=CW
. If you canonly turn them counter-clockwise, run SCREWS_TILT_CALCULATE DIRECTION=CCW
.A suitable reference point will be chosen such that the bed can be leveledby turning all the screws in the given direction.