# Scan Calibration

{% hint style="danger" %}

## Verify zero reference position!

Ensure that your `zero_reference_position` is set to a sensible value, usually the middle of your bed.

Verify this by issuing the `G0 X<blank> Y<blank>` command with the values from your configuration.

```
[bed_mesh]
zero_reference_position: <blank>, <blank>        
```

{% endhint %}

## Scan calibration

{% stepper %}
{% step %}

### Home your printer's X and Y axes

```
G28 X Y
```

{% endstep %}

{% step %}

### Start calibration

This will move your toolhead to the zero reference position and start calibration

<pre><code><strong>CARTOGRAPHER_SCAN_CALIBRATE
</strong></code></pre>

{% endstep %}

{% step %}

### Move nozzle to 0.1mm above the bed

Use the `TESTZ Z=-0.01` macro to slowly lower your nozzle. Use `ABORT` if you wish to abort.

{% hint style="info" %}
You can use Mainsail or Fluidd to have a nice interface to support you during these moves.
{% endhint %}

We want to get our nozzle to as close to 0.1mm off the bed as we can. You can use a feeler gauge or a piece of paper, simply stop once it catches.

{% hint style="warning" %}
Visually ensure that there is still a gap between your nozzle and the bed.
{% endhint %}

```
TESTZ Z=-0.01
```

{% endstep %}

{% step %}

### Accept manual homing

Now press accept, or run the `ACCEPT` macro to continue calibration. The nozzle will move up above the bed and slowly lower while recording the frequency response. Make sure the printer is *stable* and do not touch the bed or gantry.

```
ACCEPT
```

{% endstep %}

{% step %}

### Save the calibrated model

Once done, you will be prompted to run `SAVE_CONFIG`. The Klipper firmware should restart and you will be able to home using `G28`.

```
SAVE_CONFIG
```

{% endstep %}

{% step %}

### Next Steps (Touch Calibration)

You have now created a model for all of the scan operations (`G28`, `BED_MESH_CALIBRATE`, `Z_TILT_ADJUST` / `QUAD_GANTRY_LEVEL` etc) to use the physical touch commands, you will now need to calibrate touch, please move to the next page.&#x20;
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cartographer3d.com/cartographer-probe/installation-and-setup/software-configuration/scan-calibration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
