3D Printing (General)

Bed mesh levelling explained: what it is and how to set it up

Bed mesh levelling probes a grid of points across the print surface so the firmware can compensate for any warp or unevenness in real time, giving a consistent first layer even on an imperfect bed.

Published 2026-05-17

When a 3D printer lays down its first layer, the nozzle needs to be at a consistent, precise height above the print surface at every point. The problem is that no bed is perfectly flat. Sheet-metal beds bow. Glass develops minor warps. PEI spring-steel sheets dish slightly under heat. Even a surface that looks flat to the eye can vary by 0.1–0.3 mm across its width — enough to cause the first layer to be too thin at the high spots and too thick at the low ones.

Bed mesh levelling solves this by mapping the actual surface before printing starts.

What bed mesh is

Bed mesh (sometimes called automatic bed levelling or ABL) uses a probe to measure the Z height at a grid of points across the bed. The firmware stores that map and then adjusts the nozzle height dynamically as the printhead moves, compensating for any hills and valleys in real time.

The probe can be a BLTouch, a CR Touch, an inductive sensor, or a strain-gauge tap (the tap-style probes used on Bambu and Ratrig printers are particularly repeatable). The firmware does the compensation invisibly in the background — from the printer's perspective, it is simply adjusting the Z axis thousands of times per second to follow the mapped surface.

The result is that the first layer is laid down at a consistent height even if the bed itself is not flat.

How the probe sequence works

The process has three stages.

1. Homing — the printer establishes a Z=0 reference, usually by triggering a Z-endstop or tapping the probe to the bed at a fixed location. 2. Probing — the printhead moves to each point in the mesh grid in turn, lowers until the probe triggers, and records the Z height at that coordinate. A 5×5 grid means 25 probe points; a 7×7 means 49. 3. Compensation — the firmware interpolates a Z offset from the surrounding mesh points for every XY coordinate during printing and adjusts the Z axis accordingly.

The mesh is usually saved to non-volatile memory so you do not need to re-probe before every print.

Setting up bed mesh in Klipper

In Klipper, bed mesh is configured in printer.cfg. A typical section looks like this:

```ini [bed_mesh] speed: 120 horizontal_move_z: 5 mesh_min: 20, 20 mesh_max: 210, 210 probe_count: 5, 5 fade_end: 10.0 ```

mesh_min and mesh_max define the corners of the probed area in probe coordinates, not nozzle coordinates. If your probe is offset from the nozzle — and it almost always is — you must account for that in your [bltouch] or [probe] section using x_offset and y_offset. Getting those values wrong is the most common source of mesh errors, because the whole map shifts in XY relative to where the nozzle actually prints.

After saving the config and restarting Klipper, run BED_MESH_CALIBRATE from the Mainsail or Fluidd console, wait for the probe sequence to finish, then run:

``` BED_MESH_PROFILE SAVE=default SAVE_CONFIG ```

To apply the saved mesh at the start of every print, add this to your print-start macro:

``` BED_MESH_PROFILE LOAD=default ```

Alternatively, call BED_MESH_CALIBRATE inside the start macro so the printer re-probes before every job. This adds a minute or two per print but gives you a fresh map — worthwhile if your bed temperature or surface changes often.

Setting up bed mesh in Marlin

On stock Marlin firmware (as shipped on most Creality printers), automatic bed levelling is typically already compiled in. To run a probe sequence:

1. Home all axes: G28 2. Run the probe sequence: G29 3. Save the result to EEPROM: M500 4. In your slicer's start G-code, add M420 S1 after the G28 home line to enable the saved mesh at the start of each print.

Some Marlin builds use Unified Bed Levelling (UBL) instead of the older bilinear mode. UBL stores a larger mesh and can be edited point by point, but requires a few more setup steps (see the Marlin documentation for the full G29 P1G29 P3M500 sequence). For most users on a 220–250 mm bed, bilinear with a 5×5 grid is entirely sufficient.

Choosing the right mesh density

More probe points give a more accurate map but take longer to generate. The right choice depends on bed size and how much it warps.

  • 3×3 (9 points): adequate for small beds under 150 mm, or beds that are nearly flat.
  • 5×5 (25 points): a reliable default for 220–250 mm beds. Catches any gentle bow without taking too long.
  • 7×7 (49 points): useful for beds of 300 mm or larger, or beds with more complex surface topology. Common on Creality K2, Bambu X1C, and Voron 2.4 builds.
  • 9×9 or above: rarely necessary. The probe itself has a finite repeatability (typically ±0.005 mm for a BLTouch, ±0.002 mm for a tap-probe), so adding more grid points beyond a certain density gives diminishing returns.

Do not extend the mesh area beyond the physically reachable probe area. If a grid point falls outside the machine's travel limits, the probe sequence will abort with a position error.

Always probe at printing temperature, not cold. A bed that is flat at 20 °C may bow measurably at 60 °C or 100 °C. A mesh taken cold will not represent the surface your first layer actually sees.

Common problems

Mesh is active but the first layer is still uneven

Confirm the mesh is actually being applied. In Klipper, run BED_MESH_OUTPUT in the console and check that the values are non-zero and the profile is loaded. In Marlin, verify M420 S1 appears in your start G-code after the G28 command.

Large variation across the mesh (0.5 mm or more)

First check that the probe offset is set correctly — a wrong offset shifts the entire map. Then check whether the bed fasteners or clips are pulling the surface unevenly. Finally, confirm you are probing at printing temperature.

Saddle-shaped mesh (corners up, centre down, or vice versa)

This is a bowed bed, which is normal for sheet-metal and thin glass surfaces. Bed mesh handles it well. Just make sure you are probing the full usable area rather than a small central patch.

BLTouch gives inconsistent readings

BLTouch probes are mechanical and can wear. If PROBE_ACCURACY in Klipper reports a range greater than 0.03 mm, clean the pin tip, check all wiring connections, and re-test. A probe with a bent or dirty pin will produce a noisy mesh that no amount of density tuning will fix.

Recommended settings in practice

For a typical 220×220 mm FDM printer with a BLTouch or CRTouch:

  • Probe at first-layer bed temperature, not ambient.
  • Use a 5×5 grid.
  • Set probe move speed to 3–5 mm/s.
  • Set fade_end: 10.0 (Klipper) or M420 Z10 (Marlin) so the Z compensation fades out over the first 10 mm of print height — tall prints do not need active correction near the top.
  • Re-probe after any mechanical change to the bed: fitting a new spring-steel sheet, re-tightening the levelling knobs, recovering from a nozzle crash, or when first-layer adhesion suddenly degrades after a period of reliable printing.

When to mail it in

If bed mesh is configured and enabled but your first layer is still inconsistent — a probe that gives erratic readings, a Z-offset that drifts between prints, or warping too severe for software compensation — the cause is likely mechanical: a worn probe pin, a loose Z-axis assembly, or a bed surface that is genuinely buckled beyond what mesh correction can handle. These are straightforward to diagnose with the printer on the bench. If you are not comfortable on the hardware side, get in touch via the contact page. I offer mail-in diagnostics, precise probe-offset calibration, and a full print-readiness check, with turnaround within a few working days.