Bed leveling

Also known as: bed tramming

On this page 7

Bed leveling is the process of making the distance between the nozzle and the build plate constant across the whole print area, either by mechanically adjusting the bed or by measuring it and letting the firmware compensate. In 3D printing & making, it is the first calibration step in Print quality & troubleshooting, because almost every first layer defect traces back to an uneven or wrongly set gap.

The term is used loosely. Strictly speaking, bed tramming means making the bed plane parallel to the gantry’s motion plane, while mesh bed leveling means mapping the remaining surface deviations and correcting them in software. A well-prepared printer usually needs both steps, plus a correct Z offset that sets the absolute height of the first layer.

How bed leveling controls the first layer

Bed leveling works by keeping the nozzle at the intended first layer height, typically 0.2 mm to 0.3 mm for a 0.4 mm nozzle, at every point of the plate. When the gap is right, the extruded line is slightly squished into the surface, which gives it a wide contact area and strong adhesion.

Small errors matter because the first layer is so thin. A deviation of 0.1 mm is a third to half of the layer height, so one corner can be crushed while another barely touches. The table below shows how the gap appears in practice.

Gap conditionVisible symptomConsequence
Too closeThin, transparent lines or no extrusionScraped bed, clogged nozzle, elephant’s foot
CorrectFlat, slightly flattened lines that touchSmooth surface and reliable adhesion
Too farRound, separate strands with gapsPoor adhesion, warping, lifted corners
UnevenMixed symptoms in different zonesPartial failure, often in one corner
Symptoms of nozzle gap at the first layer

The bed itself is rarely perfectly flat. Aluminum plates warp with heat, glass sheets have a slight bow and spring steel sheets follow the surface beneath them. Heating the bed before leveling is therefore essential, because thermal expansion can change the shape by 0.05 mm to 0.2 mm compared with the cold state.

Manual tramming and automatic mesh leveling

Two families of methods exist, and they solve different problems. Manual tramming adjusts screws or knobs under the bed corners until a feeler gauge or a sheet of paper drags equally at each point. Automatic bed leveling (ABL) uses a probe to measure a grid of points and stores a height map that the firmware applies while printing.

MethodHow it worksBest suited for
Paper or feeler gaugeCorner screws adjusted by friction feelSimple printers with flat beds
Inductive probeDetects metal bed without contactSteel or aluminum surfaces
Touch probe (BLTouch type)Retractable pin contacts the bedAny bed material
Nozzle or load cell sensingMeasures force when nozzle touches bedModern printers with integrated sensing
Eddy current scannerScans the surface quickly while movingFast, dense mesh on metal beds
Main approaches to bed leveling

Firmware such as Marlin and Klipper implements mesh compensation through bilinear or unified bed leveling. The controller interpolates between probed points and moves the Z axis slightly during the first layers. Compensation is usually faded out over several millimeters of height, so upper layers print on a true plane.

Software compensation does not replace mechanical setup. A badly tilted bed forces large Z corrections, which can create visible ridges and inconsistent layer heights. The best practice is to tram first, then mesh.

Bed leveling is often confused with neighboring adjustments that also affect the first layer. Each calibration controls a different variable, and fixing the wrong one hides the real fault for a while.

CalibrationWhat it controlsTypical sign it is wrong
Bed levelingUniform gap across the plateFirst layer varies by area
Z offsetAbsolute nozzle height after probingWhole first layer too thin or too thick
Gantry squaringParallel X gantry on both Z screwsGap changes from left to right
E-step calibrationAmount of filament fed per commandUnder- or over-extrusion on all layers
First layer settingsSpeed, temperature and line widthPoor adhesion despite correct gap
Bed leveling and neighboring calibrations

A practical rule helps with diagnosis: if the defect is the same everywhere, adjust the Z offset or extrusion; if it changes with position, revisit tramming and the mesh.

Step-by-step procedure for reliable results

A dependable routine follows a fixed order, because each step builds on the previous one. Skipping the warm-up or the cleaning step is the most common reason for results that cannot be reproduced.

  1. Clean the nozzle and the build surface, removing filament residue and grease.
  2. Heat the bed and nozzle to normal printing temperatures and wait several minutes.
  3. Home all axes and tram the corners with a gauge or a tramming assistant.
  4. Run the probe to create a mesh, typically 5 x 5 to 7 x 7 points.
  5. Set the Z offset with a single-layer test pattern.
  6. Print a large first layer test and inspect it in all zones.

Modern firmware can report how far each corner screw must turn, which removes much of the guesswork. A mesh with a total range below about 0.1 mm is generally considered good for hobby printers; larger values suggest a warped plate or a mechanical issue.

Common mistakes and limitations

Most bed leveling problems come from mechanics rather than the method. A probe can only measure what it touches, and its repeatability depends on mounting, temperature and the bed material.

MistakeCauseFix
Leveling a cold bedThermal warping ignoredLevel at printing temperature
Mesh not loadedStart G-code lacks the load commandAdd mesh load or probe in start script
Loose eccentric wheelsBed or gantry moves under loadAdjust wheels and tighten frame
Probe offset wrongProbe position not set in firmwareMeasure and enter the X and Y offsets
Releveling every printMistrust of a stable machineRecheck only after changes or failures
Frequent mistakes and how to fix them

Mesh leveling also has a resolution limit. Bumps smaller than the grid spacing fall between probed points and remain uncorrected, and a severely warped bed may exceed the compensation range. In those cases, replacing the plate is more effective than adding probe points.

Understanding it simply

Think of the nozzle as a pen and the bed as paper. The pen must touch the paper with the same light pressure everywhere. If it presses too hard, it scratches. If it floats too high, it draws nothing useful.

Bed leveling makes that pressure even across the plate. You can turn small screws by hand, or let a sensor measure the surface and adjust height automatically. A good first layer starts with an even gap, and the rest of the print stands on it.

Applied in practice

A small design studio prints large PETG enclosures that cover almost the full 235 mm x 235 mm bed. After moving the printer to a new desk, the front left corner starts lifting while the back right corner shows scraped, transparent lines. The first layer test makes the pattern clear: the problem changes with position, so the Z offset alone is not the cause.

The technician heats the bed to 80 degrees Celsius, trams the four corners with a 0.1 mm feeler gauge and then runs a 7 x 7 probe mesh. The mesh range drops from 0.42 mm to 0.08 mm. After a small Z offset correction, the enclosures print with an even first layer and no corner lift, and the studio stops losing about one large print per week.