Step 12.34 — Add a [bed_mesh] section¶
Step 34 of 37 · Chapter 12 — Software: Pi OS image, Klipper/Moonraker/Mainsail, firmware, printer.cfg
(no image — see text)
Parts: none.
Do: There is no [bed_mesh] anywhere in the LDO config. Add this block anywhere above the macros; next to [quad_gantry_level] reads well:
#####################################################################
# Bed Mesh — ADDED, not present in the LDO config
#####################################################################
[bed_mesh]
speed: 300
horizontal_move_z: 10
## mesh_min / mesh_max are PROBE coordinates, not nozzle coordinates.
## The Omron sits at y_offset +25, so the toolhead goes to (X, Y-25):
## mesh_min Y 40 -> toolhead Y 15; mesh_max Y 310 -> toolhead Y 285. Both legal.
## 40/310 is the Voron reference inset for a 350 (keeps probe points off the bed clips).
mesh_min: 40, 40
mesh_max: 310, 310
probe_count: 7, 7
algorithm: bicubic
## Z0 comes from the nozzle-probe endstop, and [probe] z_offset is 0 because
## the Omron is a QGL-only probe. Without a zero reference the whole mesh
## would be offset by the Omron's trigger height. Pin it to bed centre:
zero_reference_position: 175, 175
fade_start: 1.0
fade_end: 10.0
fade_target: 0
adaptive_margin: 5
Check
mesh_max minus the probe's 25 mm y_offset stays ≤ position_max on Y, and mesh_min Y minus 25 stays ≥ position_min. Both hold.
What you're looking at
A bed mesh is a grid of probed heights Klipper applies as a small Z correction while printing, compensating for a bed that is not flat. mesh_min/mesh_max are probe coordinates, not nozzle coordinates, and zero_reference_position pins the mesh to one point.
Why zero_reference_position is not optional here: [probe] z_offset: 0 — LDO's own comment says "This probe is not used for Z height, only Quad Gantry Leveling". A mesh built with an uncalibrated probe carries the probe's trigger height as a constant offset on every point. zero_reference_position subtracts the mesh value at the named point from the whole mesh, making it purely relative and safe to apply on top of a nozzle-probe Z0. src
Note: 7×7 with [probe] samples: 3 is 147 probes and takes a while. Use BED_MESH_CALIBRATE SAMPLES=2 for routine meshes, and ADAPTIVE=1 (as PRINT_START does below) to mesh only the area the print actually covers — which is what makes a per-print mesh practical on a 350 (survey §4.4 #15). src
Source: Klipper docs § bed_mesh · Klipper docs § BED_MESH_CALIBRATE