Bed leveling - Klipper documentation (2024)

Bed leveling (sometimes also referred to as "bed tramming") iscritical to getting high quality prints. If a bed is not properly"leveled" it can lead to poor bed adhesion, "warping", and subtleproblems throughout the print. This document serves as a guide toperforming bed leveling in Klipper.

It's important to understand the goal of bed leveling. If the printeris commanded to a position X0 Y0 Z10 during a print, then the goalis for the printer's nozzle to be exactly 10mm from the printer'sbed. Further, should the printer then be commanded to a position ofX50 Z10 the goal is for the nozzle to maintain an exact distance of10mm from the bed during that entire horizontal move.

In order to get good quality prints the printer should be calibratedso that Z distances are accurate to within about 25 microns (.025mm).This is a small distance - significantly smaller than the width of atypical human hair. This scale can not be measured "by eye". Subtleeffects (such as heat expansion) impact measurements at this scale.The secret to getting high accuracy is to use a repeatable process andto use a leveling method that leverages the high accuracy of theprinter's own motion system.

Choose the appropriate calibration mechanism

Different types of printers use different methods for performing bedleveling. All of them ultimately depend on the "paper test" (describedbelow). However, the actual process for a particular type of printeris described in other documents.

Prior to running any of these calibration tools, be sure to run thechecks described in the config check document. Itis necessary to verify basic printer motion before performing bedleveling.

For printers with an "automatic Z probe" be sure to calibrate theprobe following the directions in theProbe Calibrate document. For delta printers,see the Delta Calibrate document. For printerswith bed screws and traditional Z endstops, see theManual Level document.

During calibration it may be necessary to set the printer's Zposition_min to a negative number (eg, position_min = -2). Theprinter enforces boundary checks even during calibrationroutines. Setting a negative number allows the printer to move belowthe nominal position of the bed, which may help when trying todetermine the actual bed position.

The "paper test"

The primary bed calibration mechanism is the "paper test". It involvesplacing a regular piece of "copy machine paper" between the printer'sbed and nozzle, and then commanding the nozzle to different Z heightsuntil one feels a small amount of friction when pushing the paper backand forth.

It is important to understand the "paper test" even if one has an"automatic Z probe". The probe itself often needs to be calibrated toget good results. That probe calibration is done using this "papertest".

In order to perform the paper test, cut a small rectangular piece ofpaper using a pair of scissors (eg, 5x3 cm). The paper generally has athickness of around 100 microns (0.100mm). (The exact thickness of the paperisn't crucial.)

The first step of the paper test is to inspect the printer's nozzleand bed. Make sure there is no plastic (or other debris) on the nozzleor bed.

Inspect the nozzle and bed to ensure no plastic is present!

If one always prints on a particular tape or printing surface then onemay perform the paper test with that tape/surface in place. However,note that tape itself has a thickness and different tapes (or any otherprinting surface) will impact Z measurements. Be sure to rerun thepaper test to measure each type of surface that is in use.

If there is plastic on the nozzle then heat up the extruder and use ametal tweezers to remove that plastic. Wait for the extruder to fullycool to room temperature before continuing with the paper test. Whilethe nozzle is cooling, use the metal tweezers to remove any plasticthat may ooze out.

Always perform the paper test when both nozzle and bed are at roomtemperature!

When the nozzle is heated, its position (relative to the bed) changesdue to thermal expansion. This thermal expansion is typically around a100 microns, which is about the same thickness as a typical piece ofprinter paper. The exact amount of thermal expansion isn't crucial,just as the exact thickness of the paper isn't crucial. Start with theassumption that the two are equal (see below for a method ofdetermining the difference between the two distances).

It may seem odd to calibrate the distance at room temperature when thegoal is to have a consistent distance when heated. However, if onecalibrates when the nozzle is heated, it tends to impart small amountsof molten plastic on to the paper, which changes the amount offriction felt. That makes it harder to get a good calibration.Calibrating while the bed/nozzle is hot also greatly increases therisk of burning oneself. The amount of thermal expansion is stable, soit is easily accounted for later in the calibration process.

Use an automated tool to determine precise Z heights!

Klipper has several helper scripts available (eg, MANUAL_PROBE,Z_ENDSTOP_CALIBRATE, PROBE_CALIBRATE, DELTA_CALIBRATE). See thedocumentsdescribed above tochoose one of them.

Run the appropriate command in the OctoPrint terminal window. Thescript will prompt for user interaction in the OctoPrint terminaloutput. It will look something like:

Recv: // Starting manual Z probe. Use TESTZ to adjust position.Recv: // Finish with ACCEPT or ABORT command.Recv: // Z position: ?????? --> 5.000 <-- ??????

The current height of the nozzle (as the printer currently understandsit) is shown between the "--> <--". The number to the right is theheight of the last probe attempt just greater than the current height,and to the left is the last probe attempt less than the current height(or ?????? if no attempt has been made).

Place the paper between the nozzle and bed. It can be useful to fold acorner of the paper so that it is easier to grab. (Try not to pushdown on the bed when moving the paper back and forth.)

Bed leveling - Klipper documentation (1)

Use the TESTZ command to request the nozzle to move closer to thepaper. For example:

TESTZ Z=-.1

The TESTZ command will move the nozzle a relative distance from thenozzle's current position. (So, Z=-.1 requests the nozzle to movecloser to the bed by .1mm.) After the nozzle stops moving, push thepaper back and forth to check if the nozzle is in contact with thepaper and to feel the amount of friction. Continue issuing TESTZcommands until one feels a small amount of friction when testing withthe paper.

If too much friction is found then one can use a positive Z value tomove the nozzle up. It is also possible to use TESTZ Z=+ or TESTZZ=- to "bisect" the last position - that is to move to a positionhalf way between two positions. For example, if one received thefollowing prompt from a TESTZ command:

Recv: // Z position: 0.130 --> 0.230 <-- 0.280

Then a TESTZ Z=- would move the nozzle to a Z position of 0.180(half way between 0.130 and 0.230). One can use this feature to helprapidly narrow down to a consistent friction. It is also possible touse Z=++ and Z=-- to return directly to a past measurement - forexample, after the above prompt a TESTZ Z=-- command would move thenozzle to a Z position of 0.130.

After finding a small amount of friction run the ACCEPT command:

ACCEPT

This will accept the given Z height and proceed with the givencalibration tool.

The exact amount of friction felt isn't crucial, just as the amount ofthermal expansion and exact width of the paper isn't crucial. Just tryto obtain the same amount of friction each time one runs the test.

If something goes wrong during the test, one can use the ABORTcommand to exit the calibration tool.

Determining Thermal Expansion

After successfully performing bed leveling, one may go on to calculatea more precise value for the combined impact of "thermal expansion","thickness of the paper", and "amount of friction felt during the papertest".

This type of calculation is generally not needed as most users findthe simple "paper test" provides good results.

The easiest way to make this calculation is to print a test objectthat has straight walls on all sides. The large hollow square found indocs/prints/square.stl can be used for this.When slicing the object, make sure the slicer uses the same layerheight and extrusion widths for the first level that it does for allsubsequent layers. Use a coarse layer height (the layer height shouldbe around 75% of the nozzle diameter) and do not use a brim or raft.

Print the test object, wait for it to cool, and remove it from thebed. Inspect the lowest layer of the object. (It may also be useful torun a finger or nail along the bottom edge.) If one finds the bottomlayer bulges out slightly along all sides of the object then itindicates the nozzle was slightly closer to the bed then it shouldbe. One can issue a SET_GCODE_OFFSET Z=+.010 command to increase theheight. In subsequent prints one can inspect for this behavior andmake further adjustment as needed. Adjustments of this type aretypically in 10s of microns (.010mm).

If the bottom layer consistently appears narrower than subsequentlayers then one can use the SET_GCODE_OFFSET command to make anegative Z adjustment. If one is unsure, then one can decrease the Zadjustment until the bottom layer of prints exhibit a small bulge, andthen back-off until it disappears.

The easiest way to apply the desired Z adjustment is to create aSTART_PRINT g-code macro, arrange for the slicer to call that macroduring the start of each print, and add a SET_GCODE_OFFSET command tothat macro. See the slicers document for furtherdetails.

Bed leveling - Klipper documentation (2024)
Top Articles
Latest Posts
Article information

Author: Amb. Frankie Simonis

Last Updated:

Views: 5496

Rating: 4.6 / 5 (56 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Amb. Frankie Simonis

Birthday: 1998-02-19

Address: 64841 Delmar Isle, North Wiley, OR 74073

Phone: +17844167847676

Job: Forward IT Agent

Hobby: LARPing, Kitesurfing, Sewing, Digital arts, Sand art, Gardening, Dance

Introduction: My name is Amb. Frankie Simonis, I am a hilarious, enchanting, energetic, cooperative, innocent, cute, joyous person who loves writing and wants to share my knowledge and understanding with you.