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 condition | Visible symptom | Consequence |
|---|---|---|
| Too close | Thin, transparent lines or no extrusion | Scraped bed, clogged nozzle, elephant’s foot |
| Correct | Flat, slightly flattened lines that touch | Smooth surface and reliable adhesion |
| Too far | Round, separate strands with gaps | Poor adhesion, warping, lifted corners |
| Uneven | Mixed symptoms in different zones | Partial failure, often in one corner |
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.
| Method | How it works | Best suited for |
|---|---|---|
| Paper or feeler gauge | Corner screws adjusted by friction feel | Simple printers with flat beds |
| Inductive probe | Detects metal bed without contact | Steel or aluminum surfaces |
| Touch probe (BLTouch type) | Retractable pin contacts the bed | Any bed material |
| Nozzle or load cell sensing | Measures force when nozzle touches bed | Modern printers with integrated sensing |
| Eddy current scanner | Scans the surface quickly while moving | Fast, dense mesh on metal beds |
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 compared with related calibrations
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.
| Calibration | What it controls | Typical sign it is wrong |
|---|---|---|
| Bed leveling | Uniform gap across the plate | First layer varies by area |
| Z offset | Absolute nozzle height after probing | Whole first layer too thin or too thick |
| Gantry squaring | Parallel X gantry on both Z screws | Gap changes from left to right |
| E-step calibration | Amount of filament fed per command | Under- or over-extrusion on all layers |
| First layer settings | Speed, temperature and line width | Poor adhesion despite correct gap |
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.
- Clean the nozzle and the build surface, removing filament residue and grease.
- Heat the bed and nozzle to normal printing temperatures and wait several minutes.
- Home all axes and tram the corners with a gauge or a tramming assistant.
- Run the probe to create a mesh, typically 5 x 5 to 7 x 7 points.
- Set the Z offset with a single-layer test pattern.
- 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.
| Mistake | Cause | Fix |
|---|---|---|
| Leveling a cold bed | Thermal warping ignored | Level at printing temperature |
| Mesh not loaded | Start G-code lacks the load command | Add mesh load or probe in start script |
| Loose eccentric wheels | Bed or gantry moves under load | Adjust wheels and tighten frame |
| Probe offset wrong | Probe position not set in firmware | Measure and enter the X and Y offsets |
| Releveling every print | Mistrust of a stable machine | Recheck only after changes or failures |
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.