# Welcome

<figure><img src="/files/MM5y4OrRYn2sz9uxSHPA" alt=""><figcaption></figcaption></figure>

The Cartographer Probe, democratizing eddy current sensors. A huge thank you to the community, and I hope you enjoy this product.

This documentation is constantly evolving in order to make it the best experience for you.\
\
If you find any mistakes, please do not hesitate to contact us either at <info@cartographer3d.com> or via our Discord ([Link](https://discord.gg/6DRRr66wYB))

## Cartographer Survey Touch

Cartographer Survey Touch (our contact probe solution) is now live and available to all.

Probes will be shipping out with Survey Firmware pre-flashed on them.\
\
For more information check out [Survey Touch](/cartographer-probe/classic-vs-survey-touch)


# Scan vs Touch Modes

## Touch Mode

Touch mode enables the Z offset of your nozzle and scanner coil to be automatically calculated whenever the macro `CARTOGRAPHER_TOUCH`is used.\
\
This means when doing a bed mesh or bed leveling macro, it will still scan along those points.

### When will the nozzle touch my bed?

This will **ONLY** occur during the following commands:

* `CARTOGRAPHER_CALIBRATE` (not METHOD=manual)
* `CARTOGRAPHER_TOUCH_HOME`
* `CARTOGRAPHER_THRESHOLD_SCAN`

It will <mark style="color:red;">**NOT**</mark> touch the bed and will instead use **SCAN** mode for:

* `QUAD_GANTRY_LEVEL`
* `Z_TILT`
* `BED_MESH_CALIBRATE`
* `G28 / HOME`
* `PROBE`
* `PROBE_ACCURACY`

## Scan Mode

This is the same as Touch mode except that it will never touch your bed to automatically calibrate your nozzle to scanner coil offset.

## Have a detailed explanation of Scan vs Touch?

### Scan

Cartographer is based around an LDC1612 Inductance converter chip. This chip creates an oscillating electric field which then induces a corresponding field in the metal of the steel sheet (or bed itself if close enough) and can read the resonance frequency of this field, and then converts this reading into a digital signal to be processed upstream by the MCU. The resonance frequency changes with a change in distance between the coil and the bed (or spring steel sheet, or whatever metal it is triggering off). As the coil gets closer, the frequency gets higher.

In SCAN mode (AKA Cartographer Classic), we calibrate the Cartographer model (via CARTOGRAPHER\_CALIBRATE and the paper test) so that Carto knows that at a specific frequency reading it is exactly a certain distance from the bed, and it knows the distance between this trigger point and the nozzle tip. So using this logic, Cartographer knows that whenever it reads this specific frequency it knows where the nozzle is.

There is an issue with this however, in that the frequency is affected by both distance to bed and the temperature of the coil/LDC chip. So even if you had the cartographer at the exact same height but changed the temperature of the system, it would read a different frequency.

To fix this we use Temperature Compensation. Temp Comp reads the temperature of the coil board and is then able to adjust the frequency value at which it "Triggers" so that the trigger point is still at the same actual Z height every time.

Now, that's old cartographer. Boo. How does the new hotness work?

### Touch

Cartographer Survey doesn't care about absolute frequency values and what Z height that corresponds to. Survey is all based around the change of signal, specifically it detects when the rate of change of the frequency... changes.

As the Cartographer gets closer to the bed, the frequency value increases at a predictable rate, which we can see as a slope on a graph. When Cartographer stops (because the nozzle has now touched the bed) this slope changes angle and flattens out. The Cartographer Survey software detects this change and stops and now knows that the nozzle has touched the bed. Note that the cartographer is still inducing the electric field into the closes metal body, usually the spring steel sheet or the bed itself. For Cartographer Survey to work it needs to be able to induce this field which means it needs metal beneath it, within a few mm.

The real neat thing about this is that because we are just looking at this change of slope, we don't care that this happens at the exact same frequency every time we run a nozzle probing action. This means that even if the frequency values are different (because of different coil temperatures) we can still detect when the slope changes and therefore know when the nozzle touches the bed. So we don't even need any temperature compensation as we don't care about absolute numbers. Neat!

Finally, to tie all this together. We do a SCAN Z homing, which triggers at a certain frequency (FREQ). Then we can do a SCAN bed mesh which will generate a mesh based around the frequency (and therefore distance) variation from the first trigger FREQ. Same with QGL/Z-Tilt, it's based off of the FREQ. At this point we may not know exactly how far this FREQ trigger distance is to the nozzle, so we do a Survey nozzle probing action and now the system knows the Z difference between the FREQ height, and the nozzle height. The bed mesh will be based off of this new "nozzle is here" value and everything works.

Now, because we work in the real world and each printer is different it is common that there is still an additional fixed offset applied even after the nozzle probing action figures out the bed location. This is due to many factors including thermal expansion between nozzle probing temp and printing temp, flex in the toolhead, flex in the bed, inherent noise, etc. The good news is this offset should be a representation of the "system" as a whole and therefore you can change nozzles/sheets and this offset won't change.

<figure><img src="/files/dwDYYhgynfdBL8xi26hq" alt=""><figcaption></figcaption></figure>


# Installation and Setup


# Before You Begin

Before you begin your journey into Cartographer, we've assembled a small list of things to check and be aware of before you start. These will be continued to be mentioned throughout this guide but this is a summary.\
\
If you see the following sections, please take care to READ these as they can be crucial and beneficial to you. As such, please read the entire guide.

{% hint style="info" %}
This box will contain hints and tips that may help with the process.
{% endhint %}

{% hint style="warning" %}
This box contains warnings about the next paragraph/section
{% endhint %}

{% hint style="danger" %}
These boxes contain information that MUST BE FOLLOWED.
{% endhint %}

{% hint style="success" %}
We're you asked to do something? This box will ask you to check if it was successful.
{% endhint %}

* Make sure Cartographer is the mounted within a range of 2.6 to 3mm above the tip of the nozzle.
* Do **NOT** update klipper as soon as a new update is available.
* The Cartographer repo is not dirty, don't press clean.
* Don't use metal brushes.
* Reboot if command not found / option is invalid.
* Cartographer is currently not compatible with beds with embedded magnets such as the Original Prusa Bed, or Mandella Roseworks beds.
* Touch IS NOT available for all beds and printers. It is your responsibility to ensure your printer will work with it. Scan mode is available to you if touch is not.

## Cartographer Classic vs Survey Touch

Whats the difference you might ask? Check out the[ detailed descriptions here!](/cartographer-probe/classic-vs-survey-touch)

If you received a Cartographer probe that looks like below, you have received a probe pre-flashed with Survey Touch.

Both versions use the same initial setup steps, just the calibration steps change.<br>

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td></td><td><img src="/files/cOebxnFyyjrsZxWaoQmE" alt="" data-size="original"></td><td></td></tr><tr><td></td><td><img src="/files/fM9AF0VeW2PNp7PEauba" alt="" data-size="original"></td><td></td></tr></tbody></table>

## Standard vs Right Angle vs Low Profile

For the majority of users, Cartographer assembled in the Standard orientation will work. This is dependent on your printer however. You can always de-solder the board and switch orientations if you're confident with soldering **(However, damaged caused by this process will void your warranty.)**

## What to do if you get stuck

If you get stuck at any point in this guide. Please visit us on discord ([available here](https://discord.gg/yzazQMEGS2))

If you're having issues within klipper/mainsail, please create a thread in the[ Help & Support ](https://discord.com/channels/1165274913624572014/1229798364514750596)section on discord and PLEASE include the following.

* Printer.cfg
* Klippy.log
* Screenshots of the issue if available.
* A detailed description of what you were doing at the time of this issue.

### Using Touch?

Heres a quick check list of things to check prior to asking for assistance if youre having inconsistent touch results or failures.

* [ ] Is cartographer mounted approx within a range of 2.6-3mm **ABOVE** the nozzle tip?
* [ ] Is your toolhead completely rigid?
* [ ] Checked toolhead for loose screws?
* [ ] Checked toolhead for bad wiring?
* [ ] Checked A/B or X/Y and Z belt tension?
* [ ] Checked lead screws?
* [ ] Is your nozzle clean?


# V4 - Switching from USB to CAN

{% hint style="info" %}
This information only applies to Cartographer V4
{% endhint %}

All Cartographer V4 units will ship with USB Firmware on them by default, meaning that if you want to use it for CAN Bus, you will need to switch the firmware. This information will be repeated in the [Firmware](/cartographer-probe/firmware) section of the documentation in far more detail, but these are the basic quick steps to get you setup in CAN mode.\
\
This will set your probe up with a Baudrate of 1,000,000. If you wish to have a baudrate of 500,000 or 250,000 you will need to manually flash it with the firmware for now.

### Step 1 - Plug in your probe to USB

Plug your probe in to your Pi via the USB Cable. You should see the USB Status LED light up on the probe.

<figure><img src="/files/EGkMCttrCOKpDMVhvPf5" alt=""><figcaption><p>The USB Status LED.</p></figcaption></figure>

### Step 2 - Install the Cartographer Firmware Repository

SSH into your Pi, and run the following script.

```bash
cd ~
if [ -d ~/cartographer_firmware/ ]; then
    echo "Directory Exists - Starting Firmware Script"
    cd ~/cartographer_firmware/
    git pull
else
    git clone https://github.com/Cartographer3D/cartographer_firmware.git
    cd ~/cartographer_firmware/
fi
./v4_switch.sh
```

You should see the following screen come up.

<figure><img src="/files/gnLJbk5Tg2tvCZl2CHUd" alt=""><figcaption></figcaption></figure>

### Step 3 - Follow the On Screen Guide

Confirm you are running a Cartographer V4 (this is the single PCB probe) and press Y

it will then run through and flash the Katapult Deployer firmware, this will switch the probe from USB to CAN Bus.

<figure><img src="/files/4Qe00llpx9VQPAXP1Xx0" alt=""><figcaption></figcaption></figure>

Once this screen comes up, you will notice the LED on your probe will have changed from the USB Status LED to the CAN Status LED.

<figure><img src="/files/jDyrBkOTq1JjICRlkafX" alt=""><figcaption></figcaption></figure>

### Step 4 - Select the CAN Firmware you want.

You will be prompted to select from two firmware options, Full or Lite.

Lite Firmware sends reduced instructions from the MCU to your Pi, reducing the load on your system as a whole. This is recommended if you have a lower powered Pi or other MCUs, or get connection losses.

In general, we recommend running the Full firmware, so select the option you want to run.

<figure><img src="/files/n1TrGy0lPZnP5Mwk9wMa" alt=""><figcaption></figcaption></figure>

This will now give you a command (in green) for you to run once you have plugged your Cartographer V4 in to your CAN network.

Copy the command into a notepad document or similar, power off the machine and then connect the probe to the CAN port.\
\
Once you power back on, reconnect via SSH and paste in the commands you copied over.

### Step 5 - Finished :smile:


# Hardware Setup

{% hint style="info" %}
If you bought a Flat Pack and need to assemble your probe, please visit [Assembly](/cartographer-probe/assembly) for instructions. The correct orientation of the MCU and Coilboard is vital.
{% endhint %}

{% hint style="danger" %}

## AFC Lite

We observed that some AFC-Lite Boards (Box Turtle controller) can for unknown reason damage your Cartographer. Therefor we dont recommend running both on the same CAN network as there is a chance of frying your Cartographer.\
\
**Running either over USB is fine.**\
\
Its possible that your AFC-Lite is not affected and that there are other environmental variables at play.
{% endhint %}

## Mount Cartographer

Note there are two different versions of Cartographer, a USB and a CAN version. These will be clearly defined in the section titles when they differentiate. Please make sure you follow the correct guide for the installation of yours.

{% hint style="warning" %}
Make sure carto is the range of 2.6 to 3mm to the nozzle
{% endhint %}

To ensure accuracy, we recommend using the measurement jig developed by Esoterical.

This jig also enables easy viewing of the Y offset; simply print it, mount as illustrated below, and you’ll be able to verify your probe’s Z height in relation to the nozzle.

<figure><img src="/files/3IW5EJxobBi59SOEPo9S" alt=""><figcaption></figcaption></figure>

{% embed url="<https://www.printables.com/model/1060868-cartographer-probe-nozzle-offset-tool>" %}

### Location

Cartographer is designed to use the existing mounts available for similar products on the market. The hole spacing is 31.6mm and it takes M3 bolts.

There should be no metal directly above the Cartographer Coil, this is refered too as the keep out zone. There are three STEP files available on our GitHub ([here](https://github.com/Cartographer3D/cartographer-probe/tree/main/STEP)) that highlight this area.

The probe can be installed in any orentation, you just need to ensure you set the X and Y offset in the config relative to the probes location to the nozzle. The probe also needs to be perfectly flat, if it is at an angle you will get inconsistant results.

Ensure when you are mounting Cartographer that you recess the probe approximatly 3 mm from the Nozzles Z height.

{% hint style="danger" %}
If you use a nozzle brush, ensure that the routing to use that doesnt have your Cartographer travelling over it. I would HIGHLY advise switching to a silicon brush.
{% endhint %}

### Cable Routing

#### USB (both RP2040 and STM32 based probes)

{% hint style="danger" %}
Routing the USB cable correctly is essential, <mark style="color:red;">**the provided cable is NOT rated for being routed through cable chains**</mark>, please mount either along your Bowden or Umbilical path.
{% endhint %}

During installation, try to ensure that the cable will not snag or get caught on anything as this could cause damage to your probe.

It is adviseable to plug your USB Cable directly into a USB Port, using a hub may cause performance limitations.

#### CAN (STM32 based)

Currently we advise that the CAN probe is used with BigTreeTech Toolboards, this is due to their easy addition of a spur.

When install up your CAN probe, please ensure that you add a twist to your white and yellow wires every 24mm.

{% hint style="danger" %} <mark style="color:red;">**NOTE**</mark> <mark style="color:red;">- Cartographer3D Operates at 5v, and requires a 5v input. 24v will not work and will damage your probe beyond repair.</mark>
{% endhint %}

### **CAN Termination**

<figure><img src="/files/Tp3LUNgQd1Z8DmAC2B8O" alt=""><figcaption><p>Position of 120 Ohm Resistor</p></figcaption></figure>


# CAN Termination

### CAN Probe termination status

<table><thead><tr><th width="494">Probe</th><th width="148">Default Status</th></tr></thead><tbody><tr><td>Cartographer V2 CAN (primarily sold pre-2024)</td><td>Disabled</td></tr><tr><td>Cartographer V3 USB/CAN with lis2dw*</td><td>Enabled</td></tr><tr><td>Cartographer V3 USB/CAN with ADXL345</td><td>Disabled</td></tr><tr><td>Cartographer V4 USB/CAN</td><td>Disabled</td></tr></tbody></table>

{% hint style="warning" %}
Do **NOT** measure your resistance while the probe is powered on.\
\
On the Cartographer V3 USB/CAN with lis2dw probe, for the 120ohm resistor to be activated it has to be powered on, and flashed with the CAN firmware. That means that you will not be able to measure if your can lines are at 60 ohms.\
\
If you measure them (while the probe is powered off) and you get 60ohms, that means you have too many 120ohm terminations in your CAN network.
{% endhint %}

### Cartographer w/ Input Shaper (v2)

There are many differing opinions on where and how to terminate your CANBUS setup, if you want to fully meet with spec, you are supposed to terminate on the last device in the chain.\
\
When setting up your probe, this is fairly difficult to do, in this case it can purely be treated like a spur, and you can terminate on your toolhead. With this method, we have not seen any detremental performance or issues.

IF you want to terminate on your Cartographer, this requires two solder points to be bridged together (see below)

<figure><img src="/files/qljmbBePrctHM90DyqrS" alt=""><figcaption></figcaption></figure>

### **Cartographer V3 w/ Input Shaper with lis2dw (USB/CAN Hybrid)**

This version of the probe is terminated with a 120ohm resistor by default when in CAN mode. if you want to remove the 120 Ohm resistor, use a soldering iron to remove the resistor that can be seen below.

<figure><img src="/files/Tp3LUNgQd1Z8DmAC2B8O" alt=""><figcaption></figcaption></figure>

### **Cartographer V3 w/ Input Shaper with ADXL345 (USB/CAN Hybrid)**

With the ADXL version of the probe, we were not able to enable the pre-terminated 120ohm resistor due to the change and implementation of a higher temperature rated multiplexer.

Terminating on the probe is not essential, and we have hundreds of users who terminate on their toolhead with no detrimental issues.

{% hint style="danger" %}
If you enable the 120 Ohm resistor, you will not be able to use the probe in USB mode, this also means to reflash the probe you will be limited to Katapult mode or using a STLink.
{% endhint %}

If you want to terminate on your Cartographer V3 ADXL, this requires the three solder points to be bridged together (see anotated below).

<figure><img src="/files/Vax5gf3l8vstP9Plqusy" alt=""><figcaption></figcaption></figure>

### **Cartographer V4 w/ Input Shaper with ADXL345 (USB/CAN Hybrid)**

As with the Cartographer V3, the V4 version of the probe, we were not able to enable the pre-terminated 120ohm resistor due to the change and implementation of a higher temperature rated multiplexer.

Terminating on the probe is not essential, and we have hundreds of users who terminate on their toolhead with no detrimental issues.

If you want to terminate on your Cartographer V4, this requires the solder points to be bridged together (see anotated below).

<figure><img src="/files/FpXQAlGSM9dDk03NyTK6" alt=""><figcaption></figcaption></figure>


# Stealthburner CW2 Mount

{% hint style="success" %}
If you are using a Cartographer V4.1 in Standard format then this mount is compatible. [Standard format CW2 mount](https://www.printables.com/model/708311-voron-24-stealthburner-beacon-revh).
{% endhint %}

{% hint style="warning" %}
Please note the below mount is NOT compatible with the Cartographer V4 in Standard format, it does however work with the Low Profile format V4.
{% endhint %}

We are a huge fan of [this Stealthburner CW2 mount,](https://www.teamfdm.com/files/file/686-beacon-cw2-stealthburner-alternative-mounts/) so thought we would make an installation guide.

<figure><img src="/files/c6OXmFBVdKLRDTu16Ocu" alt=""><figcaption><p>Step 1 - Heat Set Inserts &#x26; Endstop</p></figcaption></figure>

<figure><img src="/files/ZmnZmmmIRSCjjZII6kOq" alt=""><figcaption><p>Step 2 - Belts</p></figcaption></figure>

<figure><img src="/files/aiCOkZRkpzbdDEceVtpt" alt=""><figcaption><p>Step 3 - Probe Installation</p></figcaption></figure>


# Wiring Diagrams

***

{% hint style="danger" %}

## Cartographer Probes and AFC Lite MMU boards

We observed that some AFC-Lite Boards (Box Turtle controller) can for unknown reason damage your Cartographer. Therefor we dont recommend running both on the same CAN network as there is a chance of frying your Cartographer.\
\
**Running either over USB is fine.**\
\
Its possible that your AFC-Lite is not affected and that there are other environmental variables at play.
{% endhint %}

Below are some wiring diagrams for some common CAN boards used with Klipper.

We will expand out the wiring diagrams as time goes on and more boards are released.

{% hint style="warning" %}
You may not be able to flash your EBB36 or EBB42 over CanBus while Cartographer is connected, simply unplug the CAN H and CAN L pin, flash it and then re-connect after.
{% endhint %}

## BigTreeTech EBB36

### Standard & Low Profile

<figure><img src="/files/gXW3BqeNIBjDtaDlNjq0" alt=""><figcaption><p>EBB36 &#x26; Cartographer CAN Probe (Low Profile / Standard)</p></figcaption></figure>

{% hint style="info" %}
You should apply a twist to your CAN H and CAN L cables every 24mm
{% endhint %}

### Right Angle

<figure><img src="/files/vAzkOCo8XR9SKY9vJq4c" alt=""><figcaption><p>EBB36 &#x26; Cartographer CAN Probe (Right Angle)</p></figcaption></figure>

{% hint style="info" %}
You should apply a twist to your CAN H and CAN L cables every 24mm
{% endhint %}

## BigTreeTech EBB42

### Standard & Low Profile

<figure><img src="/files/euwk4M3nyPG6p7WUMtYn" alt=""><figcaption><p>EBB42 &#x26; Cartographer CAN Probe (Low Profile / Standard)</p></figcaption></figure>

{% hint style="info" %}
You should apply a twist to your CAN H and CAN L cables every 24mm
{% endhint %}

### Right Angle

<figure><img src="/files/fsSJfnafuN6U71awDVqw" alt=""><figcaption><p>EBB42 &#x26; Cartographer CAN Probe (Right Angle)</p></figcaption></figure>

{% hint style="info" %}
You should apply a twist to your CAN H and CAN L cables every 24mm
{% endhint %}

## SB2209/SB2240 (via SB0000 breakout board)

### Standard & Low Profile

<figure><img src="/files/9KC0WL8mkjhFugu70pHi" alt=""><figcaption><p>SB0000 &#x26; Cartographer CAN Probe (Standard / Low Profile)</p></figcaption></figure>

{% hint style="info" %}
You should apply a twist to your CAN H and CAN L cables every 24mm
{% endhint %}

### Right Angle

<figure><img src="/files/b9leyWKdgl5PX0u8dja3" alt=""><figcaption><p>SB0000 &#x26; Cartographer CAN Probe (Right Angle)</p></figcaption></figure>

{% hint style="info" %}
You should apply a twist to your CAN H and CAN L cables every 24mm
{% endhint %}

## USB Wiring

#### Standard Format Cartographer USB Wiring

<figure><img src="/files/sLmfTew7op4O6bZlwRmm" alt="" width="563"><figcaption></figcaption></figure>

Wiring for the USB connector is in order

* Ground
* DATA +
* DATA -
* 5V

#### Right Angle Format Cartographer USB Wiring

<figure><img src="/files/IdyeN0YepxAV8D1TV6PN" alt="" width="563"><figcaption></figcaption></figure>

Wiring for the USB connector is in order

* 5V
* DATA -
* DATA +
* Ground


# Software Configuration

The following plugin requires **Klipper version 0.13 and later or Kalico** .

It is recommended that you run this on a **Raspberry Pi** or a similar device with an **up-to-date operating system**.

Please note, there is a high likelihood that this will **not function correctly on modified forks of Klipper**, such as those supplied with **Sovol, Elegoo, or Creality printers**. If you are running of them I would recommend using the origianl plugin available [here](/cartographer-probe/archive/classic-installation/klipper-configuration)


# Klipper Setup

Quick overview of the steps needed to setup the Cartographer3D Klipper plugin

{% hint style="danger" %}
If you are updating to the NEW Cartographer plugin, then it is necessary to remove parts of your old config to avoid Klipper errors. **Therefore it is recommend to back-up your config to reference later.**
{% endhint %}

It is necessary to remove all instances of \[scanner] from your printer.cfg, this INCLUDES any from the SAVE\_CONFIG section at the bottom of the printer.cfg. Once you have done this save the file and you will return to the file directory.

Now open the moonraker.conf file, here you want to remove the old Cartographer Plugin update section, you added when you installed the old plugin.

Once you save and restart you will get a Klipper error for Unkown Pin Probe, this is normal and you can proceed to installation of the Klipper plugin below.

## Installation Klipper plugin

A script has been made to simplify the process of installing the plugin.

The defaults assumes that klipper is in `~/klipper` and the klippy-env is in `~/klippy-env`.\
This should be standard on [KIAUH](https://github.com/dw-0/kiauh) and [MainsailOS](https://docs-os.mainsail.xyz/).

Run this command to install, customizing the paths if needed.

{% code overflow="wrap" %}

```sh
curl -s -L https://raw.githubusercontent.com/Cartographer3D/cartographer3d-plugin/refs/heads/main/scripts/install.sh | bash -s -- --klipper ~/klipper --klippy-env ~/klippy-env
```

{% endcode %}

## Download the Cartographer Firmware Repository

You should download the Cartographer firmware repository to update your probe to the latest compatible firmware.

```bash
cd ~
git clone https://github.com/Cartographer3D/cartographer_firmware.git
```

## Configure Moonraker Update Manager

```yaml
[update_manager cartographer_plugin]
type: python
channel: stable
virtualenv: ~/klippy-env
project_name: cartographer3d-plugin
is_system_service: False
managed_services: klipper
info_tags: desc=Cartographer Plugin

[update_manager Cartographer Firmware]
type: git_repo
path: ~/cartographer_firmware
is_system_service: False
origin: https://github.com/Cartographer3D/cartographer_firmware.git
primary_branch: main

```

## Configure Klipper

Below are the minimum, required, options listed. Except for the `temperature_sensor` blocks, you can omit those if you don't want to monitor temperature.

You will need to adjust this config for your printer and your probe, this is done by modifying the sections labeled \`\<blank>\`

{% hint style="warning" %}
You MUST configure your homing of G28 to home in the middle of your bed, for example if you're using endstops you should add

```
[safe_z_home]
home_xy_position: 150, 150 # This should be for the CENTRE OF YOUR BED.
```

Documentation for [safe\_z\_home](https://www.klipper3d.org/Config_Reference.html#safe_z_home) here.\
\
If you're using sensorless, you may need to setup a `[homing_override]` details available [here](https://www.klipper3d.org/Config_Reference.html#homing_override)
{% endhint %}

```yaml
[stepper_z]
endstop_pin: probe:z_virtual_endstop
homing_retract_dist: 0

[mcu cartographer] # See https://www.klipper3d.org/Config_Reference.html#mcu
# Remove either the serial or canbus_uuid line dependant on your setup.
serial: <blank>
canbus_uuid: <blank>
restart_method: command # Not needed for probes using CAN. 

[cartographer]
mcu: cartographer
x_offset: <blank> # This is the offset of your probe from the nozzle tip, to the centre of the coil.
y_offset: <blank> # This is the offset of your probe from the nozzle tip, to the centre of the coil.
verbose: no # For extra output

[bed_mesh]
zero_reference_position: <blank>, <blank> # The centre of your bed. 
speed: 300
horizontal_move_z: 3
mesh_min: <blank>, <blank> # The first probed coordinate, nearest to the origin. This coordinate is relative to the probe's location.
mesh_max: <blank>, <blank> # The probed coordinate farthest from the origin. This is not necessarily the last point probed, as the probing process occurs in a zig-zag fashion. As with mesh_min, this coordinate is relative to the probe's location.
probe_count: 20, 20
adaptive_margin: 10
mesh_pps: 0,0 # Disable interpolation - mesh is probably dense enough

[temperature_sensor cartographer]
sensor_type: temperature_mcu
sensor_mcu: cartographer
min_temp: 5
max_temp: 105

[adxl345]
# Select 1 of the cs_pin below depending on the probe you have. 
# Having the wrong one selected will cause an Endless Bootloop
# Cartographer V4 has int2 connected to the probes PA1 pin
cs_pin: cartographer:PA3 # For Cartographer V3
cs_pin: cartographer:PA0 # For Cartographer V4
spi_bus: spi1

[resonance_tester]
accel_chip: adxl345
probe_points:
    <blank>, <blank>, 20 # Fill out the blank with x and y coordinates where you want to run the resonance test.
```

## Finding the Serial or UUID

Note, you need to replace the serial path or UUID with your probes serial path or UUID, this can be found by running the following commands

For USB based probes

```bash
ls /dev/serial/by-id/*
```

For CAN based probes

{% hint style="info" %}
If you order a CAN Probe it will have it's baud rate set at 1,000,000. Make sure your system matches that.
{% endhint %}

```bash
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0
```

Take note of either the Serial ID or the UUID.

## Update your probe

Now your probe is in your configuration, it is advisable to update the probe to the latest firmware version available to you.\
\
Instructions on how to update your probe are available [here](https://docs.cartographer3d.com/cartographer-probe/firmware/updating-firmware).

## Calibration

Cartographer provides two methods of homing.\
We recommend always using the default scan method for general homing and using `CARTOGRAPHER_TOUCH_HOME` after all levelling has been done, just before your print starts.

Continue with [Scan Calibration](/cartographer-probe/installation-and-setup/software-configuration/scan-calibration) and [Touch calibration](/cartographer-probe/installation-and-setup/software-configuration/touch-calibration).


# Scan Calibration

Go through calibration of your Cartographer

{% 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.
{% endstep %}
{% endstepper %}


# Touch calibration

{% hint style="warning" %}
This calibration will enable Survey Touch macros. A misconfigured touch model or printer can cause physical damage to your printer. It is *important* that you verify that everything is rigid, that all bolts are tightened. This should be checked frequently.
{% endhint %}

{% 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 %}

{% hint style="info" %}
You *can* calibrate Survey Touch without homing Z. This means we can calibrate Survey Touch first and then use `CARTOGRAPHER_SCAN_CALIBRATE METHOD=touch` to skip the manual adjustments *and* get a more precise scan model.
{% endhint %}

{% stepper %}
{% step %}

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

```
G28 X Y
```

{% endstep %}

{% step %}

### Prepare to run touch calibration

{% hint style="warning" %}
**Ensure that your nozzle and bed is clean.**

**Ensure that your probe is between 2.6mm and 3mm above the nozzle.**

**Double check that your gantry and kinematics are rigid.**

**It is helpful to have a level bed.** Prefer running `QUAD_GANTRY_LEVEL` or `Z_TILT_ADJUST` if possible. This would usually require scan being calibrated.
{% endhint %}
{% endstep %}

{% step %}

### Start calibration routine

{% hint style="danger" %}
Keep your finger on the emergency stop button in case it does not stop at your bed.
{% endhint %}

Start the calibration by running

{% code fullWidth="false" %}

```
CARTOGRAPHER_TOUCH_CALIBRATE
```

{% endcode %}

Observe your nozzle to make sure it touches on the bed.

If it never touches the bed, refer to [#nozzle-never-touches-the-bed](#nozzle-never-touches-the-bed "mention")
{% 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 use `CARTOGRAPHER_TOUCH_*`.

```
SAVE_CONFIG
```

{% endstep %}
{% endstepper %}

### Troubleshooting

#### Nozzle never touches the bed

You should ensure that your Z motion is smooth and clean. Gunk and noise that is not evident while moving up and down may be detected by Cartographer and make it believe it touched the bed. After checking everything, run `CARTOGRAPHER_TOUCH_CALIBRATE` again.

If it is still a problem, you can pass in a `START` parameter. `CARTOGRAPHER_TOUCH_CALIBRATE START=123` where 123 is above the threshold it previously stopped at.\
If it stops without ever touching the bed and never finds a threshold you can increase the max threshold with the `MAX` parameter, `CARTOGRAPHER_TOUCH_CALIBRATE MAX=5000`.


# PRINT\_START template

Here is a template print start. You will need to adjust it to fit your printer, but this will show where the `CARTOGRAPHER_TOUCH_HOME` belongs compared to the other usual bed levelling macros.

```gcode
[gcode_macro PRINT_START]
gcode:
  ("Check preconditions and get print temperatures") ; Replace with your real macro
  SET_GCODE_OFFSET Z=0 ; Reset Z offset
  G28 ; Home all axes
  G90 ; Set to absolute positioning
  
  M104 S150 ; Heat nozzle to soften filament leftovers
  ("Heat bed to print temperature, M190 S{target_bed}") ; Replace with your real macro
  
  ("QUAD_GANTRY_LEVEL or Z_TILT_ADJUST") ; Replace with your real macro
  M109 S150 ; Ensure nozzle is at 150C, in case it was hot when print started.
  CARTOGRAPHER_TOUCH_HOME ; Home for real Z0

  ("Do BED_MESH_CALIBRATE ADAPTIVE=1") ; Replace with your real macro

  ("Do the rest - heat to print temperature and prime") ; Replace with your real macro
```


# Z Offset

{% hint style="info" %}
If you are using `CARTOGRAPHER_TOUCH_HOME`, you shouldn't have to care about your scan offset. Everything that scan is used for, is relative to itself and the Z-offset is a constant that is applied to every measurement. Thus it *only* has an impact, if you start printing without using `CARTOGRAPHER_TOUCH_HOME`.
{% endhint %}

We implement Klipper's `Z_OFFSET_APPLY_PROBE` , this will apply the offset to the *last* homed mode used. This means if the last mode you used was `G28`, it will apply the offset to your scan model. If the last mode you used was `CARTOGRAPHER_TOUCH_HOME` it will apply to your touch model.

### Babystep adjusting Z offset

We recommend you follow [Ellis' Print Tuning Guide](https://ellis3dp.com/Print-Tuning-Guide/articles/first_layer_squish.html).

This is easiest to do through Mainsail or Fluidd. These will show a button to adjust your z offset "live", during a print. You must use the save icon that appears next to the adjustment controls AS WELL as a SAVE\_CONFIG.

Short version is to run the following macros to adjust gcode while printing a bunch of first layer squares, until you achieve the perfect first layer.

To move **up**, use `SET_GCODE_OFFSET Z_ADJUST=+0.01 MOVE=1`

To move **down**, use `SET_GCODE_OFFSET Z_ADJUST=-0.01 MOVE=1`

To finalize, use `Z_OFFSET_APPLY_PROBE`, you can then see what changed

> cartographer: touch default z\_offset: -0.1

Remember to run `SAVE_CONFIG` to persist the change to your configuration.

{% hint style="info" %}
A smaller number means a larger distance between the bed and the nozzle. This can seem counterintuitive, but this is to keep it in line with Klipper's virtual probe, and makes sense from a technical point of view.

The user should never change the number manually in the config, as that can risk causing issues.
{% endhint %}


# Creality K1 & K1 Max Specific

The following guide is exceptionally useful and provides the latest support for the Creality K1, K1 Max and K1C Printers.\
\
Note - there is a special K1 specific firmware which might improve performance due to the low powered MCU/SBC on the Creality K1.

{% embed url="<https://pellcorp.github.io/creality-wiki/cartographer/>" %}


# Qidi Specific Installation Instructions

**print3d\_one** has put together this outstanding guide on how to install on a Qidi's Vanilla Klipper installation, please check it out if this will help you!

{% embed url="<https://openqidi.com/books/upgrades-updates/page/cartographer-probe-installation-on-vanilla-klipper>" %}


# Features


# Scanning

Cartographer implements a Klipper [probe](https://www.klipper3d.org/Config_Reference.html#probe) interface and exposes functionality similar to what you'd expect from an induction probe, with the benefit of eddy current for accurate measurements.

This means that homing, `QUAD_GANTRY_LEVEL` and `Z_TILT_ADJUST`, simply works as expected, but looks slightly different. Cartographer will lower until the trigger point of 2 mm and will then take 20 readings of the frequency to determine the exact distance.\
This means there is on reason to lift the probe and run a probing move again.

#### Measure probe accuracy

We can check the accuracy of the scan by running `PROBE_ACCURACY`.\
This will run a few probes and output some statistics, like seen below.

> probe accuracy results: maximum 2.000898, minimum 1.999665, range 0.001233, average 2.000008, median 1.999758, standard deviation 0.000449

## Bed mesh calibrate

We can make use of the probes ability to take rapid measurements by scanning as we move quickly across the bed.

After setting up Cartographer, your `BED_MESH_CALIBRATE` macro will by default do this.

To take full advantage, we should increase the density of the mesh. We should be able to move across the bed with a speed of at least 300 mm/s.

To fall back to the default Klipper behavior, run `BED_MESH_CALIBRATE METHOD=automatic` .


# Touch

Cartographer can make use of the eddy current to repeatably measure the distance from the bed to the probe. By observing this, we are able to stop as soon as the nozzle touches the bed, as the distance will stop decreasing.

## Touch homing

Use `CARTOGRAPHER_TOUCH_HOME` in your start print to home your printer using Survey Touch. Make sure your nozzle is below 150 degrees and make sure your bed is level.

## Measuring touch accuracy

We can check the accuracy of the touch by running `CARTOGRAPHER_TOUCH_ACCURACY`.\
This will run a few touches and output some statistics, like seen below.

> touch accuracy results: maximum -0.063035, minimum -0.065535, range 0.002500, average -0.064035, median -0.063660, standard deviation 0.000848 median absolute deviation 0.000625

## Bed mesh calibrate

{% hint style="danger" %}
Touch Mesh not currently implemented
{% endhint %}

We support touching the bed to calibrate a bed mesh. This can be useful especially to discover probe bias or problem sections of the bed. We can compare the touched mesh to the one generated by scan.

{% hint style="info" %}
Remember to adjust probe count. Executing 400 touches takes a long time.
{% endhint %}

Run `BED_MESH_CALIBRATE METHOD=touch PROBE_COUNT=5,5`

Cartographer will automatically adjust the mesh boundaries based on your configuration, to ensure your nozzle and probe are not off the bed.

> Updating MESH\_MIN from config value (13.0, 11.0) to (13.0, 28.74)\
> Updating MESH\_MAX from config value (215.0, 206.0) to (214.72, 206.0)


# Z Backlash Estimation

We can measure any backlash on the z movements.\
This is useful to increase the precision on any moves done by the Cartographe3D plugin, but also useful to diagnose problems in Z motions, like belt tension and lead screws.

You can run `CARTOGRAPHER_ESTIMATE_BACKLASH CALIBRATE=1` to calibrate the backlash at your zero reference position.

Can move your toolhead to anywhere on the plate and run `CARTOGRAPHER_ESTIMATE_BACKLASH` for that position. Your backlash should be similar on all spots on your plate.\
A good test is to run backlash estimation close by your mounting points for whatever drives your Z.


# Axis Twist Compensation

<br>

{% hint style="warning" %}
This requires Scan Calibration AND Touch Calibration
{% endhint %}

We can automate axis twist compensation calibration using touch to get the nozzle offset. Simply run `CARTOGRAPHER_AXIS_TWIST_COMPENSATION` and let Cartographer do the rest. Remember to run `SAVE_CONFIG` to persist the change.

You MUST ensure that your Twist Axis is within your probe boundaries.<br>

{% hint style="success" %}
You can pass an axis to compensate along both axes, using `AXIS=Y`.
{% endhint %}

{% hint style="success" %}
If your axis twist is dependent on chamber temperature, you can run `CARTOGRAPHER_AXIS_TWIST_COMPENSATION` as part of your start print macro.\
\
Just remember to run it *after* leveling your bed and *before* bed mesh calibrate.
{% endhint %}

**Unknown command "CARTOGRAPHER\_AXIS\_TWIST\_COMPENSATION"**

You will need to enable the `axis_twist_compensation` function by adding the below section in your printer config. For [Klipper](https://www.klipper3d.org/Config_Reference.html?h=axis_#axis_twist_compensation) it can be empty, for [Kalico](https://docs.kalico.gg/Config_Reference.html#axis_twist_compensation) you need to define some fields.<br>

```
[axis_twist_compensation]
```


# Coil Temperature Offset Calibration

{% hint style="info" %}
This calibration is not necessary when using [Touch](/cartographer-probe/features/touch)
{% endhint %}

This calibration aims to optimize the temperature compensation parameters and reduce the temperature drift of the coil.

It usually takes **between one and three hours** to gather the necessary samples. It can take longer.

During this calibration, your bed will heat up and move close to the nozzle, it will stay in still until the coil has reached target temperature. The bed will then lower to a cooling position and your part cooling fan will turn on to assist in cooling the coil.

We recommend tuning the parameters to fit your printer, as that will allow the calibration to complete faster. A bed temperature of 110 or above is usually required to reach a coil temperature of 70.

{% hint style="info" %}
Your hotend cooling fan may start during this process. This may impact the ability to heat your coil.\
If possible, please adjust the trigger for the hotend cooling fan to keep it off during this calibration.

```
[heater_fan hotend_fan]
heater: extruder
heater_temp: 100
# Increase this, remember to revert!
```

{% endhint %}

Home your printer using `G28` then start the macro by executing the below, changing the parameters to fit your setup.

```
CARTOGRAPHER_TEMPERATURE_CALIBRATE MIN_TEMP=40 MAX_TEMP=<60|70> BED_TEMP=<90|110> Z_SPEED=5
```

For example the above command with a max coil temp of 70°c & a bed temp of 110°C would be formatted like the below example and used to execute the calibration.

```
CARTOGRAPHER_TEMPERATURE_CALIBRATE MIN_TEMP=40 MAX_TEMP=70 BED_TEMP=110 Z_SPEED=5
```

Wait for the calibration to complete. It will inform you that calibration is complete and that you should `SAVE_CONFIG` to save the model to your config.

{% hint style="info" %}
If you changed your `hotend_fan` configuration, remember to revert this *after* saving the calibration!
{% endhint %}


# Reference


# Configuration Reference

Auto-generated from plugin source.

## Cartographer

```ini
[cartographer]
mcu:
#   The name of the Cartographer MCU, as defined by your [mcu cartographer] section.
x_offset:
#   The distance (in mm) between the probe and the nozzle along the x-axis.
y_offset:
#   The distance (in mm) between the probe and the nozzle along the y-axis.
#travel_speed: 50
#   The speed (in mm/s) of all travel moves.
#   Constraints: minimum: 1
#lift_speed: 5
#   The speed (in mm/s) of all Z lift moves.
#   Constraints: minimum: 1
#verbose: False
#   Set to yes to enable debug output.
#macro_prefix: None
#   A prefix to register a second set of Cartographer macros using, alongside 'CARTOGRAPHER_'. E.g. 'CARTO' would result in 'CARTO_TOUCH_HOME'.
#register_as_probe: True
#   When true, Cartographer registers as the 'probe' printer object and 'probe:' pin chip, overriding PROBE/PROBE_ACCURACY/QUERY_PROBE/Z_OFFSET_APPLY_PROBE commands. When false, Cartographer registers its endstop under the 'cartographer_probe:' pin chip and does not claim the 'probe' object, allowing a separate [probe] section to coexist.
```

## Scan

```ini
[cartographer scan]
#probe_speed: 5
#   Speed (in mm/s) of the Z axis when probing.
#   Constraints: minimum: 0.1
#mesh_runs: 1
#   Number of runs when doing a scan mesh. Consecutive runs will trace back the way it came from.
#mesh_height: 3
#   The height (in mm) of the head when doing a mesh run.
#   Constraints: minimum: 1
#mesh_direction: 'x'
#   Axis of which to do the most moves along.
#   Allowed values: x, y
#mesh_path: 'snake'
#   The path to use when calibrating a scan mesh.
#   Allowed values: snake, alternating_snake, spiral, random
```

## Touch

```ini
[cartographer touch]
#samples: 3
#   The number of samples to use when doing a touch.
#   Constraints: minimum: 3
#max_samples: 10
#   The maximum number of samples to do before giving up.
#max_noisy_samples: 2
#   The number of noisy samples tolerated within the sliding window. The window size is calculated as samples + max_noisy_samples. A smaller value prevents cherry-picking good samples from a noisy sequence.
#   Constraints: minimum: 0
#UNSAFE_max_touch_temperature: 150
#   The maximum allowed nozzle temperature to use when touching the plate. This is set to 150C to avoid damaging your plate. Change this AT YOUR OWN RISK.
#EXPERIMENTAL_home_random_radius: 0.0
#   Radius around the Z home position to do touch.
#   Constraints: minimum: 0.0
#retract_distance: 2.0
#   Retract distance (in mm) between touch samples.
#   Constraints: minimum: 1.0
#sample_range: 0.01
#   Acceptable range (in mm) between touch samples.
#   Constraints: minimum: 0.001, maximum: 0.015
```

## Bed Mesh

```ini
[bed_mesh]
mesh_min:
#   Minimum coordinates of the mesh area.
mesh_max:
#   Maximum coordinates of the mesh area.
probe_count:
#   Number of probe points in X and Y.
zero_reference_position:
#   Position used as zero reference for the mesh.
faulty_regions:
#   Regions to exclude from mesh probing.
#speed: 50
#   Travel speed during mesh probing.
#   Constraints: minimum: 1
#horizontal_move_z: 5
#   Z height for horizontal moves during mesh.
#   Constraints: minimum: 1
#adaptive_margin: 5
#   Margin for adaptive mesh boundaries.
#   Constraints: minimum: 0
```

## Coil

```ini
[cartographer coil]
#name: 'cartographer_coil'
#   The name of the coil temperature sensor.
#min_temp: 0
#   The minimum temperature of the coil, below this will trigger a warning.
#   Constraints: minimum: -273.15
#max_temp: 105
#   The maximum temperature of the coil, above this will trigger a warning.
```


# Macro Reference

Auto-generated from plugin source.

### PROBE

Probe the bed to get the height offset at the current position.

*This macro accepts no parameters.*

### PROBE\_ACCURACY

Probe the bed multiple times to measure the accuracy of the probe.

```
  LIFT_SPEED (float, default: config 'general.lift_speed'): Lift speed in mm/s
    Constraints: minimum: 1
  SAMPLE_RETRACT_DIST (float, default: 1.0): Retract distance between samples
    Constraints: minimum: 1.0
  SAMPLES (int, default: 10): Number of probe samples
    Constraints: minimum: 3
```

*Some defaults are inherited from your configuration. See General.*

**Example:**

```
PROBE_ACCURACY LIFT_SPEED=<lift_speed> SAMPLE_RETRACT_DIST=1.0 SAMPLES=10
```

### QUERY\_PROBE

Return the status of the z-probe

*This macro accepts no parameters.*

### Z\_OFFSET\_APPLY\_PROBE

Adjust the probe's z\_offset

*This macro accepts no parameters.*

### BED\_MESH\_CALIBRATE

Gather samples across the bed to calibrate the bed mesh.

```
  METHOD (str, default: 'scan'): Calibration method
  MESH_MIN (str | None, default: None): Minimum mesh coordinate (x,y)
  MESH_MAX (str | None, default: None): Maximum mesh coordinate (x,y)
  PROBE_COUNT (str | None, default: None): Number of probe points (x,y)
  ADAPTIVE (int, default: 0): Enable adaptive meshing (0 or 1)
  ADAPTIVE_MARGIN (float, default: config 'bed_mesh.adaptive_margin'): Margin for adaptive mesh
    Constraints: minimum: 0
  PROFILE (str, default: 'default'): Mesh profile name
  DIRECTION (MeshDirection, default: config 'scan.mesh_direction'): Primary scan direction
    Allowed values: x, y
  PATH (MeshPath, default: config 'scan.mesh_path'): Scan path pattern
    Allowed values: snake, alternating_snake, spiral, random
  SPEED (float, default: config 'bed_mesh.speed'): Scan speed
    Constraints: minimum: 50
  HEIGHT (float, default: config 'scan.mesh_height'): Scan height
    Constraints: minimum: 0.5, maximum: 5
  RUNS (int, default: config 'scan.mesh_runs'): Number of scan passes
    Constraints: minimum: 1
```

*Some defaults are inherited from your configuration. See Bed Mesh, Scan.*

**Example:**

```
BED_MESH_CALIBRATE METHOD=scan ADAPTIVE=0 ADAPTIVE_MARGIN=<adaptive_margin> PROFILE=default DIRECTION=<direction> PATH=<path> SPEED=<speed> HEIGHT=<height> RUNS=<runs>
```

### CARTOGRAPHER\_QUERY

Query current cartographer state

```
  FIELD (QueryField, default: 'all'): Field to query
    Allowed values: touch, scan, mcu, all
```

**Example:**

```
CARTOGRAPHER_QUERY FIELD=all
```

### CARTOGRAPHER\_STREAM

Controls a data stream of the cartographer readings to a file.

```
  ACTION (StreamAction, default: 'status'): Stream action
    Allowed values: start, stop, cancel, status
  FILE (str | None, default: None): Output file path
```

**Example:**

```
CARTOGRAPHER_STREAM ACTION=status
```

### CARTOGRAPHER\_TEMPERATURE\_CALIBRATE

Calibrate temperature compensation for frequency drift

```
  MIN_TEMP (int, default: 40): Minimum coil temperature
    Constraints: minimum: 40, maximum: 50
  MAX_TEMP (int, default: 60): Maximum coil temperature
    Constraints: minimum: 60, maximum: 90
  BED_TEMP (int, default: 90): Bed temperature target
    Constraints: minimum: 90, maximum: 120
  Z_SPEED (int, default: 5): Z movement speed
    Constraints: minimum: 1
```

**Example:**

```
CARTOGRAPHER_TEMPERATURE_CALIBRATE MIN_TEMP=40 MAX_TEMP=60 BED_TEMP=90 Z_SPEED=5
```

### CARTOGRAPHER\_SCAN\_CALIBRATE

Run the scan calibration

```
  MODEL (str, default: 'default'): Model name
  METHOD (ScanCalibrateMethod, default: 'manual'): Calibration method
    Allowed values: touch, manual
```

**Example:**

```
CARTOGRAPHER_SCAN_CALIBRATE MODEL=default METHOD=manual
```

### CARTOGRAPHER\_SCAN\_ACCURACY

Collect samples from the probe and calculate statistics on the results.

```
  READINGS (int, default: 20): Readings per sample
    Constraints: minimum: 1
  SAMPLES (int, default: 100): Number of samples to collect
    Constraints: minimum: 10
```

**Example:**

```
CARTOGRAPHER_SCAN_ACCURACY READINGS=20 SAMPLES=100
```

### CARTOGRAPHER\_SCAN\_MODEL

Manage saved scan models

```
  LOAD (str | None, default: None): Model name to load
  REMOVE (str | None, default: None): Model name to remove
```

**Example:**

```
CARTOGRAPHER_SCAN_MODEL
```

### CARTOGRAPHER\_ESTIMATE\_BACKLASH

Do a series of moves to estimate backlash on the Z axis.

```
  CALIBRATE (bool, default: No): Run calibration and save result
  ITERATIONS (int, default: 10): Number of measurement iterations
    Constraints: minimum: 1
  DELTA (float, default: 0.2): Movement delta in mm
    Constraints: minimum: 0.2, maximum: 1
```

**Example:**

```
CARTOGRAPHER_ESTIMATE_BACKLASH CALIBRATE=no ITERATIONS=10 DELTA=0.2
```

### CARTOGRAPHER\_TOUCH\_CALIBRATE

Run the touch calibration

```
  MAX_VERIFY_RANGE (float, required): Maximum verification range
  MODEL (str, default: 'default'): Model name
  SPEED (int, default: 2): Probing speed
    Constraints: minimum: 1, maximum: 5
  START (int, default: 500): Starting threshold
    Constraints: minimum: 100
  MAX (int, default: 5000): Maximum threshold
    Constraints: minimum: 100
  VERIFICATION_SAMPLES (int, default: 10): Verification sample count
    Constraints: minimum: 3, maximum: 20
```

**Example:**

```
CARTOGRAPHER_TOUCH_CALIBRATE MAX_VERIFY_RANGE=<max_verify_range> MODEL=default SPEED=2 START=500 MAX=5000 VERIFICATION_SAMPLES=10
```

### CARTOGRAPHER\_TOUCH\_MODEL

Manage saved touch models

```
  LOAD (str | None, default: None): Model name to load
  REMOVE (str | None, default: None): Model name to remove
```

**Example:**

```
CARTOGRAPHER_TOUCH_MODEL
```

### CARTOGRAPHER\_TOUCH\_PROBE

Touch the bed to get the height offset at the current position.

*This macro accepts no parameters.*

### CARTOGRAPHER\_TOUCH\_ACCURACY

Touch the bed multiple times to measure the accuracy of the probe.

```
  LIFT_SPEED (float, default: config 'general.lift_speed'): Lift speed in mm/s
    Constraints: minimum: 1
  SAMPLE_RETRACT_DIST (float, default: 1.0): Retract distance between samples
    Constraints: minimum: 1.0
  SAMPLES (int, default: 5): Number of probe samples
    Constraints: minimum: 3
```

*Some defaults are inherited from your configuration. See General.*

**Example:**

```
CARTOGRAPHER_TOUCH_ACCURACY LIFT_SPEED=<lift_speed> SAMPLE_RETRACT_DIST=1.0 SAMPLES=5
```

### CARTOGRAPHER\_TOUCH\_HOME

Touch the bed to home Z axis

```
  EXPERIMENTAL_RANDOM_RADIUS (float, default: config 'touch.EXPERIMENTAL_home_random_radius'): Random homing radius
    Constraints: minimum: 0
```

*Some defaults are inherited from your configuration. See Touch.*

**Example:**

```
CARTOGRAPHER_TOUCH_HOME EXPERIMENTAL_RANDOM_RADIUS=<experimental_random_radius>
```

### CARTOGRAPHER\_AXIS\_TWIST\_COMPENSATION

Scan and touch to calculate axis twist compensation values.

```
  USE_TOUCH_BOUNDARIES (bool, default: No): Use touch boundaries for calibration range
  AXIS (str, default: 'x'): Axis to compensate (x or y)
  SAMPLE_COUNT (int, default: 5): Number of sample points
  START (float | None, default: None): Override start position
  END (float | None, default: None): Override end position
  LINE (float | None, default: None): Override line position
```

**Example:**

```
CARTOGRAPHER_AXIS_TWIST_COMPENSATION USE_TOUCH_BOUNDARIES=no AXIS=x SAMPLE_COUNT=5
```


# Firmware

Cartographer Firmware is based off a Klipper fork available [here](https://github.com/Cartographer3D/MCU-Firmware---Based-on-Klipper/), without the amazing work done by the Klipper team, none of this would be possible.

### Cartographer Firmware Versions

Cartographer Firmware is provided as a pre-complied binary, ready for you to flash onto your probe and use it.

#### Which firmware for which device?

Not all firmware is compatible with EVERY device, for example Cartographer V1 used a RP2040, V2 and V3 used a stm32f042 and V4 uses a stm32g431. You need to ensure you use the correct firmware for the right device else you could potentially brick it, at the minimum you would need re-flash via DFU mode.

#### Which file should I use?

In our Firmware repository, there are a lot of different firmware files to choose from, this guide should help you understand which to select.

**Combined Firmwares**

The combined firmware is a pre-compiled version of the Cartographer Firmware with the Katapult Bootloader pre-installed, this is to ONLY BE INSTALLED VIA DFU. You should always install this at the memory location of `0x08000000` if you flash this via Katapult, you will have a bad time and will be required to re-flash your probe.

This is available at `~/cartographer_firmware/firmware/probe_version/combined-firmware`

<figure><img src="/files/CTquwC8mNov9AfVGumhU" alt=""><figcaption></figcaption></figure>

**Katapult**

This is the Katapult bootloader, it is a bootloader tool that will allow you to update your Cartographer probe without having to gain access to it or put it into DFU mode. This should be flashed at `0x8000000`. You would typically originally flash this via DFU mode, but once it is on your probe it shouldn't need updating.

This is available at `~/cartographer_firmware/firmware/probe_version/katapult`

<figure><img src="/files/VPKARIzXIVzyJ6BtnFAq" alt=""><figcaption></figcaption></figure>

**Katapult Deployer**

The Katapult deployer is version of Katapult which can be deployed via Katapult and will allow you to switch the operating mode of your probe. i.e. If you are using your probe via USB and want to switch it to CAN, you would use Katapult to deploy the Katapult Deployer for CAN, which would convert the bootloader from USB to CAN, it would also then wipe your original firmware and allow you to deploy your new firmware via your new protocol.

This is available at `~/cartographer_firmware/firmware/probe_version/katapult-deployer`

<figure><img src="/files/yJ6dT2MZIlerYzIq4u3t" alt=""><figcaption></figcaption></figure>

**Cartographer Firmware**

This is your main Cartographer Firmware, you will need to match this with the protocol you are using i.e. CAN and specific baudrate or USB. You would also need to select if you want a Full or Lite firmware (more information can be found [here](#full-vs-lite-firmwares))

You must also ensure you select the correct firmware for the hardware you have i.e. do not flash V4 firmware to a V3 or vice versa.

This is available at `~/cartographer_firmware/firmware/probe_version/firmware`

<figure><img src="/files/aDFsLExu0zYHB86q6uvS" alt=""><figcaption></figcaption></figure>

#### Full vs Lite Firmwares

We have recently started distributing out a Full and a Lite firmware, these perform pretty much the same, with the exception that lite has a reduced number of samples being sent to your pi in order to reduce load, it is recommended you use lite firmware on devices with a lower powered Linux Host Device, such as the Creality K1 & K2, or a Raspberry Pi Zero 2.


# Updating Firmware

To update your probes firmware, the simplest method is to use Katapult, though you can also use DFU via USB.

## Prerequisites

You must have both the Cartographer Firmware repository, and Katapult on your Pi, if you do not have these please connect via SSH and run the following command.

```bash
cd ~
if [ -d ~/cartographer_firmware/ ]; then
    echo "Cartographer Firmware Exists - Updating Repository"
    cd ~/cartographer_firmware/
    git pull
else
    git clone https://github.com/Cartographer3D/cartographer_firmware.git
fi
cd ~
if [ -d ~/katapult/ ]; then
    echo "Katapult Exists - Updating Repository"
    cd ~/katapult/
    git pull
else
    git clone https://github.com/Arksine/katapult.git
fi
```

You should add both of these to your Moonraker config file to ensure that they are always up to date.

```yaml
[update_manager Cartographer Firmware]
type: git_repo
path: ~/cartographer_firmware
origin: https://github.com/Cartographer3D/cartographer_firmware.git
is_system_service: False

[update_manager katapult]
type: git_repo
path: ~/katapult
is_system_service: False
origin: https://github.com/Arksine/katapult.git
```

## Firmware Automatic Update Script (CAN or USB)

You will need to navigate to your `cartographer_firmware` folder, to do this

```shellscript
cd ~/cartographer_firmware     
```

Now you need to run the firmware update script

```bash
./fw_update.sh
```

This will take you to the following menu, which you need to navigate through, you do this by pressing enter/return.

<figure><img src="/files/ddtgCgM1amtsDNNmc1nQ" alt=""><figcaption></figcaption></figure>

The script will now try to detect what type of probe you have, be it a Cartographer V3 or V4. It does this a number of ways, by analysing your Klippy.log, Querying Moonraker and Querying our API. This is to ensure that you get the most reliable detection possible, as updating the wrong firmware to the wrong probe will require a DFU reset.\
\
If you are running your probe on CAN, you are most likely running it on the can0 network, some people run their probe on a different can network like `can1`, or `can2`. If you are unsure... please reach out in our Discord, but you are most likely running it on `can0`, so press enter. If you are running it on a different network, type that network name. i.e. `can2`.<br>

<figure><img src="/files/jee6QO1e5jOt90KBtZta" alt=""><figcaption></figcaption></figure>

Now select the firmware version you want, the latest firmware version will be selected by default, but if you do want a different version select the number next to the firmware version.

<figure><img src="/files/qXqrkK6mDVTCLeMZP4yW" alt=""><figcaption></figcaption></figure>

You should now have the option to select either the Lite or Full firmware, Full is selected by default (option 1) for lite, select option 2.

<figure><img src="/files/frJVMPlIECykfBmeRApt" alt=""><figcaption></figcaption></figure>

Lite firmware is for lower power Pi's like found on the Creality K1 and K2, Qidis or a Pi like the Raspberry Pi 2.\
\
It will show you which firmware is being written, from which path, and which interface it is being written on.

<figure><img src="/files/DRzNZdHncNKdp4zpoHOl" alt=""><figcaption></figcaption></figure>

it now gives you that information 1 more time, and a warning about what happens if you have selected the wrong information. If you have, just press N and come ask for help on Discord.<br>

<figure><img src="/files/0nFttZLDDvaMLv9hc9BG" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/GLgIicykB8H7d04BR6Bi" alt=""><figcaption></figcaption></figure>

You will now be prompted to participate in our **anonymous usage report**.

This is **completely optional**, and **no data will be uploaded unless you choose to submit it**.

***

#### **What data is collected (if you opt in)**

* **Probe identifier** (USB Serial or CAN UUID)
* **Probe version** (V3 / V4)
* **Protocol** (USB / CAN)
* **Firmware version** (e.g. 6.1.0)
* **Firmware type** (Full / Lite)
* **CAN baud rate** (if applicable)

***

#### **Why we collect this**

To better understand real-world usage, including:

* **USB vs CAN usage**
* **Lite vs Full firmware adoption**
* **Common CAN speeds** (500k / 1M)
* **V3 vs V4 usage**

This helps us **guide future improvements** and prioritise development.

***

#### **Privacy**

* **We will never sell your data**
* **All shared statistics are fully anonymised**
* **All identifiers are removed before any analysis or reporting**

<figure><img src="/files/1uoUX4zVWUexoUhYRGZS" alt=""><figcaption></figcaption></figure>

You are now done, go re-calibrate and print some more printer mods ;)

## Updating via USB - Manual Method

### Updating Cartographer via Katapult

You should know which version of the Cartographer Probe you have in order to be able to do this, please refer to the diagrams below to identify your version.

<figure><img src="/files/Uf5ypuBGK3IRoxqOEvOv" alt="Cartographer V3 - Standard, Low Profile and Right Angle"><figcaption><p>Cartographer V3 - Standard, Low Profile, RIght Angle</p></figcaption></figure>

<figure><img src="/files/LgiZqxhiNuxtwint84Ki" alt=""><figcaption><p>Cartographer V4 - Standard / Low Profile*</p></figcaption></figure>

\*Cartographer V4 has a different connector on it, but the PCB is the same design.

#### Step 1 - Enter Bootloader Mode

The following steps can be done on both Cartographer V3 and Cartographer V4

{% tabs %}
{% tab title="Automatic Method" %}
We need to get our probe into the Katapult bootloader mode, to do so you can simply run this script

{% code overflow="wrap" %}

```bash
CARTO=$(ls /dev/serial/by-id/ 2>/dev/null | grep -i cartographer | head -n 1)

if [ -z "$CARTO" ]; then
    echo -e "\e[31mERROR: No Cartographer probe found in /dev/serial/by-id/. Is it plugged in via USB?\e[0m "
fi

cd ~/klipper/scripts || exit 1
~/klippy-env/bin/python -c "import flash_usb as u; u.enter_bootloader('/dev/serial/by-id/$CARTO')"

```

{% endcode %}
{% endtab %}

{% tab title="Manual Method" %}
The initial step is noting down the probes Serial ID, you do this by typing the following command

```bash
ls -l /dev/serial/by-id/
```

<figure><img src="/files/kFBULdGHEgVBrnfCPfdg" alt=""><figcaption></figcaption></figure>

You now need to load the probe into the Katapult bootloader, to do this you simply replace with your own serial ID and path as found in the above step.

```bash
cd ~/klipper/scripts
~/klippy-env/bin/python -c 'import flash_usb as u; u.enter_bootloader("<serialID>")'
```

Example of the full command

```bash
cd ~/klipper/scripts
~/klippy-env/bin/python -c 'import flash_usb as u; u.enter_bootloader("/dev/serial/by-id/usb-Cartographer_614e_060004001443303856303820-if00")'
```

<figure><img src="/files/YJweGq5D7PAj7So5M5wc" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

Once your probe is in Bootloader mode, move onto the next step.

#### Step 2 - Flash Firmware

{% tabs %}
{% tab title="Cartographer V3" %}
Now your Cartographer is in Katapult Mode, you now need to navigate to the correct firmware to flash it.

**Automatic Full V3 USB Firmware**

{% code overflow="wrap" fullWidth="false" %}

```bash
KATAPULT=$(ls /dev/serial/by-id/ 2>/dev/null | grep -i katapult | head -n 1)
cd ~/cartographer_firmware/firmware/v2-v3/survey/6.1.0
~/klippy-env/bin/python ~/katapult/scripts/flash_can.py -f CartographerV3_6.1.0_USB_full_8kib_offset.bin -d /dev/serial/by-id/$KATAPULT
```

{% endcode %}

Your probe should now have the latest Cartographer Firmware installed on it. This page will be updated to include the command for the latest version available for this probe

**Manual - Full V3 USB Firmware**

Navigate to the folder where your firmware is located, for the example I will be using, I will be updating a v2 probe.

Now, run the following command, replacing \<firmware> with the firmware you are flashing, and \<serial> with the serial ID and path.

```
~/klippy-env/bin/python ~/katapult/scripts/flash_can.py -f <firmware> -d <serial>
```

Again, an example of a full command

```
~/klippy-env/bin/python ~/katapult/scripts/flash_can.py -f Cartographer_USB_8kib_offset.bin -d /dev/serial/by-id/usb-katapult_stm32f042x6_060012001643565537353020-if00
```

If successful, you should have the following output.

<figure><img src="/files/V3c8eUPCxQ4JzdU3tfVg" alt=""><figcaption></figcaption></figure>

If successful, you should have the following output.
{% endtab %}

{% tab title="Cartographer V4" %}
Now your Cartographer is in Katapult Mode, you now need to navigate to the correct firmware to flash it.

**Automatic V4 Full USB Firmware**

{% code overflow="wrap" fullWidth="false" %}

```bash
KATAPULT=$(ls /dev/serial/by-id/ 2>/dev/null | grep -i katapult | head -n 1)
cd ~/cartographer_firmware/firmware/v4/firmware/6.1.0
~/klippy-env/bin/python ~/katapult/scripts/flash_can.py -f CartographerV4_6.1.0_USB_full_8kib_offset.bin -d /dev/serial/by-id/$KATAPULT
```

{% endcode %}

Your probe should now have the latest Cartographer Full Firmware installed on it. This page will be updated to include the command for the latest version available for this probe

**Automatic V4 Lite USB Firmware**

{% code overflow="wrap" fullWidth="false" %}

```bash
KATAPULT=$(ls /dev/serial/by-id/ 2>/dev/null | grep -i katapult | head -n 1)
cd ~/cartographer_firmware/firmware/v4/firmware/6.1.0
~/klippy-env/bin/python ~/katapult/scripts/flash_can.py -f CartographerV4_6.1.0_USB_lite_8kib_offset.bin -d /dev/serial/by-id/$KATAPULT
```

{% endcode %}

Your probe should now have the latest Cartographer Lite Firmware installed on it. This page will be updated to include the command for the latest version available for this probe

**Manual - Full V4 USB Firmware**

Navigate to the folder where your firmware is located, for the example I will be using, I will be updating a v2 probe.

Now, run the following command, replacing \<firmware> with the firmware you are flashing, and \<serial> with the serial ID and path.

```
~/klippy-env/bin/python ~/katapult/scripts/flash_can.py -f <firmware> -d <serial>
```

Again, an example of a full command

```
~/klippy-env/bin/python ~/katapult/scripts/flash_can.py -f Cartographer_USB_8kib_offset.bin -d /dev/serial/by-id/usb-katapult_stm32f042x6_060012001643565537353020-if00
```

If successful, you should have the following output.

<figure><img src="/files/V3c8eUPCxQ4JzdU3tfVg" alt=""><figcaption></figcaption></figure>

If successful, you should have the following output.
{% endtab %}
{% endtabs %}

### Updating Cartographer via DFU

Prior to flashing, you will need to following tools

* 2 x Ferrous Tweezers (or any conductive tool to bridge the two pads)
* 1 x USB Cable terminated to work w/ Catographer

**Entering DFU Mode**

{% tabs %}
{% tab title="Cartographer V3" %}
To enter DFU Mode, it can be a bit fiddly, but once you get the knack of it, it's fairly simple.

Plug your USB cable into the device you will be flashing from and your Cartographer probe, this can be either a seprate Windows PC, Mac, or a Linux machine, or the device you run your 3D Printer off.

Using your ferrous tweezers, or similar use one to bridge pads 1 (boot0), once you have a solid contact on those tap pad 2 (reset) with your other ferrous tool.

<figure><img src="/files/VxeXE9JnroP4d7ReklbN" alt=""><figcaption></figcaption></figure>

If you have done this correctly, your device should have entered DFU Mode.
{% endtab %}

{% tab title="Cartographer V4" %}
To enter DFU Mode, it can be a bit fiddly but with V4 due to the use of holes rather than pads it is considerably easier, but once you get the knack of it, it's fairly simple.

<figure><img src="/files/o3PmIkTWnsG32NAa5Xty" alt=""><figcaption></figcaption></figure>

Firstly using the supplied USB cable, plug this into the Cartographer (Molex Sherlock) connector.

Then using your ferrous tweezers or similar, bridge the holes in box 1 (BT0 & 3V3) and then while still bridging those holes plug in your Cartographer V4 via the USB connector of the cable into the device you will be flashing from this can be either a separate Windows PC, Mac, or a Linux machine, or the device you run your 3D Printer off such as a Raspberry Pi.\
\
This should then show the V4 in DFU mode.
{% endtab %}
{% endtabs %}

If you have done this correctly, your device should have entered DFU Mode.

To check,

* Linux - follow the following steps
  * SSH in, or load a terminal shell.
  * type `lsusb` in your bash shell, it should list a device in DFU Mode
  * One of the options should be `Bus 001 Device 004: ID 0483:df11 STMicroelectronics STM Device in DFU Mode` - This (as long as you don't have any other devices in DFU Mode) should be your Cartographer Probe in DFU Mode.
* Windows - follow the following steps
  * Start Menu
  * Search and open "Device Manager"
  * Scroll down to Universal Serial Bus Devices
  * You should see STM32 BOOTLOADER as an option
  * ![Device Manager view of Cartographer in Bootloader mode.](https://docs.cartographer3d.com/~gitbook/image?url=https%3A%2F%2F3044346320-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FjpCp1KnR8izt0cnWQfZF%252Fuploads%252FlAqyGG4GHQ1siPPWLzpx%252Fimage.png%3Falt%3Dmedia%26token%3Dd24fa98a-010d-4c07-8f63-ed19242d41df\&width=300\&dpr=4\&quality=100\&sign=51e83bcb\&sv=2)

#### Flashing via STM32CubeProgrammer (Windows & MacOS) <a href="#flashing-via-stm32cubeprogrammer-windows-and-macos" id="flashing-via-stm32cubeprogrammer-windows-and-macos"></a>

Download and Install STM32CubeProgrammer from [here](https://www.st.com/en/development-tools/stm32cubeprog.html), I warn you it requires you to sign up for an account.

{% hint style="info" %}
Firmware files are available <https://github.com/Cartographer3D/cartographer_firmware>
{% endhint %}

Version 2.14.0 is recommended due to a known bug in 2.16.0 which causes issues when flashing via STMCubeProgammer - this can be selected from the version 'drop down' on the site.

Open the application, and on the RIGHT side, select the following options and press **Connect**.

<figure><img src="https://docs.cartographer3d.com/~gitbook/image?url=https%3A%2F%2F3044346320-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FjpCp1KnR8izt0cnWQfZF%252Fuploads%252FaSRhGvDO9drIBODQy5Ka%252Fimage.png%3Falt%3Dmedia%26token%3Dc2a1319b-0f86-46ff-ba99-7219d28871f7&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=d19cdb30&#x26;sv=2" alt=""><figcaption><p>STM32CubeProgrammer Settings</p></figcaption></figure>

Once you have connected, Click Open File - you will need to select both the Katapult Bootloader for your board, and your Cartographer Firmware that you have downloaded.

<figure><img src="https://docs.cartographer3d.com/~gitbook/image?url=https%3A%2F%2F3044346320-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FjpCp1KnR8izt0cnWQfZF%252Fuploads%252FDZn6JTnVsZ2PPPgG9gvj%252Fimage.png%3Falt%3Dmedia%26token%3D6d63fff9-ea16-4f8b-9a1f-a51905a3992f&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=7fbcbe29&#x26;sv=2" alt=""><figcaption><p>Firmwares Loaded</p></figcaption></figure>

For your Cartographer Firmware, you need to set the address to `0x08002000` This provides the 8KiB offset for the firmware. Katapult firmware can be flashed at the default `0x08000000.`

<figure><img src="https://docs.cartographer3d.com/~gitbook/image?url=https%3A%2F%2F3044346320-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FjpCp1KnR8izt0cnWQfZF%252Fuploads%252FZnj7xVR2WpgS2s9lgaEK%252FSTLink.png%3Falt%3Dmedia%26token%3Deeccdbc6-9766-46a7-a5d7-f35bfae98922&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=380cc3d1&#x26;sv=2" alt=""><figcaption><p>How to change the address in STM32CubeProgrammer</p></figcaption></figure>

On each of the firmware's press "Download", starting with Katapult, then with Cartographer. Now press Disconnect in the TOP RIGHT corner.

If your BLUE LED is Flashing, you have not fully flashed your Firmware, and you should start again, If you now Power Cycle your probe, or simply hit the RESET (2) pads from earlier, your probe should react when it has anything solid metal put under it.

#### Flashing via DFU Util (Linux Terminal). <a href="#flashing-via-dfu-util-linux-terminal" id="flashing-via-dfu-util-linux-terminal"></a>

SSH into your linux host MCU, ensuring that your Cartographer is plugged in and in DFU Mode.

{% tabs %}
{% tab title="Cartographer V3" %}
Navigate into the correct folder, so if you want to update your v2 or v3 run the following command.

```
cd ~/cartographer_firmware/firmware/v2-v3/survey/6.1.0
```

Once in the folder, simply check that your probe is still in DFU Mode by running `lsusb`, and if you still get a result stating it is in DFU Mode, run the following command.

```
sudo dfu-util -R -a 0 -s 0x08002000:leave -D firmware.bin -d 0483:df11
```

NOTE - REPLACE the address (`0x08000000`) with what ever is listed in the [table here](https://docs.cartographer3d.com/cartographer-probe/firmware/manual-methods/firmware-update) for the specific firmware you are using, and rename `firmware.bin` to what ever the firmware file you are using is called.

Example to install the latest stable V3 Firmware:

{% code overflow="wrap" %}

```bash
sudo dfu-util -R -a 0 -s 0x08002000:leave -D CartographerV3_6.1.0_USB_full_8kib_offset.bin -d 0483:df11
```

{% endcode %}

Once compelte, it should exit out of DFU mode, and you should be able to find your probe on USB.
{% endtab %}

{% tab title="Cartographer V4" %}
Navigate into the correct folder, so if you want to update your v4 run the following command.

```bash
cd ~/cartographer_firmware/firmware/v4/firmware/6.1.0
```

Once in the folder, simply check that your probe is still in DFU Mode by running `lsusb`, and if you still get a result stating it is in DFU Mode, run the following command.

```bash
sudo dfu-util -R -a 0 -s 0x08002000:leave -D firmware.bin -d 0483:df11
```

NOTE - REPLACE the address (`0x08000000`) with what ever is listed in the [table here](https://docs.cartographer3d.com/cartographer-probe/firmware/manual-methods/firmware-update) for the specific firmware you are using, and rename `firmware.bin` to what ever the firmware file you are using is called.

Example to install the latest stable V4 Firmware:

```bash
sudo dfu-util -R -a 0 -s 0x08002000:leave -D CartographerV4_6.1.0_USB_full_8kib_offset.bin
```

Once compelte, it should exit out of DFU mode, and you should be able to find your probe on USB.
{% endtab %}
{% endtabs %}

{% embed url="<https://youtu.be/casMZXMRWNs>" %}

## Update via CAN - Manual Method

### Updating Cartographer via Katapult on CAN

#### Step 1 - SSH into your printer

#### Step 2 - Plug Cartographer in via CANBUS

Your Cartographer will already need to have CAN firmware on the probe, to change from USB to CAN, please follow [Re-Flashing](/cartographer-probe/firmware/re-flashing).

#### Step 3 - Get Your UUID

You will need to get your probes UUID, this should be in your printer.cfg if you have already setup the probe, it will either be under `[mcu cartographer]`, `[cartographer]`, or `[scanner]`

If you have not set it up already, search for the UUID either in the mainsail device finder menu, or by using the command `~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0` (note, if the device is in your printer.cfg or similar, it will not find it.

#### Step 4 - Flash the Firmware

You now need to flash your Cartographer, below will give you the command to flash the latest recommended firmware for each device, to build your own command you just need to navigate to the directory of the firmware you are flashing and modify the below command

```
python3 ~/katapult/scripts/flash_can.py -i can0 -f <firmware.bin> -u <myuuid>
```

{% hint style="danger" %}
You will need to replace \<myuuid> with your UUID found in step3.
{% endhint %}

{% tabs %}
{% tab title="Cartographer V2 CAN & V3" %}

#### Update Cartographer V3 to firmware 6.1.0

{% code overflow="wrap" %}

```bash
cd ~/cartographer_firmware/firmware/v2-v3/survey/6.1.0/
python3 ~/katapult/scripts/flash_can.py -i can0 -f CartographerV3_6.1.0_CAN_1M_full_8kib_offset.bin -u <myuuid>
```

{% endcode %}
{% endtab %}

{% tab title="Cartographer V4" %}

#### Update Cartographer V4 to firmware 6.1.0

{% code overflow="wrap" %}

```bash
cd ~/cartographer_firmware/firmware/v4/firmware/6.1.0/
python3 ~/katapult/scripts/flash_can.py -i can0 -f CartographerV4_6.1.0_CAN_1M_full_8kib_offset.bin -u <myuuid>
```

{% endcode %}

#### Update Cartographer V4 to firmware 6.1.0 Lite

See [here ](https://docs.cartographer3d.com/cartographer-probe/firmware#full-vs-lite-firmwares)for a description around the lite firmware

{% code overflow="wrap" %}

```bash
cd ~/cartographer_firmware/firmware/v4/firmware/6.1.0/
python3 ~/katapult/scripts/flash_can.py -i can0 -f CartographerV4_6.1.0_CAN_1M_lite_8kib_offset.bin -u <myuuid>
```

{% endcode %}
{% endtab %}
{% endtabs %}


# Switching Protocols

To switch your probe from CAN to USB or USB to CAN, the simplest method is to use Katapult and flash the Katapult Deployer file, though you can also use [DFU](/cartographer-probe/firmware/re-flashing) via USB.

## Prerequisites

You must have both the Cartographer Firmware repository, and Katapult on your Pi, if you do not have these please connect via SSH and run the following command.

```bash
cd ~
if [ -d ~/cartographer_firmware/ ]; then
    echo "Cartographer Firmware Exists - Updating Repository"
    cd ~/cartographer_firmware/
    git pull
else
    git clone https://github.com/Cartographer3D/cartographer_firmware.git
fi
cd ~
if [ -d ~/katapult/ ]; then
    echo "Katapult Exists - Updating Repository"
    cd ~/katapult/
    git pull
else
    git clone https://github.com/Arksine/katapult.git
fi
```

You should add both of these to your Moonraker config file to ensure that they are always up to date.

```yaml
[update_manager Cartographer Firmware]
type: git_repo
path: ~/cartographer_firmware
origin: https://github.com/Cartographer3D/cartographer_firmware.git
is_system_service: False

[update_manager katapult]
type: git_repo
path: ~/katapult
origin: https://github.com/Arksine/katapult.git
is_system_service: False
```

## Switching Protocol

### Switching to CAN (1M) from USB

You should know which version of the Cartographer Probe you have in order to be able to do this, please refer to the diagrams below to identify your version.

<figure><img src="/files/Uf5ypuBGK3IRoxqOEvOv" alt="Cartographer V3 - Standard, Low Profile and Right Angle"><figcaption><p>Cartographer V3 - Standard, Low Profile, RIght Angle</p></figcaption></figure>

<figure><img src="/files/LgiZqxhiNuxtwint84Ki" alt=""><figcaption><p>Cartographer V4 - Standard / Low Profile*</p></figcaption></figure>

\*Cartographer V4 Low Profile has a different connector on it, but the PCB is the same design.

#### Step 1 - Enter Bootloader Mode

The following steps can be done on both Cartographer V3 and Cartographer V4

{% tabs %}
{% tab title="Automatic Method" %}
We need to get our probe into the Katapult bootloader mode, to do so you can simply run this script

{% code overflow="wrap" %}

```bash
CARTO=$(ls /dev/serial/by-id/ 2>/dev/null | grep -i cartographer | head -n 1)

if [ -z "$CARTO" ]; then
    echo -e "\e[31mERROR: No Cartographer probe found in /dev/serial/by-id/. Is it plugged in via USB?\e[0m "
fi

cd ~/klipper/scripts || exit 1
~/klippy-env/bin/python -c "import flash_usb as u; u.enter_bootloader('/dev/serial/by-id/$CARTO')"

```

{% endcode %}
{% endtab %}

{% tab title="Manual Method" %}
The initial step is noting down the probes Serial ID, you do this by typing the following command

```bash
ls -l /dev/serial/by-id/
```

<figure><img src="/files/kFBULdGHEgVBrnfCPfdg" alt=""><figcaption></figcaption></figure>

You now need to load the probe into the Katapult bootloader, to do this you simply replace with your own serial ID and path as found in the above step.

```bash
cd ~/klipper/scripts
~/klippy-env/bin/python -c 'import flash_usb as u; u.enter_bootloader("<serialID>")'
```

Example of the full command

```bash
cd ~/klipper/scripts
~/klippy-env/bin/python -c 'import flash_usb as u; u.enter_bootloader("/dev/serial/by-id/usb-Cartographer_614e_060004001443303856303820-if00")'
```

<figure><img src="/files/YJweGq5D7PAj7So5M5wc" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

Once your probe is in Bootloader mode, move onto the next step.

#### Step 2 - Flash Firmware

{% tabs %}
{% tab title="Cartographer V3" %}
Now your Cartographer is in Katapult Mode, you now need to navigate to the correct katapult deployer file to flash it.

**Automatic Katapult Deployer CAN (1,000,000)**

{% code overflow="wrap" fullWidth="false" %}

```bash
KATAPULT=$(ls /dev/serial/by-id/ 2>/dev/null | grep -i katapult | head -n 1)
cd ~/cartographer_firmware/firmware/v2-v3/katapult-deployer/
~/klippy-env/bin/python ~/klipper/lib/canboot/flash_can.py -f katapult-deployer-1m.bin -d /dev/serial/by-id/$KATAPULT
```

{% endcode %}

Your probe should now have the latest Cartographer Firmware installed on it. This page will be updated to include the command for the latest version available for this probe

**Manual - Katapult Deployer CAN (1,000,000)**

Navigate to the folder where your katapult deployer is located

```
cd ~/cartographer_firmware/firmware/v2-v3/katapult-deployer/
```

Now, run the following command, replacing \<firmware> with the firmware you are flashing, and \<serial> with the serial ID and path.

```
~/klippy-env/bin/python ~/klipper/lib/canboot/flash_can.py -f <firmware> -d <serial>
```

Again, an example of a full command

{% code overflow="wrap" %}

```
~/klippy-env/bin/python ~/klipper/lib/canboot/flash_can.py -f katapult-deployer-1m.bin -d /dev/serial/by-id/usb-katapult_stm32f042x6_060012001643565537353020-if00
```

{% endcode %}

If successful, you should have a similar output

<figure><img src="/files/V3c8eUPCxQ4JzdU3tfVg" alt=""><figcaption></figcaption></figure>

If successful, you should have the following output.
{% endtab %}

{% tab title="Cartographer V4" %}
Now your Cartographer is in Katapult Mode, you now need to navigate to the correct katapult deployer file to flash it.

**Automatic - Katapult Deployer CAN (1,000,000)**

{% code overflow="wrap" fullWidth="false" %}

```bash
KATAPULT=$(ls /dev/serial/by-id/ 2>/dev/null | grep -i katapult | head -n 1)
cd ~/cartographer_firmware/firmware/v4/katapult-deployer
~/klippy-env/bin/python ~/klipper/lib/canboot/flash_can.py -f katapult_deployer_v4_CAN_1M.bin -d /dev/serial/by-id/$KATAPULT
```

{% endcode %}

Your probe should now have the latest Cartographer Full Firmware installed on it. This page will be updated to include the command for the latest version available for this probe

**Manual - Katapult Deployer CAN (1,000,000)**

Navigate to the folder where your katapult-deployer is located

Now, run the following command, replacing \<firmware> with the firmware you are flashing, and \<serial> with the serial ID and path.

```
~/klippy-env/bin/python ~/klipper/lib/canboot/flash_can.py -f <firmware> -d <serial>
```

Again, an example of a full command

{% code overflow="wrap" %}

```
~/klippy-env/bin/python ~/klipper/lib/canboot/flash_can.py -f katapult_deployer_v4_CAN_1M.bin -d /dev/serial/by-id/usb-katapult_stm32f042x6_060012001643565537353020-if00
```

{% endcode %}

If successful, you should look something like this:

<figure><img src="/files/V3c8eUPCxQ4JzdU3tfVg" alt=""><figcaption></figcaption></figure>

If successful, you should have the following output.
{% endtab %}
{% endtabs %}

#### Step 3 - Flashing the Firmware

{% tabs %}
{% tab title="Cartographer V3" %}
You now need to plugin your Cartographer into your CAN network.

{% hint style="danger" %}
DO NOT HOT PLUG ANYTHING IN YOUR PRINTER, ENSURE IT IS POWERED OFF.
{% endhint %}

You now need to flash your CAN firmware to the probe, so navigate to the directory the firmware is located

```bash
cd ~/cartographer_firmware/firmware/v2-v3/survey/5.0.0/
```

You will now need to check that your probe can be recognised by your CAN network, to do this we will do a CAN query. You should see a device which has Katapult listed next to it. Note down the UUID it provides you.

```bash
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0    
```

Now, you will need to run the following command, replacing the UUID with what ever the UUID is for your probe.

{% code overflow="wrap" %}

```bash
python3 ~/katapult/scripts/flash_can.py -i can0 -f Survey_Cartographer_CAN_1000000_8kib_offset.bin -u UUID
```

{% endcode %}

Example

{% code overflow="wrap" %}

```bash
python3 ~/katapult/scripts/flash_can.py -i can0 -f Survey_Cartographer_CAN_1000000_8kib_offset.bin -u 379702c36ad1
```

{% endcode %}

Once complete, your probe will reboot into the Cartographer Firmware, and you can continue to use your probe as normal.<br>
{% endtab %}

{% tab title="Cartographer V4" %}
You now need to plugin your Cartographer into your CAN network.

{% hint style="danger" %}
DO NOT HOT PLUG ANYTHING IN YOUR PRINTER, ENSURE IT IS POWERED OFF.
{% endhint %}

You now need to flash your CAN firmware to the probe, so navigate to the directory the firmware is located

```bash
cd ~/cartographer_firmware/firmware/v4/firmware/6.0.0/
```

You will now need to check that your probe can be recognised by your CAN network, to do this we will do a CAN query. You should see a device which has Katapult listed next to it. Note down the UUID it provides you.

```bash
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0    
```

Now, you will need to run the following command, replacing the UUID with what ever the UUID is for your probe.

{% code overflow="wrap" %}

```bash
python3 ~/katapult/scripts/flash_can.py -i can0 -f CartographerV4_6.0.0_USB_full_8kib_offset.bin -u UUID
```

{% endcode %}

Example

{% code overflow="wrap" %}

```bash
python3 ~/katapult/scripts/flash_can.py -i can0 -f CartographerV4_6.0.0_USB_full_8kib_offset.bin -u 379702c36ad1
```

{% endcode %}

Once complete, your probe will reboot into the Cartographer Firmware, and you can continue to use your probe as normal.
{% endtab %}
{% endtabs %}

### Switching to USB from CAN

To switch from CAN to USB, you will need to flash the Katapult Deployer Firmware to overwrite the existing bootloader and firmware to load it in USB mode.

**Step 1 - Plug Cartographer in via CANBUS**

Your Cartographer will already need to have CAN firmware on the probe, to change from USB to CAN, please follow [Re-Flashing](https://docs.cartographer3d.com/cartographer-probe/firmware/re-flashing).

**Step 2 - SSH into your printer**

**Step 3 - Get Your UUID**

You will need to get your probes UUID, this should be in your printer.cfg if you have already setup the probe, it will either be under `[mcu cartographer]`, `[cartographer]`, or `[scanner]`

If you have not set it up already, search for the UUID either in the mainsail device finder menu, or by using the command `~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0` (note, if the device is in your printer.cfg or similar, it will not find it.

#### Step 4 - Flash the Katapult Deployer

You now need to flash the Katapult Deployer USB Firmware

{% hint style="danger" %}
You will need to replace with your UUID found in step3.
{% endhint %}

{% tabs %}
{% tab title="Cartographer V3" %}
**Switch Cartographer V3 from CAN to USB**

{% code overflow="wrap" %}

```bash
cd ~/cartographer_firmware/firmware/v2-v3/katapult-deployer
python3 ~/katapult/scripts/flash_can.py -i can0 -f katapult-deployer-usb.bin -u <myuuid>
```

{% endcode %}
{% endtab %}

{% tab title="Cartographer V4" %}
**Switch Cartographer V4 from CAN to USB**

{% code overflow="wrap" %}

```bash
cd ~/cartographer_firmware/firmware/v4/katapult-deployer/
python3 ~/katapult/scripts/flash_can.py -i can0 -f katapult_deployer_v4_USB.bin -u <myuuid>
```

{% endcode %}
{% endtab %}
{% endtabs %}

#### Step 5 - Switch to USB

Power down your printer, and re-connect your probe via USB.

#### Step 6 - Flash the Cartographer Firmware

{% tabs %}
{% tab title="Cartographer V3" %}
Now your Cartographer is in Katapult Mode, you now need to navigate to the correct firmware to flash it.

**Automatic Full V3 USB Firmware**

{% code overflow="wrap" %}

```bash
KATAPULT=$(ls /dev/serial/by-id/ 2>/dev/null | grep -i katapult | head -n 1)
cd ~/cartographer_firmware/firmware/v2-v3/survey/5.0.0/
~/klippy-env/bin/python ~/klipper/lib/canboot/flash_can.py -f Survey_Cartographer_USB_8kib_offset.bin -d /dev/serial/by-id/$KATAPULT
```

{% endcode %}

Your probe should now have the latest Cartographer Firmware installed on it. This page will be updated to include the command for the latest version available for this probe

**Manual - Full V3 USB Firmware**

Navigate to the folder where your firmware is located, for the example I will be using, I will be updating a v2 probe.

Now, run the following command, replacing \<firmware> with the firmware you are flashing, and \<serial> with the serial ID and path.

```
~/klippy-env/bin/python ~/klipper/lib/canboot/flash_can.py -f <firmware> -d <serial>
```

Again, an example of a full command

{% code overflow="wrap" %}

```bash
~/klippy-env/bin/python ~/klipper/lib/canboot/flash_can.py -f Cartographer_USB_8kib_offset.bin -d /dev/serial/by-id/usb-katapult_stm32f042x6_060012001643565537353020-if00
```

{% endcode %}

If successful, you should have the following output.

![](https://docs.cartographer3d.com/~gitbook/image?url=https%3A%2F%2F3044346320-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FjpCp1KnR8izt0cnWQfZF%252Fuploads%252FsLbQEYhc75evn1hikPXb%252Fimage.png%3Falt%3Dmedia%26token%3Dae2854a2-1833-4aed-9907-9d32c152fb10\&width=768\&dpr=3\&quality=100\&sign=1c515908\&sv=2)

If successful, you should have the following output.
{% endtab %}

{% tab title="Cartographer V4" %}
Now your Cartographer is in Katapult Mode, you now need to navigate to the correct firmware to flash it.

**Automatic V4 Full USB Firmware**

{% code overflow="wrap" %}

```bash
KATAPULT=$(ls /dev/serial/by-id/ 2>/dev/null | grep -i katapult | head -n 1)
cd ~/cartographer_firmware/firmware/v4/firmware/6.0.0
~/klippy-env/bin/python ~/klipper/lib/canboot/flash_can.py -f CartographerV4_6.0.0_USB_full_8kib_offset.bin -d /dev/serial/by-id/$KATAPULT
```

{% endcode %}

Your probe should now have the latest Cartographer Full Firmware installed on it. This page will be updated to include the command for the latest version available for this probe

**Automatic V4 Lite USB Firmware**

{% code overflow="wrap" %}

```bash
KATAPULT=$(ls /dev/serial/by-id/ 2>/dev/null | grep -i katapult | head -n 1)
cd ~/cartographer_firmware/firmware/v4/firmware/6.0.0
~/klippy-env/bin/python ~/klipper/lib/canboot/flash_can.py -f CartographerV4_6.0.0_USB_lite_8kib_offset.bin -d /dev/serial/by-id/$KATAPULT
```

{% endcode %}

Your probe should now have the latest Cartographer Lite Firmware installed on it. This page will be updated to include the command for the latest version available for this probe

**Manual - Full V4 USB Firmware**

Navigate to the folder where your firmware is located, for the example I will be using, I will be updating a v2 probe.

Now, run the following command, replacing \<firmware> with the firmware you are flashing, and \<serial> with the serial ID and path.

```
~/klippy-env/bin/python ~/klipper/lib/canboot/flash_can.py -f <firmware> -d <serial>
```

Again, an example of a full command

{% code overflow="wrap" %}

```bash
~/klippy-env/bin/python ~/klipper/lib/canboot/flash_can.py -f Cartographer_USB_8kib_offset.bin -d /dev/serial/by-id/usb-katapult_stm32f042x6_060012001643565537353020-if00
```

{% endcode %}

If successful, you should have the following output.

![](https://docs.cartographer3d.com/~gitbook/image?url=https%3A%2F%2F3044346320-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FjpCp1KnR8izt0cnWQfZF%252Fuploads%252FsLbQEYhc75evn1hikPXb%252Fimage.png%3Falt%3Dmedia%26token%3Dae2854a2-1833-4aed-9907-9d32c152fb10\&width=768\&dpr=3\&quality=100\&sign=1c515908\&sv=2)

If successful, you should have the following output.
{% endtab %}
{% endtabs %}


# Re-Flashing

## Prerequisites

You must have the Cartographer Firmware repository, for future updates you will also need Katapult on your Pi, if you do not have these please connect via SSH and run the following command.

```bash
cd ~
if [ -d ~/cartographer_firmware/ ]; then
    echo "Cartographer Firmware Exists - Updating Repository"
    cd ~/cartographer_firmware/
    git pull
else
    git clone https://github.com/Cartographer3D/cartographer_firmware.git
fi
cd ~
if [ -d ~/katapult/ ]; then
    echo "Katapult Exists - Updating Repository"
    cd ~/katapult/
    git pull
else
    git clone https://github.com/Arksine/katapult.git
fi
```

You should add both of these to your Moonraker config file to ensure that they are always up to date.

```yaml
[update_manager Cartographer Firmware]
type: git_repo
path: ~/cartographer_firmware
origin: https://github.com/Cartographer3D/cartographer_firmware.git
is_system_service: False

[update_manager katapult]
type: git_repo
path: ~/katapult
origin: https://github.com/Arksine/katapult.git
is_system_service: False
```

### Updating Cartographer via DFU

Prior to flashing, you will need to following tools

* 2 x Ferrous Tweezers (or any conductive tool to bridge the two pads)
* 1 x USB Cable terminated to work w/ Catographer

**Entering DFU Mode**

{% tabs %}
{% tab title="Cartographer V3" %}
To enter DFU Mode, it can be a bit fiddly, but once you get the knack of it, it's fairly simple.

Plug your USB cable into the device you will be flashing from and your Cartographer probe, this can be either a seprate Windows PC, Mac, or a Linux machine, or the device you run your 3D Printer off.

Using your ferrous tweezers, or similar use one to bridge pads 1 (boot0), once you have a solid contact on those tap pad 2 (reset) with your other ferrous tool.

<figure><img src="/files/VxeXE9JnroP4d7ReklbN" alt=""><figcaption></figcaption></figure>

If you have done this correctly, your device should have entered DFU Mode.
{% endtab %}

{% tab title="Cartographer V4" %}
To enter DFU Mode, it can be a bit fiddly but with V4 due to the use of holes rather than pads it is considerably easier, but once you get the knack of it, it's fairly simple.

<figure><img src="/files/o3PmIkTWnsG32NAa5Xty" alt=""><figcaption></figcaption></figure>

Firstly using the supplied USB cable, plug this into the Cartographer (Molex Sherlock) connector.

Then using your ferrous tweezers or similar, bridge the holes in box 1 (BT0 & 3V3) and then while still bridging those holes plug in your Cartographer V4 via the USB connector of the cable into the device you will be flashing from this can be either a separate Windows PC, Mac, or a Linux machine, or the device you run your 3D Printer off such as a Raspberry Pi.\
\
This should then show the V4 in DFU mode.
{% endtab %}
{% endtabs %}

If you have done this correctly, your device should have entered DFU Mode.

To check,

* Linux - follow the following steps
  * SSH in, or load a terminal shell.
  * type `lsusb` in your bash shell, it should list a device in DFU Mode
  * One of the options should be `Bus 001 Device 004: ID 0483:df11 STMicroelectronics STM Device in DFU Mode` - This (as long as you don't have any other devices in DFU Mode) should be your Cartographer Probe in DFU Mode.
* Windows - follow the following steps
  * Start Menu
  * Search and open "Device Manager"
  * Scroll down to Universal Serial Bus Devices
  * You should see STM32 BOOTLOADER as an option
  * ![Device Manager view of Cartographer in Bootloader mode.](https://docs.cartographer3d.com/~gitbook/image?url=https%3A%2F%2F3044346320-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FjpCp1KnR8izt0cnWQfZF%252Fuploads%252FlAqyGG4GHQ1siPPWLzpx%252Fimage.png%3Falt%3Dmedia%26token%3Dd24fa98a-010d-4c07-8f63-ed19242d41df\&width=300\&dpr=4\&quality=100\&sign=51e83bcb\&sv=2)

#### Flashing via STM32CubeProgrammer (Windows & MacOS) <a href="#flashing-via-stm32cubeprogrammer-windows-and-macos" id="flashing-via-stm32cubeprogrammer-windows-and-macos"></a>

Download and Install STM32CubeProgrammer from [here](https://www.st.com/en/development-tools/stm32cubeprog.html), I warn you it requires you to sign up for an account.

{% hint style="info" %}
Firmware files are available at <https://github.com/Cartographer3D/cartographer_firmware>
{% endhint %}

Version 2.14.0 is recommended due to a known bug in 2.16.0 which causes issues when flashing via STMCubeProgammer - this can be selected from the version 'drop down' on the site.

Open the application, and on the RIGHT side, select the following options and press **Connect**.

<figure><img src="https://docs.cartographer3d.com/~gitbook/image?url=https%3A%2F%2F3044346320-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FjpCp1KnR8izt0cnWQfZF%252Fuploads%252FaSRhGvDO9drIBODQy5Ka%252Fimage.png%3Falt%3Dmedia%26token%3Dc2a1319b-0f86-46ff-ba99-7219d28871f7&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=d19cdb30&#x26;sv=2" alt=""><figcaption><p>STM32CubeProgrammer Settings</p></figcaption></figure>

Once you have connected, Click Open File - you will need to select the Complete Firmware

for V3 this is at `cartographer_firmware/firmware/v2-v3/combined-firmware`

for V4 this is located at `cartographer_firmware/firmware/v4/combined-firmware/6.0.0`

Select the firmware you want to use

i.e. `Katapult_plus_CartographerV4_6.0.0__CAN_1M.bin` if you wanted V4, Firmware 6.0.0 for CAN networks with a Baudrate of 1,000,000.

<figure><img src="https://docs.cartographer3d.com/~gitbook/image?url=https%3A%2F%2F3044346320-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FjpCp1KnR8izt0cnWQfZF%252Fuploads%252FDZn6JTnVsZ2PPPgG9gvj%252Fimage.png%3Falt%3Dmedia%26token%3D6d63fff9-ea16-4f8b-9a1f-a51905a3992f&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=7fbcbe29&#x26;sv=2" alt=""><figcaption><p>Firmwares Loaded</p></figcaption></figure>

For the Complete (Katapult + Cartographer) Firmware, you need to keep it at the default address of `0x08000000`

On each of the firmware's press "Download", starting with Katapult, then with Cartographer. Now press Disconnect in the TOP RIGHT corner.

#### Flashing via DFU Util (Linux Terminal). <a href="#flashing-via-dfu-util-linux-terminal" id="flashing-via-dfu-util-linux-terminal"></a>

SSH into your linux host MCU, ensuring that your Cartographer is plugged in and in DFU Mode.

{% tabs %}
{% tab title="Cartographer V3" %}
Navigate into the correct folder, so if you want to update your v2 or v3 run the following command.

```
cd ~/cartographer_firmware/firmware/v2-v3/combined-firmware/6.1.0
```

Once in the folder, simply check that your probe is still in DFU Mode by running `lsusb`, and if you still get a result stating it is in DFU Mode, run the following command.

```
sudo dfu-util -R -a 0 -s 0x08000000:leave -D firmware.bin -d 0483:df11
```

NOTE - REPLACE the address (`0x08000000`) with what ever is listed in the [table here](https://docs.cartographer3d.com/cartographer-probe/firmware/manual-methods/firmware-update) for the specific firmware you are using, and rename `firmware.bin` to what ever the firmware file you are using is called.

**Example to flash V3 USB Full Firmware**

{% code overflow="wrap" %}

```bash
sudo dfu-util -R -a 0 -s 0x08000000:leave -D Katapult_plus_CartographerV3_6.1.0_USB.bin -d 0483:df11
```

{% endcode %}

**Example to flash V3 USB lite (k1) Firmware**

{% code overflow="wrap" %}

```bash
sudo dfu-util -R -a 0 -s 0x08000000:leave -D Katapult_plus_CartographerV3_6.1.0_USB_lite.bin -d 0483:df11
```

{% endcode %}

**Example to flash V3 CAN 1m Full Firmware**

{% code overflow="wrap" %}

```bash
sudo dfu-util -R -a 0 -s 0x08000000:leave -D Katapult_plus_CartographerV3_6.1.0_CAN_1M.bin -d 0483:df11
```

{% endcode %}

**Example to flash V3 CAN 1m lite Firmware**

{% code overflow="wrap" %}

```bash
sudo dfu-util -R -a 0 -s 0x08000000:leave -D Katapult_plus_CartographerV3_6.1.0_CAN_1M_lite.bin -d 0483:df11
```

{% endcode %}
{% endtab %}

{% tab title="Cartographer V4" %}
Navigate into the correct folder, so if you want to update your 4run the following command.

```
cd ~/cartographer_firmware/firmware/v4/combined-firmware/6.1.0
```

Once in the folder, simply check that your probe is still in DFU Mode by running `lsusb`, and if you still get a result stating it is in DFU Mode, run the following command.

```
sudo dfu-util -R -a 0 -s 0x08000000:leave -D firmware.bin
```

NOTE - REPLACE the address (`0x08000000`) with what ever is listed in the [table here](https://docs.cartographer3d.com/cartographer-probe/firmware/manual-methods/firmware-update) for the specific firmware you are using, and rename `firmware.bin` to what ever the firmware file you are using is called.

**Example to flash V4 USB Full Firmware**

{% code overflow="wrap" %}

```bash
sudo dfu-util -R -a 0 -s 0x08000000:leave -D Katapult_plus_CartographerV4_6.1.0_USB.bin -d 0483:df11
```

{% endcode %}

**Example to flash V4 USB liteFirmware**

{% code overflow="wrap" %}

```bash
sudo dfu-util -R -a 0 -s 0x08000000:leave -D Katapult_plus_CartographerV4_6.1.0_USB_lite.bin -d 0483:df11
```

{% endcode %}

**Example to flash V4 CAN 1m Full Firmware**

{% code overflow="wrap" %}

```bash
sudo dfu-util -R -a 0 -s 0x08000000:leave -D Katapult_plus_CartographerV4_6.1.0_CAN_1M.bin -d 0483:df11
```

{% endcode %}

**Example to flash V4 CAN 1m lite Firmware**

{% code overflow="wrap" %}

```bash
sudo dfu-util -R -a 0 -s 0x08000000:leave -D Katapult_plus_CartographerV4_6.1.0_CAN_1M_lite.bin -d 0483:df11
```

{% endcode %}

Once compelte, it should exit out of DFU mode, and you should be able to find your probe on USB or CAN, which ever you have selected.
{% endtab %}
{% endtabs %}


# Switching V4 from USB to CAN

Please follow this guide

[V4 - Switching from USB to CAN](/cartographer-probe/installation-and-setup/v4-switching-from-usb-to-can)


# Troubleshooting

This list is NOT exhaustive, if you need support don't be a stranger and please come and talk to us on [Discord](https://discord.gg/yzazQMEGS2), we are more than happy to help.\
\
If you do think that something is missing, please let us know and I will add it as soon as I can.

### Command Mismatch

<figure><img src="/files/cPMvHPrKQSAvKhKgcsRV" alt="" width="375"><figcaption></figcaption></figure>

Seeing the error above? This error shows yours cartographer is flashed with Survey 5.0 firmware however your printer.cfg/klipper is currently configured for firmware earlier than 5.0.\
\
Remove or comment out your \[cartographer] sections, taking note of the offsets and then continue with [the guide here.](/original-plugin/installation/klipper-configuation)

## General Troubleshooting

<details>

<summary>I'm getting weird errors after updating my cartographer.py, what do I do?</summary>

Firstly make sure you have hit the **RESTART KLIPPER** button in your Fluid/Mainsail UI, this will force the refresh of cartographer.py to the updated version.

<img src="/files/nN5F1thS2HgE6PKDUEsR" alt="Always RESTART KLIPPER after an update." data-size="original">

</details>

<details>

<summary>Strange Bed Mesh or Touch issues</summary>

You should try disable any extra custom macros that affect BED\_MESH\_CALIBRATE or anything that influences GCODE\_Z\_OFFSET like KAMP adaptive mesh etc.\
\
Also try turning off or disabling the <mark style="color:red;">**crowsnest**</mark> or <mark style="color:red;">**LED\_effects**</mark> plugins

</details>

<details>

<summary>Option 'pin' in section 'probe' must be specified</summary>

[<img src="https://github.com/Cartographer3D/docs/raw/8279e4591b99ae0647cad467be2561b1ce6df0a5/.gitbook/assets/image.png" alt="" data-size="original">](https://github.com/Cartographer3D/docs/blob/8279e4591b99ae0647cad467be2561b1ce6df0a5/.gitbook/assets/image.png)

This can occur either after a Klipper update when the sym link occasionally gets broken, or if you have not installed the Klipper component during the install, either way the fix is the same, just re-run the installer below.

```
curl -s -L https://raw.githubusercontent.com/Cartographer3D/cartographer3d-plugin/refs/heads/main/scripts/install.sh | bash -s -- --klipper ~/klipper --klippy-env ~/klippy-env
```

</details>

<details>

<summary>Unknown pin chip name 'cartographer'</summary>

![](/files/tti5SDgvoHVrzqsVLfy0)\
\
The following two issues are usually why you recieve the above error.

1. You are referencing cartographer/scanner before you have declared it in your config file. It is advisable to add the cartographer/scanner section just below where you declare your MCU's.
2. You have referenced cartographer with a capitilisation `[Scanner]` vs `[scanner]` or `cs_pin: Scanner:PA3` vs `cs_pin: scanner:PA3`

This can happen when the symlink between klipper and cartographer is broken. You can check your symlinks with the following command.

```bash
find  ~/klipper/klippy/extras/  -maxdepth 1 -type l -ls
```

If they dont look right, or youre unsure, run the following

```bash
curl -s -L https://raw.githubusercontent.com/Cartographer3D/cartographer3d-plugin/refs/heads/main/scripts/install.sh | bash -s -- --klipper ~/klipper --klippy-env ~/klippy-env
```

And then check your symlinks again. You should see scanner.py pointed to the cartographer-klipper folder.

</details>

<details>

<summary>Unknown pin chip name 'probe'</summary>

[![](https://github.com/Cartographer3D/docs/raw/8279e4591b99ae0647cad467be2561b1ce6df0a5/.gitbook/assets/image%20\(2\)%20\(1\)%20\(1\)%20\(1\).png)](https://github.com/Cartographer3D/docs/blob/8279e4591b99ae0647cad467be2561b1ce6df0a5/.gitbook/assets/image%20\(2\)%20\(1\)%20\(1\)%20\(1\).png)

This error usually happens when you have your `[cartographer]` section below your `[stepper_z]` section, move the `[cartographer]` section near your MCU's.

</details>

<details>

<summary>mcu 'cartographer': Unknown command: endstop_home</summary>

In `[stepper_z]` you have set `endstop_pin: scanner:z_virtual_endstop` this should be `endstop_pin: probe:z_virtual_endstop`

</details>

<details>

<summary>"Error importing numpy: you should not try to import numpy from" error</summary>

[![](https://github.com/Cartographer3D/docs/raw/8279e4591b99ae0647cad467be2561b1ce6df0a5/.gitbook/assets/image%20\(15\).png)](https://github.com/Cartographer3D/docs/blob/8279e4591b99ae0647cad467be2561b1ce6df0a5/.gitbook/assets/image%20\(15\).png)

The error in a slightly different view.

This error usually occours when you have installed Cartographer as root rather than as a normal user (not always, but that is the only way I have been able to replicate it.).

In order to fix this, please update Klipper to the latest version either via your WebUI, or via KIAUH, once updated please access your Pi (or similar) via ssh

Run the the following command:

```
sudo apt install libopenblas-base
```

if the above doesn't work, please try the following

```
sudo apt install libopenblas-dev
```

</details>

<details>

<summary>Endstop showing Triggered</summary>

[![](https://github.com/Cartographer3D/docs/raw/8279e4591b99ae0647cad467be2561b1ce6df0a5/.gitbook/assets/image%20\(12\).png)](https://github.com/Cartographer3D/docs/blob/8279e4591b99ae0647cad467be2561b1ce6df0a5/.gitbook/assets/image%20\(12\).png)

Endstop Z showing constantly triggered

Please ensure that you have calibrated your probe

</details>

<details>

<summary>Option mesh_main_direction is not a valid section in cartographer</summary>

[![](https://github.com/Cartographer3D/docs/raw/8279e4591b99ae0647cad467be2561b1ce6df0a5/.gitbook/assets/image%20\(13\).png)](https://github.com/Cartographer3D/docs/blob/8279e4591b99ae0647cad467be2561b1ce6df0a5/.gitbook/assets/image%20\(13\).png)

You do not have a valid \[bed\_mesh] section in your printer.cfg, please check out [this site](https://www.klipper3d.org/Bed_Mesh.html) for how to add one.

</details>

<details>

<summary>Scanner model 'default' was created for <code>x</code> error</summary>

Your cartographer model doesnt match your current mode. Please recalibrate so that youre new model will match.

</details>

<details>

<summary>Unable to parse option mesh_runs in section cartographer</summary>

[![](https://github.com/Cartographer3D/docs/raw/8279e4591b99ae0647cad467be2561b1ce6df0a5/.gitbook/assets/image%20\(14\).png)](https://github.com/Cartographer3D/docs/blob/8279e4591b99ae0647cad467be2561b1ce6df0a5/.gitbook/assets/image%20\(14\).png)

You do not have a valid \[bed\_mesh] section in your printer.cfg, please check out [this site](https://www.klipper3d.org/Bed_Mesh.html) for how to add one.

</details>

<details>

<summary>Unable to find your Cartographer USB probe via <code>ls /dev/serial/by-id/</code></summary>

So there are a few reasons you might not be able to find your Cartographer probe.

1. A bug has been introduced in Debian Bullseye (which includes MainsailOS), which prevents the symlinks in /dev/serial/by-id/ from being created. If your printer can't connect to the MCU anymore after a system update, you can check if it is caused by that bug by checking the installed version of udev with `apt show udev`

   \
   If your version is `247.3-7+deb11u2` or `247.3-7+rpi1+deb11u2` you have the broken package installed and should use one of the fixes below. Take special care about the last number ("u2").\
   \
   As of May 20 2023, this bug has spread to PiOS based systems as well.\
   \
   **To Fix -** Replace the corrupted udev file with one from upstream systemd:

```
# backup the existing rules file (just in case)

sudo cp /usr/lib/udev/rules.d/60-serial.rules /usr/lib/udev/rules.d/60-serial.old

# download the rule from the systemd main repo.
sudo wget -O /usr/lib/udev/rules.d/60-serial.rules https://raw.githubusercontent.com/systemd/systemd/main/rules.d/60-serial.rules

# reboot
sudo reboot
```

2. If you have a v3 probe, it might be flashed for CAN Mode, please re-flash it for USB Operation, this includes the Katapult bootloader, as this is used to change the operation of the probe itself.\
   \
   For more information on how to do that, [click here](https://github.com/Cartographer3D/docs/blob/8279e4591b99ae0647cad467be2561b1ce6df0a5/cartographer-probe/firmware-update)
3. Check your USB Cable - If you have bought a flat pack, and your probe is a assembled for RIGHT ANGLE operation, you might have to re-assemble re-pin your USB cable in reverse.

</details>

<details>

<summary>Klipper environement running on Python 2</summary>

You will need to update your Klipper env from Python 2 to Python 3. the following guide is taken from <https://klipper.discourse.group/t/process-for-migrating-to-python3/5292/3>\
\
There is another outstanding guide by EricZimmerman that I would highly recommend checking out\
<https://github.com/EricZimmerman/VoronTools/blob/main/OSUpgrade.md>\\

{% hint style="info" %} Note - a minimum version of Pyhon 3.9 is required. {% endhint %}

```
sudo service klipper stop

# remove current klippy-env environment
cd ~
rm -rf klippy-env

# create new venv
virtualenv -p python3 klippy-env

#install new Klipper venv
cd ~/klippy-env
bin/pip install -r ../klipper/scripts/klippy-requirements.txt
```

Restart your pritner, and you should now have a wonderful Klipper environement running in Python3.

</details>

<details>

<summary>Klipper is showing my install as dirty?</summary>

[![](https://github.com/Cartographer3D/docs/raw/8279e4591b99ae0647cad467be2561b1ce6df0a5/.gitbook/assets/image%20\(3\).png)](https://github.com/Cartographer3D/docs/blob/8279e4591b99ae0647cad467be2561b1ce6df0a5/.gitbook/assets/image%20\(3\).png)

Klipper will show any build as klipper as "dirty" if there are any untracked Python files within the folders, this is the same with all other python based plugins such as ShakenTune, LEDEffects and so on.\
\
Unfortuantly, there is no way around this at the moment.\
\
<https://github.com/Klipper3d/klipper/actions/runs/4840565448>

</details>

<details>

<summary>Missing Clusters or Sharp Drop in your Bed Mesh</summary>

If you get a sharp drop in your bed mesh, or missing clusters error after a scan, ensure that your probe is covering the entire bed. You may need to adjust your bed mesh accordingly.

</details>

<details>

<summary>Repeated No trigger on z after full movement</summary>

<img src="/files/AXbrwEWh6W3Fg1fwOxY4" alt="" data-size="original">

If you are getting the error `No trigger on z after full movement`, and running a lower powered SBC such as a Raspberry Pi 2, or a BTT CB1, You are able to lock a single CPU core to your Klipper instance.\
\
Esoterical has an outstanding guide on how to do so below.\
\
<https://canbus.esoterical.online/troubleshooting/timeout_during_homing_probing.html#experimental>

</details>

<details>

<summary>Klipper freezes during scan/"timer too close" error</summary>

The cartographer probe sends quite a bit of data to the MCU during a scan. If the MCU is too busy, it can cause Klipper to freeze or throw a `timer too close` error. Often, this is due to an underpowered SBC, such as Raspberry Pi 2/3, or the BTT CB1. You can try to reduce some of the load by (temporarily) disabling cameras or other intensive processes, or following the guide linked below to adjust your settings.\
If all else fails, you could consider upgrading to a more powerful SBC.

<https://canbus.esoterical.online/troubleshooting/timeout_during_homing_probing.html#experimental>

</details>


# Need Assistance?

If you're struggling with the setup, configuration or another cartographer issue, we're available on [discord](https://discord.gg/yzazQMEGS2) to help you.

If you're having issues within klipper/mainsail, please create a thread in the [Help & Support ](https://discord.com/channels/1165274913624572014/1229798364514750596)section on discord and PLEASE include the following.

* Printer.cfg
* Klippy.log
* Screenshots of the issue if available.
* A detailed description of what you were doing at the time of this issue.

### Using Touch?

Heres a quick check list of things to check prior to asking for assistance if youre having inconsistent touch results or failures.

* [ ] Is cartographer mounted approx within a range of 2.6-3mm **ABOVE** the nozzle tip? [(Tool Here)](/cartographer-probe/installation-and-setup/probe-installation#mount-cartographer)
* [ ] Is your toolhead completely rigid?
* [ ] Checked toolhead for loose screws?
* [ ] Checked toolhead for bad wiring?
* [ ] Checked A/B or X/Y and Z belt tension?
* [ ] Checked lead screws?
* [ ] Is your nozzle clean?
* [ ] Have you tried turning off crowsnest, adaptive mesh or led\_effects? (Note)


# Useful Links

Here are a couple of useful links to guides or sites that we recommend.

### Esoterical's CANBus Guide

Esoterical's CANBus guide is an outstanding, and well documented guide on all things CANBus. It's extremely clear, well written and easy to follow with detailed checkpoints and "stop" signs for where neccessary.

If you are having issues with your CANBus network, or are setting it up for the first time, please check this out.

{% embed url="<https://canbus.esoterical.online/>" %}

### Eric Zimmerman's OS Upgrade Guide

As he puts it, Numpy got you down? Do you hate Python 3? Crowsnest blues? Then Eric Zimmerman's guide will help you solve any issues upgrading your Raspbery Pi and Klipper Installation to where you need it to be.

Click [here ](https://github.com/EricZimmerman/VoronTools/tree/main)to check it out

### Ellis' Print Tuning Guide

An outstanding guide to help you tune and calibrate your printer. It truely is a true A to Z guide and works with most common printers.

{% embed url="<https://ellis3dp.com/Print-Tuning-Guide/>" %}

### A Better Print\_Start Macro by jontek2

A better Print\_Start macro is a great resource to imporve your `print_start` macro, it is detailed, verl well documented.\
\
With this macro you will be able to pass variables such as print temps and chamber temps to your print\_start macro. By doing so you will be able to automatically start a heatsoak and customize your printer's behaviour. The heatsoak will start when you've sliced a print with a bed temp higher than 90c. It will then heatsoak to your set chamber temp. If no chamber temp is set it will fall back to the macro's standard chamber temp of 40c.\
\
Check [here ](https://github.com/jontek2/A-better-print_start-macro/blob/main/README.md)to check it out


# FAQ

<mark style="color:purple;">Last Updated: December 17th 2024</mark>

### Why cant I use touch for bed mesh, homing etc

It is in development, however as of December, we are currently re-organizing the cartographer code to allow us more freedom to properly implement these features.

### Does Cartographer Touch use the ADXL sensor?

No, Survey Touch currently uses the [LDC1612](https://www.ti.com/product/LDC1612) sensor to calculate when the nozzle has come into contact with the bed.

### Can I use cartographer without touch without changing firmware?

Yes, you sure can. All you need to do is head into printer.cfg and under \[scanner] change `mode: touch` to mode`: scan`\
\
You will ofcourse need to create a new model by [following this guide.](/cartographer-probe/archive/scan-based-calibration)

### Do I need to run the calibration while hot or cold?

It doesnt matter! Thats the point of touch! Do what works best for you.

### Does my nozzle need to be clean when doing a touch?

Yes it does, we recommend a silicone nozzle brush, <mark style="color:yellow;">which is now included with all cartographer purchases</mark>. However you can also adjust your retries, heat your nozzle to 150c in your print start and then do the touch. It should smoosh the filament off of the nozzle for you to get a successful touch. Nozzle brush is 100% better however.

### My bed mesh is scanning in Y direction and not X, how do i fix it?

In your `[scanner]` section add `mesh_main_direction: x` to your <mark style="color:yellow;">**printer.cfg**</mark>

### What do I need to add or change in my print start macro?

See [Print Start Macro](/original-plugin/installation/print-start-macro). But bascially, you just need to make sure your nozzle is no hotter than <mark style="color:red;">**maximum 150c**</mark> and then do a `CARTOGRAPHER_TOUCH` after you do a `BED_MESH_CALIBRATE`

### Does touch work with glass or garolite beds?

It **CAN SOMETIMES** work depending on the thickness of your glass or garolite bed. However we can't say for certain. If its less than 2mm thick theres a good chance however we **accept no responsibility** if it **doesn't** work!

### Is it guaranteed that this will work on my printer?

As with a lot of things in life, we **can't guarantee 100% compatibility**, it should be compatible with most well built printers, there are obviously some exceptions, the biggest impacting factor is the quality of the Z axis motion. If there is any binding or lack of consistency, then you may find that you will not be able to use this feature. You can still use **regular cartographer scan mode** though!

### **Can Cartographer be used with RepRapFirmware in either USB or CAN mode?**

RepRapFirmware (RRF) doesnt currently support multple MCUs, with the exception of via CAN-FD, which currently Cartographer does not support.

### What temperature is Cartographer safe to?

The Coil is safe until 160c\
The MCU is rated to 85c however we've seen successful use until 100c. We recommend trying to keep it around 85c or lower.

### What does it mean when my coil is showing negative temperatures?

You've more than likely damaged your coil by knocking off one of the resistors. This wont affect functionality while using TOUCH. Contact us on discord to discuss.

### Do I still need to do the paper test?

When doing the manual steps of calibration yes, this shouldn't be often as you can re-calibrate faster if using touch. You should only paper test method if you've drastically changed something and you have no model to work from.

### Cartographer has been working for weeks, suddenly it isn't, whats wrong?

This can be for a variety of reasons. Heres a short list of possible things to check:

* [ ] Is your toolhead completely rigid?
* [ ] Checked toolhead for loose screws?
* [ ] Checked toolhead for bad wiring?
* [ ] Checked A/B or X/Y and Z belt tension?
* [ ] Checked lead screws?
* [ ] Is your nozzle clean?

If those things are checked, redo your calibration from the very start and if still having issues, [consult us on Discord by making a help thread.](https://discord.com/channels/1165274913624572014/1229798364514750596)

### Does Cartographer work with embedded magnet beds?

No, the embedded magnets will cause issues with your mesh. Magnetic sheets are perfectly fine as they cover the entire surface evenly.

### **Does Cartographer support Delta Printers**

Currently Cartographer does not support Delta printers, support will be added in future revisions of our firmware and code.

### **Klipper is telling me it's dirty... should I re-install?**

Dirty means that your Klipper directory is not clean i.e. has had changes to it compared to what is on the Github, this isn't something to worry about, it is expected with how Klipper currently deals with plugins.

### **How do i know what model cartographer I have?**

<figure><img src="/files/KiNYpbJGPGFKmurLR5yl" alt=""><figcaption><p>Bottom of Cartographer</p></figcaption></figure>

<figure><img src="/files/YjRofOrHsLJsPS10PM3Y" alt=""><figcaption><p>Top of Cartographer</p></figcaption></figure>


# Assembly

There are a few different assembly options for the Cartographer probe, if you purchase the Flat Pack, you will recieve everything required to assemble for Standard, Low Profile, Right Angle installations. If you want to install on a Creality K1, or any installation with a wire extension to the coilboard, the wire is not included.

* If you are assembling as a Standard form factor - [click here](/cartographer-probe/assembly/standard)
* If you are assembling in a Low Profile form factor - [click here](/cartographer-probe/assembly/low-profile)
* If you are assembling in a Right Angle form factor - Coming Soon

If you are assembling in any other way, please take note of the following:

* The bumps for the Thermistor and Capacitor on your coil board must face down towards your printers bed.<br>

  <figure><img src="/files/BKNehNgd21cCG1dDXyJU" alt=""><figcaption><p>This shows the BOTTOM of the coil board, with the visable bumps that should be facing the bed during installation.</p></figcaption></figure>
* The MCU and coil board have a polarity, the white boxes on the silk screen should align up together, Note the image below and the orientation shown.<br>

  <figure><img src="/files/WpTxAygA3lbhEAKjN4BP" alt=""><figcaption><p><strong>Top Picture</strong> - Note the White Boxes for reference<br><strong>Bottom Left</strong> - Correct Orentation of MCU board and coil board<br><strong>Bottom Right</strong> - Flipped Correct view of MCU board and coil board</p></figcaption></figure>
* If your installation moves away from any of the standard methods, please check the USB or CAN cable polarity they might need re-pinning, don't worry if you do plug it in reversed, we have reversed polarity protection, so your board should be fine.


# Standard

In order to assemble your Cartographer, you will need the following tools.

* Soldering Iron - I personally use the [Pinecil v2](https://pine64.com/product/pinecil-smart-mini-portable-soldering-iron/), would highly recommend.
* Snippers
* Solder & Flux
* Flat Pack Cartographer coil board and MCU.
* Cartographer Fastener Pack - from this you will need the 2 \* 2.54mm Pins and the JST-PH straight connector.

### Step 1 - Print Assembly Jig

Print of our Standard Assembly Jig - it is avilable [here](https://github.com/Cartographer3D/cartographer-klipper/blob/master/assembly%20jig/Cartographer%20Standard%20-%20Assembly%20Jig.stl)

There are no special printing instructions, though I would advise printing on a 0.4mm nozzle.

<figure><img src="/files/pgzMsdBbJf3B6SqUHPM8" alt=""><figcaption><p>Standard Assembly Jig</p></figcaption></figure>

### Step 2 - Coilboard and Pins

Install the Coilboard with the bumps facing down into the indents made for them, and place the pins into the PCB

<figure><img src="/files/ONvCcgZIisQr4Wg32Tiz" alt=""><figcaption></figcaption></figure>

### Step 3 - MCU Placement

Place the MCU on the bridge, making sure it is flat fits tightly. The main components such as t he MCU, resistors, capacitors and LDO are facing up.<br>

{% hint style="danger" %}
At this point check your orientations match the photo below, the MCU and the Coilboard MUST have the correct polarity
{% endhint %}

<figure><img src="/files/GePWddiupFiDA28QQX98" alt=""><figcaption></figcaption></figure>

### Step 4 - Solder Pins

Heat your soldering iron to a sufficient temperature for your solder and apply flux if neccessary.

Solder the pins from 1 to 4.

<figure><img src="/files/JYB5d7A1tpD6YAv48Gwt" alt=""><figcaption></figcaption></figure>

### Step 5 - Remove and Replace in Jig

Gently take your MCU and Coilboard out of the rig, placing the JST connector correctly into the socket and replace into the other half of the jig.

Again, ensure that the boards are tightly in place and are flat.

<figure><img src="/files/j6C42Vd89JhrVSB91t2W" alt=""><figcaption></figcaption></figure>

### Step 6 - Solder Pins (again)

Now solder in any order, ensuring that you do not bridge any of the pins.

<figure><img src="/files/dOKqAlb7bvoOIE8LVkjF" alt=""><figcaption></figcaption></figure>

### Step 7 - Check your work

Check your work, it should look somewhat like the picture shown below.

<figure><img src="/files/zc0PBzt8yy9J1Qq4kyPM" alt=""><figcaption></figcaption></figure>


# Low Profile

Coming Soon


# Right Angle

In order to assemble your Cartographer, you will need the following tools.

* Soldering Iron - I personally use the [Pinecil v2](https://pine64.com/product/pinecil-smart-mini-portable-soldering-iron/), would highly recommend.
* Snippers
* Solder & Flux
* Flat Pack Cartographer coil board and MCU.
* Cartographer Fastener Pack - from this you will need the 2 \* 2.54mm Bent Pins and the JST-PH angled connector.

{% hint style="danger" %}
NOTE - If purchased as a Flat Pack, the USB / CAN Cable connector will need re-pinning for right angle assembly.
{% endhint %}

### Step 1 - Print Assembly Jig

Print of our Standard Assembly Jig - it is avilable [here](https://github.com/Cartographer3D/cartographer-klipper/blob/master/assembly%20jig/Right%20Angle%20-%20Assembly%20Jig.stl)

There are no special printing instructions, though I would advise printing on a 0.4mm nozzle.

<figure><img src="/files/Pi0A3kHdYkmf36s8pMTl" alt=""><figcaption><p>Assembly Jig created by <a data-mention href="/users/5a099398f9717400307e6b92">/users/5a099398f9717400307e6b92</a></p></figcaption></figure>

### Step 2 - Place the JST right angle connector

Place the JST right angle connector pointing up.

<figure><img src="/files/L6mCDhtQdRANbMfE7ahe" alt=""><figcaption></figcaption></figure>

### Step 3 - Place the MCU Board

Place the MCU board into the JST connector.

<figure><img src="/files/mHe9VYLbl9fX92idSqQq" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
BEFORE APPLYING ANY SOLDER - Ensure the MCU board has the correct orientation. The STM chip should be facing up.
{% endhint %}

Now apply solder to the JST pins, carefully ensuring you do not add solder to any of the surrounding components.

<figure><img src="/files/O88nitNodUVQ18En5Mmh" alt=""><figcaption></figcaption></figure>

### Step 3 - Coilboard

Remove the MCU board for now

Rotate the Jig with the coilboard section facing up adding the JST Right Angle connectors in, with the plastic part resting at the bottom, and the longer ends protruding up towards the coil

<figure><img src="/files/LYUURmFnOCnXe54Brufu" alt=""><figcaption></figcaption></figure>

Add the coilboard in, you can secure in place using M3 screws if you wish, but it isn't neccessary.

<figure><img src="/files/nD2HGuU7XtCMAccu23Oa" alt=""><figcaption></figcaption></figure>

Rotate the Jig back towards yourself so the MCU board will be at the top.

### Step 4 - Solder the MCU board in place

Solder the MCU board into place, noting the rotation of the board. At this point you should be able to see the silk screen saying ADXL or CANL/D-.\
\
The JST connector should be protruding up, and not in it's assembly "well".

<figure><img src="/files/Xs2gYcWcF9rASzek1QMX" alt=""><figcaption></figcaption></figure>

Once soldered, rotate the jig back down again so the coilboard is facing up.

### Step 5 - Soldering the Coilboard

Apply solder to the coilboard pins, ensuring that the rotation of the coilboard has the bumps facing up. The coilboard cannot be freely rotated, these epoxy bumps MUST be in the correct orientation.

<figure><img src="/files/oHukQApBKJYcYAxj0bSo" alt=""><figcaption></figcaption></figure>

### Step 6 - Finish Up

Snip off the excess pins protruding out of the coilboard. Ensure you leave a small amount (1mm\~) and that you don't damage the coilboard or the traces.

<figure><img src="/files/0vgGLKTJp5TdahF5R0YX" alt=""><figcaption></figcaption></figure>

### Step 7 - Finished

Gently pull your Cartographer out of the jig, and inspect for any issues. It should look like the example below.

<figure><img src="/files/Ob3knBslNlMN6L0g142J" alt=""><figcaption></figcaption></figure>


# Archive


# v1 (RP2040 Based Probes)


# Klipper Configuration

Add the following configuration to the top of your Printer.cfg file. Note, you need to replace the serial path with your probes serial path, this can be found by running the following command. `ls /dev/serial/by-id/`

```yaml
[idm]
serial:
#   Path to the serial port for the idm device. Typically has the form
#   /dev/serial/by-id/usb-idm_idm_...
speed: 40.
#   Z probing dive speed.
lift_speed: 5.
#   Z probing lift speed.
backlash_comp: 0.5
#   Backlash compensation distance for removing Z backlash before measuring
#   the sensor response.
x_offset: 0.
#   X offset of idm from the nozzle.
y_offset: 21.1
#   Y offset of idm from the nozzle.
trigger_distance: 2.
#   idm trigger distance for homing.
trigger_dive_threshold: 1.5
#   Threshold for range vs dive mode probing. Beyond `trigger_distance +
#   trigger_dive_threshold` a dive will be used.
trigger_hysteresis: 0.006
#   Hysteresis on trigger threshold for untriggering, as a percentage of the
#   trigger threshold.
cal_nozzle_z: 0.1
#   Expected nozzle offset after completing manual Z offset calibration.
cal_floor: 0.1
#   Minimum z bound on sensor response measurement.
cal_ceil:5.
#   Maximum z bound on sensor response measurement.
cal_speed: 1.0
#   Speed while measuring response curve.
cal_move_speed: 10.
#   Speed while moving to position for response curve measurement.
default_model_name: default
#   Name of default idm model to load.
mesh_main_direction: x
#   Primary travel direction during mesh measurement.
#mesh_overscan: -1
#   Distance to use for direction changes at mesh line ends. Omit this setting
#   and a default will be calculated from line spacing and available travel.
mesh_cluster_size: 1
#   Radius of mesh grid point clusters.
mesh_runs: 2
#   Number of passes to make during mesh scan.
```

You then need to remove, or comment out your `[probe]` section.

Now add a safe\_z\_home section with the following inforamation.

```yaml
[safe_z_home]
home_xy_position: [your x-axis center coordinate], [your y-axis center coordinate]
# Example home_xy_position: 175,175 - This would be for a 350 * 350mm bed. 
z_hop: 10
```

You will also need to update your Z configuration settings.

```yaml
[stepper_z]
endstop_pin: probe:z_virtual_endstop # use cartographer as virtual endstop
homing_retract_dist: 0 # cartographer needs this to be set to 0
```

Finally, you need to ensure you have a suitable `bed_mesh` section. Information can be found [here](https://www.klipper3d.org/Bed_Mesh.html)

{% hint style="warning" %}
It is vital you complete the Calibration steps, without doing so the probe will not work properly and is likely to show TRIGGERED.
{% endhint %}


# Calibration

Home the machine in X and Y:

```
G28 X Y
```

Position the nozzle in the center of the bed. You will need to adjust the coordinates for your machine.

```
G0 X125 Y125
```

Start the calibration process:

```
IDM_CALIBRATE
```

You can either use the web interface to adjust the nozzle height from the bed, or `TESTZ Z=-0.01` to lower it.\
\
Use a piece of paper or a feeler gauge to measure the offset. Once finished remove the paper/gauge and accept the position.

```
ACCEPT
```

Save the results to your config file.

```
SAVE_CONFIG
```

#### Initial Tests

Home your printer.

```
G28
```

You can test the accuracy.

```
PROBE_ACCURACY
```

You can also measure the backlash of your Z axis

```
IDM_ESTIMATE_BACKLASH
```

You can now run a Bed Mesh Calibration (I would advise doing either a `Z_TILT` or `QUAD_GANTRY_LEVEL` before.

```
BED_MESH_CALIBRATE
```

Your Cartographer is now calibrated and ready to go.


# Classic Installation


# Klipper Setup

Klipper Setup for Classic Mode

## Installation of the Cartographer Klipper Module

Clone the Klipper module from GitHub using the following commands, you then need to run our installation script.

```bash
cd ~
git clone https://github.com/Cartographer3D/cartographer-klipper.git
./cartographer-klipper/install.sh
```

This step will automatically create a link to the script and place it in the klipper/klippy/extra directory.

{% hint style="info" %}
If you are in Mainland China, use the following commands instead:

<pre class="language-bash"><code class="lang-bash"><strong>cd ~
</strong><strong>git clone https://gitee.com/NBTP/cartographer-klipper.git
</strong>./cartographer-klipper/install.sh
</code></pre>

{% endhint %}

### Remember to update cartographer via the mainsail/fluidd UI

{% hint style="warning" %}
Legacy Klipper environements running on Python2 will need updating to Python 3.9 or later. The easiest way to do that is a complete fresh install, though we do have a guide that can help that is linked [here](https://docs.cartographer3d.com/cartographer-probe/troubleshooting#klipper-environement-running-on-python-2)
{% endhint %}

## Managing Updates via Moonraker

In order to keep up to date with our latest Klipper software, please add the following config to the bottom of your `moonraker.conf` file.

```yaml
[update_manager cartographer]
type: git_repo
path: ~/cartographer-klipper
channel: stable
origin: https://github.com/Cartographer3D/cartographer-klipper.git
is_system_service: False
managed_services: klipper
info_tags:
  desc=Cartographer Probe
```

{% hint style="info" %}
**Are you from Mainland China?**\
\
Use this alternate moonraker.conf instead.

```yaml
[update_manager cartographer]
type: git_repo
path: ~/cartographer-klipper
channel: stable
origin: https://gitee.com/NBTP/cartographer-klipper.git
requirements: requirements.txt
is_system_service: False
managed_services: klipper
info_tags:
  desc=Cartographer Probe (Gitee)
```

{% endhint %}

upon completion, press SAVE & RESTART and it should now display in the update section of either Mainsail or Fluidd.

<figure><img src="/files/tvd5qinaHHUMxDXGLqGe" alt=""><figcaption><p>Cartographer Software updates managed via Moonraker.</p></figcaption></figure>

If you get "Repo is dirty. Detected the following modified files: \['install.sh']", a soft Recovery should fix it.

<figure><img src="/files/bzdQ8NAWbZk0Oknct5sJ" alt=""><figcaption></figcaption></figure>

## Finding the Serial or UUID

Note, you need to replace the serial path or UUID with your probes serial path or UUID, this can be found by running the following commands

For USB based probes

```bash
ls /dev/serial/by-id/
```

For CAN based probes

```bash
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0
```

Take note of either the Serial ID or the UUID.

## New Firmware

Since late August, most probes shipping from directly from Cartographer3D, and a majority of our resellers have pre-flashed with the Cartographer Survey Firmware.

If your box or antistatic bag states "Survey Touch Ready", please go here

{% content-ref url="/pages/bPEUEWxmPVNNb54D5vyr" %}
[Klipper Configuation](/original-plugin/installation/klipper-configuation)
{% endcontent-ref %}

If it doesnt, don't worry. You can update your probe using our flashing tool. If you want to configure it as is, please go to the next page.


# Klipper Configuration

Klipper Configuration for Classic Mode

{% hint style="info" %}
[If you want to use Survey Touch, our contact probing solution go here](/original-plugin/installation/klipper-configuation)
{% endhint %}

## Config File (Firmwares 4.0.1 or earlier)

{% hint style="danger" %}
if you are using an existing printer config, make sure you remove any previous reference to `[cartographer]` or `[probe]` in the saved section at the bottom.\
\
Use CTL + F (Mac OS use **Command (⌘) + F**) to search to find either \[`cartographer]` or `[probe]` and delete these sections.
{% endhint %}

```yaml
[cartographer]
serial:
#   Path to the serial port for the Cartographer device. Typically has the form
#   /dev/serial/by-id/usb-cartographer_cartographer_...
#   
#   If you are using the CAN Bus version, replace serial: with canbus_uuid: and add the UUID.
#   Example: canbus_uuid: 1283as878a9sd
#
speed: 40.
#   Z probing dive speed.
lift_speed: 5.0
#   Z probing lift speed.
backlash_comp: 0.5
#   Backlash compensation distance for removing Z backlash before measuring
#   the sensor response.
# 
#   Offsets are measured from the centre of your coil, to the tip of your nozzle 
#   on a level axis. It is vital that this is accurate. 
#
x_offset: 0.0
#   X offset of cartographer from the nozzle.
y_offset: 21.1
#   Y offset of cartographer from the nozzle.
mesh_runs: 2
#   Number of passes to make during mesh scan.

[bed_mesh]
zero_reference_position: 125, 125    
#    set this to the middle of your bed
speed: 200
#    movement speed of toolhead during bed mesh
horizontal_move_z: 5
#    height of scanner during bed mesh scan
mesh_min: 35, 6
#    start point of bed mesh [X, Y]
mesh_max: 240, 198
#    end point of bed mesh [X, Y]
probe_count: 30, 30
algorithm: bicubic
```

{% hint style="warning" %}
NOTE - The \[cartographer] section needs to be above any other reference to either cartographer or probe within your Klipper config, for this reason I advise adding it near the top of your config file.
{% endhint %}

If you want to use the probe for Input Shaper, please add the following to your config.

{% tabs %}
{% tab title="adxl345 based probes" %}

```yaml
[adxl345]
cs_pin: cartographer:PA3
spi_bus: spi1

[resonance_tester]
accel_chip: adxl345
probe_points:
    125, 125, 20
```

{% endtab %}

{% tab title="lis2dw based probes" %}

```yaml
[lis2dw]
cs_pin: cartographer:PA3
spi_bus: spi1

[resonance_tester]
accel_chip: lis2dw
probe_points:
    125, 125, 20
```

{% endtab %}
{% endtabs %}

You then need to remove, or comment out your `[probe]` section.

Now add a safe\_z\_home section with the following inforamation.

```yaml
[safe_z_home]
home_xy_position: [your x-axis center coordinate], [your y-axis center coordinate]
# Example home_xy_position: 175,175 - This would be for a 350 * 350mm bed. 
z_hop: 10
```

You will also need to update your Z configuration settings, this will involve removing or commenting out your `position_endstop:` configuration. `Homing_retract_dist` must also be set to 0

{% hint style="info" %}
Don't get confused, "endstop\_pin" should contain probe and NOT cartographer.
{% endhint %}

```yaml
[stepper_z]
endstop_pin: probe:z_virtual_endstop # uses cartographer as virtual endstop
homing_retract_dist: 0 # cartographer needs this to be set to 0
```

If you are running Klipper Screen, add this Macro to your G-Code, this stops klipper screen doing a random bedmesh when you press Z Calibrate on it.

```gcode
[gcode_macro PROBE_CALIBRATE]
gcode:
    CARTOGRAPHER_CALIBRATE
```

{% hint style="danger" %}
You will now need to ensure that you update your Z-Tilt or QGL settings to ensure that Cartographer is over the bed when performing these actions. We will be checking these during the calibration phase.
{% endhint %}

Finally, you need to ensure you have a suitable `bed_mesh` section. Information can be found [here](https://www.klipper3d.org/Bed_Mesh.html)

{% hint style="warning" %}
It is vital you complete the Calibration steps, without doing so the probe will not work properly and is likely to show TRIGGERED.
{% endhint %}


# Calibration

Cartographer Calibration for Classic Mode

Home the machine in X and Y:

<pre><code><strong>G28 X Y
</strong></code></pre>

Position the nozzle in the center of the bed. You will need to adjust the coordinates for your machine.

```
G0 X125 Y125
```

{% hint style="warning" %}
At this point, you might note that your Endstop Z is TRIGGERED, this is normal, and will be resolved once you run the next command.

<img src="/files/xKxKQlYabvZEqcoMscE3" alt="" data-size="original">
{% endhint %}

Start the calibration process:

{% hint style="info" %}
If you regularly print with a hot chamber (60oC+) it is worth calibrating with a hot chamber.
{% endhint %}

```
CARTOGRAPHER_CALIBRATE
```

You can either use the web interface to adjust the nozzle height from the bed, or `TESTZ Z=-0.01` to lower it.\
\
Use a piece of paper or a feeler gauge to measure the offset. Once finished remove the paper/gauge and accept the position.

```
ACCEPT
```

Save the results to your config file.

```
SAVE_CONFIG
```

## Initial Tests

Home your printer.

```
G28
```

You can test the accuracy.

```
PROBE_ACCURACY
```

You can also measure the backlash of your Z axis

```
CARTOGRAPHER_ESTIMATE_BACKLASH
```

To make use of the backlash estimation that is given. You will get results spit out starting with

```
Median distance moving up
```

In this line will be a measurement called "delta" Take note of the value. Locate the configuration section marked:

```
backlash_comp: 2.01
```

Update this section with your new estimated backlash compensation. It is a good idea to do this compensation test at all 4x corners of your build plate and then again at middle of build plate. If you are on a printer with belted Z and the values in each corner deviate heavily. This would indicate a loose belt on that corner.

If youa re using a printer which supports either `Z_TILT` or `QUAD_GANTRY_LEVEL` you will need to ensure that your probe is positioned above the bed when performing this, open up your `printer.cfg` and find the appropriate section, for example your QUAD\_GANTRY\_LEVEL section may look like this:

```yaml
[quad_gantry_level]
gantry_corners:
   -60,-10
   410,420
#  Probe points
points:
   50,25   # Point 1
   50,275  # Point 2
   300,275 # Point 3
   300,25  # Point 4
#--------------------------------------------------------------------

speed: 100
horizontal_move_z: 10
retries: 5
retry_tolerance: 0.0075
max_adjust: 10
```

You should in your console navigate to each point to ensure that your probe is not hanging off the edge, you can do this using a `G0` command such as `G0 X50 Y25` for point 1, or `G0 X50 Y275` for point 2.

If at all points, Cartographer is safely over the bed, you should be good to go for running a `QUAD_GANTRY_LEVEL` or `Z_TILT` .

You can now run a Bed Mesh Calibration (I would advise doing either a `Z_TILT` or `QUAD_GANTRY_LEVEL` before.

```gcode
BED_MESH_CALIBRATE
```

## Setting Z Offset

Before modifying your Z Offset, make sure that you have set your Z position to 0, to do this you can run the following command.

```
G1 Z0 F1500
```

Once you have done all of the above, it is worth re-calibrating the Z-Offset. This can be done in Mainsail or Fluidd using the graphical interface.\
\
OR you can use G-Code in the window to console to do so

```gcode
SET_GCODE_OFFSET Z_ADJUST=+0.01 MOVE=1
SET_GCODE_OFFSET Z_ADJUST=-0.01 MOVE=1
```

Once the offset has been perfectly calibrated apply that offset using the following command

```
Z_OFFSET_APPLY_PROBE
```

And now save your config.

{% hint style="warning" %}
If you are regularly changing your bed, please look at creating different models for your different beds, more information can be found [here](/original-plugin/fine-tuning/cartographer-models)
{% endhint %}


# Scan Based Calibration

Cartographer Calibration for Classic Mode

<mark style="color:purple;">Last Updated: December 7th 2024</mark>

{% hint style="warning" %}
Make sure `mode:` is set to <mark style="color:green;">**scan**</mark> in your printer.cfg prior to following this page OR use `PROBE_SWITCH MODE=scan` prior to following this guide.
{% endhint %}

Make sure you're in SCANmode

```gcode
PROBE_SWITCH MODE=scan
```

Then make sure you save

```gcode
SAVE_CONFIG
```

Home the machine in X and Y:

```gcode
G28 X Y
```

Position the nozzle in the center of the bed. You will need to adjust the coordinates for your machine.

```gcode
G0 X125 Y125
```

{% hint style="warning" %}
At this point, you might note that your Endstop Z is TRIGGERED, this is normal, and will be resolved once you run the next command.

<img src="/files/xKxKQlYabvZEqcoMscE3" alt="" data-size="original">
{% endhint %}

Start the calibration process:

{% hint style="info" %}
If you regularly print with a hot chamber (60oC+) it is worth calibrating with a hot chamber.
{% endhint %}

```gcode
CARTOGRAPHER_CALIBRATE
```

You can either use the web interface to adjust the nozzle height from the bed, or `TESTZ Z=-0.01` to lower it.\
\
Use a piece of paper or a feeler gauge to measure the offset. Once finished remove the paper/gauge and accept the position.

```gcode
ACCEPT
```

Save the results to your config file.

```gcode
SAVE_CONFIG
```

## Initial Tests

Home your printer.

```gcode
G28
```

You can test the accuracy.

```gcode
PROBE_ACCURACY
```

You can also measure the backlash of your Z axis

```gcode
CARTOGRAPHER_ESTIMATE_BACKLASH
```

To make use of the backlash estimation that is given. You will get results spit out starting with

```gcode
Median distance moving up
```

In this line will be a measurement called "delta" Take note of the value. Locate the configuration section marked:

```gcode
backlash_comp: 2.01
```

Update this section with your new estimated backlash compensation. It is a good idea to do this compensation test at all 4x corners of your build plate and then again at middle of build plate. If you are on a printer with belted Z and the values in each corner deviate heavily. This would indicate a loose belt on that corner.

If youa re using a printer which supports either `Z_TILT` or `QUAD_GANTRY_LEVEL` you will need to ensure that your probe is positioned above the bed when performing this, open up your `printer.cfg` and find the appropriate section, for example your QUAD\_GANTRY\_LEVEL section may look like this:

```django
[quad_gantry_level]
gantry_corners:
   -60,-10
   410,420
#  Probe points
points:
   50,25   # Point 1
   50,275  # Point 2
   300,275 # Point 3
   300,25  # Point 4
#--------------------------------------------------------------------

speed: 100
horizontal_move_z: 10
retries: 5
retry_tolerance: 0.0075
max_adjust: 10
```

You should in your console navigate to each point to ensure that your probe is not hanging off the edge, you can do this using a `G0` command such as `G0 X50 Y25` for point 1, or `G0 X50 Y275` for point 2.

If at all points, Cartographer is safely over the bed, you should be good to go for running a `QUAD_GANTRY_LEVEL` or `Z_TILT` .

You can now run a Bed Mesh Calibration (I would advise doing either a `Z_TILT` or `QUAD_GANTRY_LEVEL` before.

```gcode
BED_MESH_CALIBRATE
```

## Setting Z Offset

Before modifying your Z Offset, make sure that you have set your Z position to 0, to do this you can run the following command.

```gcode
G1 Z0 F1500
```

Once you have done all of the above, it is worth re-calibrating the Z-Offset. This can be done in Mainsail or Fluidd using the graphical interface.\
\
OR you can use G-Code in the window to console to do so

```gcode
SET_GCODE_OFFSET Z_ADJUST=+0.01 MOVE=1
SET_GCODE_OFFSET Z_ADJUST=-0.01 MOVE=1
```

Once the offset has been perfectly calibrated apply that offset using the following command

```gcode
Z_OFFSET_APPLY_PROBE
```

And now save your config.

{% hint style="warning" %}
If you are regularly changing your bed, please look at creating different models for your different beds, more information can be found [here](/original-plugin/fine-tuning/cartographer-models)
{% endhint %}


# Broken Katapult Bootloader

There are some Cartographer V3 ADXL probes that were shipped with a broken version of katapult. Unfortunately this means that when you go to update firmware via Katapult, the device wont be able to enter katapult mode for flashing.\
\
Fixing it is quite simple.

## Step 1. [Visit Here for the DFU flashing guide.](/original-plugin/firmware-archive/firmware-updating/via-dfu)

## Step 2. Once Flashed

If you chose FULL CANBUS, unplug the cable and plug Cartographer into your CANBUS cable.

If you chose FULL USB, unplug and re-plug into USB cable.

## Step 3. All Done

## Optional Step: Survey Touch

If you want to use **Survey Touch you will need to do some extra steps.**

* For USB, [Check out this guide on updating firmware to Survey Touch mode.](/original-plugin/firmware-archive/firmware-updating/via-katapult/usb-flash)
* For CANBUS, [Check out this guide on updating firmware to Survey Touch mode.](/original-plugin/firmware-archive/firmware-updating/via-katapult/canbus-flash)

### Katapult Bootloader will now be fixed for future flashing and DFU will not be required unless another issue arises with Katapult.


# Installation

{% hint style="info" %}
Note - since launch there have been a few different variations of the CNC mount, Original versions required M3\*8 BHCS to connect to the rail.
{% endhint %}

<figure><img src="/files/xU1XRTtXv3LuXhQwSEPk" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/zZXhVX8KMUkvgHbdhlUo" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Consider using loctite (or similar) to ensure that the bolt does not vibrate free.
{% endhint %}

### Installation Guide

<figure><img src="/files/bMsx91Z9ZApU7fMvmQ4s" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/Utz4WrPHY3xzFyClJTo1" alt=""><figcaption></figcaption></figure>

### Things to note

1. If you are using a UHF Hotend or any NON-STANDARD StealthBurner parts, you MAY have to use extenders on the probe to lower it down to the correct height (\~3mm above the bed).
2.


# Config

On a StealthBurner, you need to set your X and Y offset as follows in your Cartographer config

```yaml
[cartographer]
x_offset: 0 # = (your measured value)
y_offset: 21.1 # = (your measured value)
```


# Coming Soon

Coming 2028


# Software Configuration (Old Plugin)


# Klipper Setup

Klipper Setup for Touch Mode

<mark style="color:purple;">Last Updated: December 7th 2024</mark>

## Installation of the Cartographer Klipper Module

Clone the Klipper module from GitHub using the following commands, you then need to run our installation script.

```bash
cd ~
git clone https://github.com/Cartographer3D/cartographer-klipper.git
./cartographer-klipper/install.sh
```

This step will automatically create a link to the script and place it in the klipper/klippy/extra directory.

{% hint style="info" %}
If you are in Mainland China, use the following commands instead:

```bash
cd ~
git clone https://gitee.com/NBTP/cartographer-klipper.git
./cartographer-klipper/install.sh
```

{% endhint %}

### Remember to update cartographer via the mainsail/fluidd UI

{% hint style="warning" %}
Legacy Klipper environements running on Python2 will need updating to Python 3.9 or later. The easiest way to do that is a complete fresh install, though we do have a guide that can help that is linked [here](https://docs.cartographer3d.com/cartographer-probe/troubleshooting#klipper-environement-running-on-python-2)
{% endhint %}

## Managing Updates via Moonraker

In order to keep up to date with our latest Klipper software, please add the following config to the bottom of your `moonraker.conf` file.

```yaml
[update_manager cartographer]
type: git_repo
path: ~/cartographer-klipper
channel: stable
origin: https://github.com/Cartographer3D/cartographer-klipper.git
is_system_service: False
managed_services: klipper
info_tags:
  desc=Cartographer Probe
```

{% hint style="info" %}
**Are you from Mainland China?**\
\
Use this alternate moonraker.conf instead.

```yaml
[update_manager cartographer]
type: git_repo
path: ~/cartographer-klipper
channel: stable
origin: https://gitee.com/NBTP/cartographer-klipper.git
is_system_service: False
managed_services: klipper
info_tags:
  desc=Cartographer Probe (Gitee)
```

{% endhint %}

upon completion, press SAVE & RESTART and it should now display in the update section of either Mainsail or Fluidd.

<figure><img src="/files/tvd5qinaHHUMxDXGLqGe" alt=""><figcaption><p>Cartographer Software updates managed via Moonraker.</p></figcaption></figure>

If you get "Repo is dirty. Detected the following modified files: \['install.sh']", a soft Recovery should fix it.

<figure><img src="/files/bzdQ8NAWbZk0Oknct5sJ" alt=""><figcaption></figcaption></figure>

## Finding the Serial or UUID

Note, you need to replace the serial path or UUID with your probes serial path or UUID, this can be found by running the following commands

For USB based probes

```bash
ls /dev/serial/by-id/
```

For CAN based probes

{% hint style="info" %}
If you order a CAN Probe it will have it's baud rate set at 1,000,000. Make sure your system matches that.
{% endhint %}

```bash
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0
```

Take note of either the Serial ID or the UUID.


# Klipper Configuation

Klipper Configuration for Touch Mode

<mark style="color:purple;">Last Updated: December 11th 2024</mark>

{% hint style="warning" %}
We **DO NOT** 100% guarantee TOUCH compatibility with ALL printers. It is your responsibility to read this entire guide prior to use and to research whether this is right for you. Please contact us on [DISCORD ](https://discord.gg/yzazQMEGS2)if you have questions.
{% endhint %}

{% hint style="info" %}
If you're changing from classic to touch, make sure you remove or comment out \[cartographer] sections from your existing klipper configuration files.\
\
[A note about this can be found here.](/cartographer-probe/troubleshooting#command-mismatch)
{% endhint %}

For Cartographer to receive usable readings for touch to be accurate, you **MUST** place cartographer between <mark style="color:red;">**2.6 and 3mm ABOVE**</mark> the nozzle. Print or put something 2.5-2.6mm but no more than 3mm in height under or next to the cartographer coil to measure where it needs to be.

\
Your toolhead & gantry/carriage **MUST** be <mark style="color:red;">**RIGID**</mark>. If there is movement and flex it can also create undesired results in the touch process.

<pre class="language-yaml"><code class="lang-yaml">[mcu scanner]
canbus_uuid: 0ca8d67388c2 
<strong>#serial: /dev/serial/by-id/usb-cartographer_cartographer_
</strong>#    adjust to suit your scanner, if using usb change to serial

[scanner]
mcu: scanner            
#   Offsets are measured from the centre of your coil, to the tip of your nozzle 
#   on a level axis. It is vital that this is accurate. 
x_offset: 0                          
#    adjust for your cartographers offset from nozzle to middle of coil
y_offset: 15                         
#    adjust for your cartographers offset from nozzle to middle of coil
backlash_comp: 0.5
#   Backlash compensation distance for removing Z backlash before measuring
#   the sensor response.
sensor: cartographer
#    this must be set as cartographer unless using IDM etc.
sensor_alt: carto
#    alternate name to call commands. CARTO_TOUCH etc      
mesh_runs: 2
#    Number of passes to make during mesh scan.

[bed_mesh]
zero_reference_position: 125, 125    
#    set this to the middle of your bed
speed: 200
#    movement speed of toolhead during bed mesh
horizontal_move_z: 5
#    height of scanner during bed mesh scan
mesh_min: 35, 6
#    start point of bed mesh [X, Y]
mesh_max: 240, 198
#    end point of bed mesh [X, Y]
probe_count: 30, 30
algorithm: bicubic

[temperature_sensor Cartographer_MCU]
sensor_type: temperature_mcu
sensor_mcu: scanner
min_temp: 0
max_temp: 105

</code></pre>

{% hint style="warning" %}
NOTE - The \[scanner] section needs to be above any other reference to either cartographer/scanner or probe within your Klipper config, for this reason I advise adding it near the top of your config file.
{% endhint %}

If you want to use the probe for Input Shaper, please add the following to your config.

{% hint style="info" %}
By default the `[adxl345]` and `[lis2dw]` sections are commented out. This is so you don't encounter errors if you already have these sections in your config.\
\
You can add them and use them by switching them for existing sections however <mark style="color:red;">**DO NOT**</mark> combine them!
{% endhint %}

{% tabs %}
{% tab title="adxl345 based probes" %}

```yaml
#[adxl345]
#cs_pin: scanner:PA3
#spi_bus: spi1

#[resonance_tester]
#accel_chip: adxl345
#probe_points:
#    125, 125, 20
```

{% endtab %}

{% tab title="lis2dw based probes" %}

```yaml
#[lis2dw]
#cs_pin: scanner:PA3
#spi_bus: spi1

#[resonance_tester]
#accel_chip: lis2dw
#probe_points:
#    125, 125, 20
```

{% endtab %}
{% endtabs %}

You then need to remove, or comment out your `[probe]` section.

Now add a safe\_z\_home section with the following information.

```yaml
[safe_z_home]
home_xy_position: [your x-axis center coordinate], [your y-axis center coordinate]
# Example home_xy_position: 175,175 - This would be for a 350 * 350mm bed. 
z_hop: 10
```

You will also need to update your Z configuration settings, this will involve removing or commenting out your `position_endstop:` configuration. `Homing_retract_dist` must also be set to 0

{% hint style="info" %}
Don't get confused, "endstop\_pin" should contain probe and NOT cartographer/scanner.
{% endhint %}

```yaml
[stepper_z]
endstop_pin: probe:z_virtual_endstop # uses cartographer as virtual endstop
homing_retract_dist: 0 # cartographer needs this to be set to 0
#position_endstop: 5 # cartographer needs this to be commented out
```

{% hint style="danger" %}
You will now need to ensure that you update your Z-Tilt or QGL settings to ensure that Cartographer is over the bed when performing these actions. We will be checking these during the calibration phase.
{% endhint %}

Finally, you need to ensure you have a suitable `bed_mesh` section. Information can be found [here](https://www.klipper3d.org/Bed_Mesh.html)

{% hint style="warning" %}
It is vital you complete the Calibration steps, without doing so the probe will not work properly and is likely to show TRIGGERED.
{% endhint %}


# Calibration

Cartographer Calibration

<mark style="color:purple;">Last Updated: March 2, 2025</mark>

## Initial Calibration

{% hint style="info" %}
Calibration can be done <mark style="color:red;">HOT</mark> or <mark style="color:blue;">COLD.</mark>
{% endhint %}

***

{% hint style="danger" %}

### Touch Specific

If you want to use cartographer for auto z offset, you will need to follow any extra **TOUCH** specific instructions.

First, make sure you're in TOUCH mode

```gcode
PROBE_SWITCH MODE=touch
```

Then make sure you save

```gcode
SAVE_CONFIG
```

{% endhint %}

***

Home the machine in X and Y:

```gcode
G28 X Y
```

Position the nozzle in the center of the bed. You will need to adjust the coordinates for your machine.

```gcode
G0 X125 Y125
```

{% hint style="warning" %}
At this point, you might note that your Endstop Z is TRIGGERED, this is normal, and will be resolved once you run the next command.

<img src="/files/xKxKQlYabvZEqcoMscE3" alt="" data-size="original">
{% endhint %}

Start the calibration process:

```gcode
CARTOGRAPHER_CALIBRATE METHOD=manual
```

You can either use the web interface to adjust the nozzle height from the bed, or `TESTZ Z=-0.01` to lower it.\
\
Use a piece of paper or a feeler gauge to measure the offset. Once finished remove the paper/gauge and accept the position.

```gcode
ACCEPT
```

Save the results to your config file.

```gcode
SAVE_CONFIG
```

Home your printer.

```gcode
G28
```

You can test the accuracy of the scanner coil.

```gcode
PROBE_ACCURACY
```

{% hint style="warning" %}
This will not TOUCH the bed. It will use the scanner to measure the accuracy of the probe coil.
{% endhint %}

You can also measure the backlash of your Z axis

```gcode
CARTOGRAPHER_ESTIMATE_BACKLASH
```

To make use of the backlash estimation that is given. You will get results spit out starting with

```
Median distance moving up
```

In this line will be a measurement called "delta" Take note of the value. Locate the configuration section marked:

```gcode
backlash_comp: 2.01
```

Update this section with your new estimated backlash compensation. It is a good idea to do this compensation test at all 4x corners of your build plate and then again at middle of build plate. If you are on a printer with belted Z and the values in each corner deviate heavily compared to other corners results, this would indicate a loose belt on that corner.

If you are using a printer which supports either `Z_TILT` or `QUAD_GANTRY_LEVEL` you will need to ensure that your probe is positioned above the bed when performing this, open up your `printer.cfg` and find the appropriate section, for example your QUAD\_GANTRY\_LEVEL section may look like this:

```django
[quad_gantry_level]
gantry_corners:
   -60,-10
   410,420
#  Probe points
points:
   50,25   # Point 1
   50,275  # Point 2
   300,275 # Point 3
   300,25  # Point 4
#--------------------------------------------------------------------

speed: 100
horizontal_move_z: 10
retries: 5
retry_tolerance: 0.0075
max_adjust: 10
```

You should in your console navigate to each point to ensure that your probe is not hanging off the edge, you can do this using a `G0` command such as `G0 X50 Y25` for point 1, or `G0 X50 Y275` for point 2.

If at all points, Cartographer is safely over the bed, you should be good to go for running a `QUAD_GANTRY_LEVEL` or `Z_TILT` .

You can now run a Bed Mesh Calibration (I would advise doing either a `Z_TILT` or `QUAD_GANTRY_LEVEL` before.

```gcode
BED_MESH_CALIBRATE
```

***

### If you are <mark style="color:red;">NOT</mark> using TOUCH you should now [continue with this guide](/original-plugin/installation/first-print#scan-mode-first-print).

***

## Setting up Touch

Perform a homing.

```gcode
G28
```

If using a printer that requires Quad Gantry Level or Z Tilt Adjust, perform that.

```gcode
QUAD_GANTRY_LEVEL
```

or

```gcode
Z_TILT_ADJUST
```

Once that is finished, do another home or G28 Z

```gcode
G28 Z
```

Initiate a threshold scan. This will determine your threshold for cartographer. The threshold will determine how much force is required to touch your bed consistently.

Start by doing the generic scan

{% hint style="info" %}
[Visit here for an explanation of `CARTOGRAPHER_THRESHOLD_SCAN`](/original-plugin/settings-and-commands#cartographer_threshold_scan)
{% endhint %}

{% hint style="warning" %}
Prior to doing the threshold scan, please ensure that the following is true.

* Your nozzle is clean
* Your bed is clean, there are no dents or bubbles in the location you're probing.
* Your probe is between 2.6 and 3mm above the nozzle.
* Your kinematics are rigid.
  {% endhint %}

```gcode
CARTOGRAPHER_THRESHOLD_SCAN 
```

This should start a touch process that will move the toolhead into a starting position and then lower until it touches the bed, repeating itself. Its okay if at first it doesnt touch the bed at all, this is completely normal. It will eventually start touching.

{% hint style="info" %}
`CARTOGRAPHER_THRESHOLD_SCAN SPEED=2` is also available if the initial scan fails.
{% endhint %}

If however you get a final Optimal result and it didnt touch the bed, start the process again OR adjust the parameters as follows where MIN= the found threshold value of the false positive.

```gcode
CARTOGRAPHER_THRESHOLD_SCAN MIN=500 
```

Once it finds an optimal threshold and you've seen the nozzle touching the bed. It will stop this process.

{% hint style="info" %}
You can stop here but for most people, fine tuning can be beneficial. Re-run this command with the MIN value set slightly higher (+250) than the previous Optimal result and let it run again.
{% endhint %}

Now do a touch calibration with the new threshold.

```gcode
CARTOGRAPHER_CALIBRATE
```

If everything went correctly the touch test should pass and you can now finish by saving these variables to your config.

```gcode
SAVE_CONFIG                        
```


# Print Start Macro

{% hint style="danger" %}
This is <mark style="color:red;">**ONLY**</mark> required if using Touch Mode with your cartographer. <mark style="color:red;">**DO NOT**</mark> use this if you're using **SCAN** mode
{% endhint %}

Adding the `CARTOGRAPHER_TOUCH` command to your print start macro ensures that the printer performs a precise touch probe <mark style="color:red;">**AFTER**</mark> executing the `BED_MESH_CALIBRATE` command. `CARTOGRAPHER_TOUCH` should also be performed with a nozzle <mark style="color:red;">no hotter than 150c</mark>. With this in mind, the command will fail if the nozzle is beyond this temperature. It **CAN** be performed cold. Please make allowances for this in your print start. This sequence helps to achieve an accurate bed leveling by accounting for any variations or offsets after the mesh calibration.

{% hint style="warning" %}
It is not recommended to use a custom BED\_MESH\_CALIBRATE or ADAPTIVE MESH macro/plugin
{% endhint %}

```gcode
PLEASE DONT USE THIS - IT IS AN EXAMPLE ONLY
[gcode_macro PRINT_START_EXAMPLE]
gcode:
    G28                               ; Home all axes
    M140 S{BED_TEMP}                  ; Set bed temperature
    M109 S150                         ; Wait for extuder to reach 150°C (intermediate step)
    M190 S{BED_TEMP}                  ; Set final bed temperature
    G28 Z                             ; Home Z axis again to account for thermal expansion
    M112 #Remove this line            ; Its your own fault if you dont..
    QUAD_GANTRY_LEVEL / Z_TILT_ADJUST ; Perform quad gantry leveling or Z tilt adjustmen
    G28 Z                             ; Home Z axis again to account for thermal expansion
    BED_MESH_CALIBRATE                ; Calibrate the bed mesh
    CARTOGRAPHER_TOUCH                ; Perform touch probe
    M109 S{EXTRUDER_TEMP}             ; Wait for extruder to reach target temperature

PLEASE DONT USE THIS - IT IS AN EXAMPLE ONLY
```

## Need a Print Start macro?

The following is a modified version of [Jontek2's Better Print Start Macro](https://github.com/jontek2/A-better-print_start-macro) which incorporates Cartographer\_Touch commands for use with Voron printers and can be adapted for others.

```gcode
#####################################################################
#   A better print_start macro for v2/trident
#####################################################################

## *** THINGS TO UNCOMMENT: ***
## Bed mesh (2 lines at 2 locations)
## Nevermore (if you have one)
## Z_TILT_ADJUST (For Trident only)
## QUAD_GANTRY_LEVEL (For V2.4 only)

[gcode_macro PRINT_START]
gcode:
  # This part fetches data from your slicer. Such as bed, extruder, and chamber temps and size of your printer.
  {% set target_bed = params.BED|int %}
  {% set target_extruder = params.EXTRUDER|int %}
  {% set target_chamber = params.CHAMBER|default("45")|int %}
  {% set x_wait = printer.toolhead.axis_maximum.x|float / 2 %}
  {% set y_wait = printer.toolhead.axis_maximum.y|float / 2 %}

  SET_GCODE_OFFSET Z=0                                 # Set offset to 0

  # Home the printer, set absolute positioning and update the Stealthburner LEDs.
  STATUS_HOMING                                         # Set LEDs to homing-mode
  G28                                                   # Full home (XYZ)
  G90                                                   # Absolute position

  ##  Uncomment for bed mesh (1 of 2 for bed mesh)
  #BED_MESH_CLEAR                                       # Clear old saved bed mesh (if any)

  # Check if the bed temp is higher than 90c - if so then trigger a heatsoak.
  {% if params.BED|int > 90 %}
    SET_DISPLAY_TEXT MSG="Bed: {target_bed}c"           # Display info on display
    STATUS_HEATING                                      # Set LEDs to heating-mode
    M106 S255                                           # Turn on the PT-fan

    ##  Uncomment if you have a Nevermore.
    #SET_PIN PIN=nevermore VALUE=1                      # Turn on the nevermore

    G1 X{x_wait} Y{y_wait} Z15 F9000                    # Go to center of the bed
    M190 S{target_bed}                                  # Set the target temp for the bed
    SET_DISPLAY_TEXT MSG="Heatsoak: {target_chamber}c"  # Display info on display
    TEMPERATURE_WAIT SENSOR="temperature_sensor chamber" MINIMUM={target_chamber}   # Waits for chamber temp

  # If the bed temp is not over 90c, then skip the heatsoak and just heat up to set temp with a 5 min soak
  {% else %}
    SET_DISPLAY_TEXT MSG="Bed: {target_bed}c"           # Display info on display
    STATUS_HEATING                                      # Set LEDs to heating-mode
    G1 X{x_wait} Y{y_wait} Z15 F9000                    # Go to center of the bed
    M190 S{target_bed}                                  # Set the target temp for the bed
    SET_DISPLAY_TEXT MSG="Soak for 5 min"               # Display info on display
    G4 P300000                                          # Wait 5 min for the bedtemp to stabilize
  {% endif %}

  # Heat hotend to 150c. This helps with getting a correct Z-home.
  SET_DISPLAY_TEXT MSG="Hotend: 150c"                   # Display info on display
  M109 S150                                             # Heat hotend to 150c

  ##  Uncomment for Trident (Z_TILT_ADJUST)
  #SET_DISPLAY_TEXT MSG="Leveling"                      # Display info on display
  #STATUS_LEVELING                                      # Set LEDs to leveling-mode
  #Z_TILT_ADJUST                                        # Level the printer via Z_TILT_ADJUST
  #G28 Z                                                # Home Z again after Z_TILT_ADJUST

  ##  Uncomment for V2.4 (Quad gantry level AKA QGL)
  #SET_DISPLAY_TEXT MSG="Leveling"                      # Display info on display
  #STATUS_LEVELING                                      # Set LEDs to leveling-mode
  #QUAD_GANTRY_LEVEL                                    # Level the printer via QGL
  #G28 Z                                                # Home Z again after QGL

  ##  Uncomment for bed mesh (2 of 2 for bed mesh)
  SET_DISPLAY_TEXT MSG="Bed mesh"                      # Display info on display
  STATUS_MESHING                                       # Set LEDs to bed mesh-mode
  BED_MESH_CALIBRATE                                   # Start the bed mesh (add ADAPTIVE=1) for adaptive bed mesh

  CARTOGRAPHER_TOUCH                                    # Calibrate z offset only with hot nozzle

  # Heat up the hotend up to target via data from slicer
  SET_DISPLAY_TEXT MSG="Hotend: {target_extruder}c"     # Display info on display
  STATUS_HEATING                                        # Set LEDs to heating-mode
  G1 X{x_wait} Y{y_wait} Z15 F9000                      # Go to center of the bed
  M107                                                  # Turn off partcooling fan
  M109 S{target_extruder}                               # Heat the hotend to set temp

  # Get ready to print by doing a primeline and updating the LEDs
  SET_DISPLAY_TEXT MSG="Printer goes brr"               # Display info on display
  STATUS_PRINTING                                       # Set LEDs to printing-mode
  G0 X{x_wait - 50} Y4 F10000                           # Go to starting point
  G0 Z0.4                                               # Raise Z to 0.4
  G91                                                   # Incremental positioning 
  G1 X100 E20 F1000                                     # Primeline
  G90                                                   # Absolute position
```


# First Print

<mark style="color:purple;">Last Updated: December 7th 2024</mark>

{% hint style="danger" %}
For SCAN based instructions, [see below.](#scan-mode-first-print)
{% endhint %}

## Touch Mode First Print

You might notice your z-offset is a little wrong, this is hugely dependent on too many things, however its simple to fix. Just use the video below as an example.\
\
`scanner_touch_z_offset` is the distance between nozzle and bed after a `CARTOGRAPHER_TOUCH`

Default `scanner_touch_z_offset` is 0.05

{% embed url="<https://youtu.be/OoZ2fcD3zlA>" %}
video courtesy of Yell on Cartographer Discord
{% endembed %}

***

## Scan Mode First Print

Tweaking the Z offset is done slightly differently with Cartographer compared to using a standard probe, for example, with Cartographer you can't use \`PROBE\_CALIBRATE\` to fine tune the offset, as that will reset the 0 point, so you need to tweak it manually.

#### Klipper Screen <a href="#klipper-screen" id="klipper-screen"></a>

Unfortunatly, due to the way Cartographer works, we advise against doing this via Klipper Screen, as we have seen some sporadic outputs.

#### Mainsail <a href="#mainsail" id="mainsail"></a>

If you are using more than just the `default` cartographer model, you will have to load which ever model you want to make the adjustment too, you do this using the following command, replacing the NAME=hot, with what ever model you are selecting i.e. NAME=sparklybed

`CARTOGRAPHER_MODEL_SELECT NAME=hot`

You can adjust your Z Offset in Mainsail using the Z-Offset section of the Toolhead pane.

![](https://docs.cartographer3d.com/~gitbook/image?url=https%3A%2F%2F3044346320-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FjpCp1KnR8izt0cnWQfZF%252Fuploads%252FLfCgSpSNOdMFzaBFkGg8%252Fimage.png%3Falt%3Dmedia%26token%3D942394ea-51a7-418f-a0e6-fb0e82d9f287\&width=768\&dpr=4\&quality=100\&sign=d9492914\&sv=2)

after making the neccessary adjustments press the `SAVE` button

![](https://docs.cartographer3d.com/~gitbook/image?url=https%3A%2F%2F3044346320-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FjpCp1KnR8izt0cnWQfZF%252Fuploads%252FWKl1xE9jQ8TfH4Zjx9zx%252Fimage.png%3Falt%3Dmedia%26token%3D4e3a3323-1379-448a-a989-67c94c5177bd\&width=768\&dpr=4\&quality=100\&sign=346d8dc2\&sv=2)

And then press `SAVE CONFIG`

![](https://docs.cartographer3d.com/~gitbook/image?url=https%3A%2F%2F3044346320-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FjpCp1KnR8izt0cnWQfZF%252Fuploads%252FN2OA0cBYSieQwR9NlHpU%252Fimage.png%3Falt%3Dmedia%26token%3Df093ff3c-53cb-43aa-8c50-ce51a91449f2\&width=768\&dpr=4\&quality=100\&sign=83a6205e\&sv=2)

Once complete, your Z offset change should be evident under model\_offset: under the specific model which was loaded. NOTE - You will have to adjust the offset for each model you use.

## Setting Z Offset

Before modifying your Z Offset, make sure that you have set your Z position to 0, to do this you can run the following command.

```gcode
G1 Z0 F1500
```

Once you have done all of the above, it is worth re-calibrating the Z-Offset. This can be done in Mainsail or Fluidd using the graphical interface.\
\
OR you can use G-Code in the window to console to do so

```gcode
SET_GCODE_OFFSET Z_ADJUST=+0.01 MOVE=1
SET_GCODE_OFFSET Z_ADJUST=-0.01 MOVE=1
```

Once the offset has been perfectly calibrated apply that offset using the following command

```gcode
Z_OFFSET_APPLY_PROBE
```

And now save your config.

{% hint style="success" %}
This is the end of the setup and calibration process.
{% endhint %}


# Migrating from Cartographer to Scanner

If you've been using **\[cartographer]** its time to update to **\[scanner]**

### Moonraker.conf Changes

```yaml
[update_manager cartographer]
type: git_repo
path: ~/cartographer-klipper
channel: stable
origin: https://github.com/Cartographer3D/cartographer-klipper.git
is_system_service: False
managed_services: klipper
info_tags:
  desc=Cartographer Probe
```

### Printer.cfg Changes

1. The **\[cartographer]** section needs to be renamed to **\[scanner]**
2. The following lines need to be added under \[scanner]

```yaml
sensor: cartographer
#    this must be set as cartographer unless using IDM etc.
sensor_alt: carto
#    alternate name to call commands. CARTO_TOUCH etc  
```

3. Update your \[adxl345] or \[lis2dw] sections

```yaml
[adxl345]
cs_pin: scanner:PA3
spi_bus: spi1

OR

[lis2dw]
cs_pin: scanner:PA3
spi_bus: spi1
```

4. Add to your existing \[bed\_mesh] section

```yaml
[bed_mesh]
zero_reference_position: 125, 125 # center of your bed
```

5. Remove the following macro

```yaml
[gcode_macro PROBE_CALIBRATE]
gcode:
    CARTOGRAPHER_CALIBRATE
```

6. Scroll down to the SAVE\_CONFIG portion of printer.cfg and remove the following

{% hint style="danger" %}
MAKE SURE YOU LEAVE NO BLANK/EMPTY LINES

Empty lines should contain nothing other than #\*#
{% endhint %}

```markup
#*# [cartographer model default]
#*# model_coef = 1.2756087614398297,
#*# 	1.7032235919205718,
#*# 	0.7549615279585394,
#*# 	0.33053182696977934,
#*# 	0.49230277115342924,
#*# 	0.603864368037255,
#*# 	-0.4286306328139887,
#*# 	-0.6071391058450671,
#*# 	0.4556606647261048,
#*# 	0.4209032930645854
#*# model_domain = 3.1397176509462183e-07,3.3604013404235566e-07
#*# model_range = 0.100000,5.000000
#*# model_temp = 23.255185
#*# model_offset = 0.00000
```

### What else?

1. Run the following script via SSH

```bash
cd ~/cartographer-klipper
./install.sh
```

2. Update your firmware to 5.0.0 or higher, using one of the [firmware updating guides found here](/original-plugin/firmware-archive/firmware-updating)
3. Restart klipper by entering the following code via SSH

```bash
sudo service klipper restart
```

## All done!

## Now just follow either the [TOUCH](/original-plugin/installation/calibration) or [SCAN ](/cartographer-probe/archive/scan-based-calibration)guides on re-calibrating.


# Fine Tuning (Old Plugin)

This section covers three different methods for calibrating or fine tuning your printer with Cartographer - SCAN MODE.

* [Setting models for different beds / temperatures](/original-plugin/fine-tuning/cartographer-models)
* [Temperature differential calibration](/original-plugin/fine-tuning/temperature-differential-calibration-beta)
* [Useful macros](/original-plugin/fine-tuning/useful-macros)


# Cartographer Models

{% hint style="info" %}
Models are not required if you are using Cartographer Survey Touch.
{% endhint %}

### Why use models??

There are many different reasons to why you would want to use different models with your probe, these vary from person to person, but they could be as follows:

* Using different print surfaces, such as different PEI / Spring Steel sheets
* Printing at a wide range of temperatures or materials

Cartographer models can help manage this, allowing you to essentially have different offsets and different profiles for the different temperatures and build surfaces that you print on.

### Using the `default` model.

When performing a calibration with the `CARTOGRAPHER_CALIBRATE` command a model is created called `default`. This will be saved to your printer.cfg after you compelte a `SAVE_CONFIG`, this could either be via running the command or performing a save and restart from your webUI.

The `default` model will be loaded automatically when your machine turns on.

### Available Commands

* **Viewing Available Models** - `CARTOGRAPHER_MODEL_LIST` - Shows your available models, it also indicates which model is active.\
  \
  Example:

```gcode
$ CARTOGRAPHER_MODEL_LIST
// List of loaded CARTOGRAPHER models:
// - default [active]
// - hot
// - cold
// - fysetcpei-hot
// - fysetcpei-cold
```

* **Changing Active Model** - `CARTOGRAPHER_MODEL_SELECT NAME=model` - This command will select and load the model with the name you have selected.\
  \
  Example:

```gcode
$ CARTOGRAPHER_MODEL_SELECT NAME=hot 
// Selected CARTOGRAPHER model 'hot'
```

* **Saving New Models** - `CARTOGRAPHER_MODEL_SAVE NAME=model` - command can save the current active model as a new model. This will overwrite any existing model with that given name.\
  \
  You must perform a `SAVE_CONFIG` in order to commit the changes to the config file.\
  \
  Example:

```gcode
CARTOGRAPHER_MODEL_SAVE NAME=fysetc-pei-cold
// Cartographer calibration for model 'fysetc-pei-cold' has been updated
// for the current session. The SAVE_CONFIG command will
// update the printer config file and restart the printer
```

* **Deleting Models** - `CARTOGRAPHER_MODEL_REMOVE NAME=model` command will delete the cartographer model with `model` as the name from your config file.\
  \
  You must perform a `SAVE_CONFIG` in order to commit the changes to the config file.\
  \
  Example:

```gcode
$ CARTOGRAPHER_MODEL_REMOVE NAME=hot
// Model 'hot' was removed for the current session.
// Run SAVE_CONFIG to update the printer configurationand restart Klipper.
```


# Temperature Differential Calibration

{% hint style="info" %}
Note - This is not needed if you are using Cartographer Survey Touch!
{% endhint %}

{% hint style="info" %}
This requires Cartographer v1.0.0-17-g944c62e9 or later.
{% endhint %}

{% hint style="danger" %}
After doing any form of Temperature Calirbation, it is essential you re-complete the `CARTOGRAPHER_CALIBRATION` on EVERY model.\
\
IF YOU DO NOT DO THIS, YOU MIGHT DO DAMAGE TO YOUR PRINT SURFACE.
{% endhint %}

This tutorial aims to optimize the temperature compensation parameters and reduce the temperature drift, which takes a long time (sometimes more than 3 hours) to carry out this optimization.

### Update your printer config file in Klipper.

Modify your printer.cfg, adding the following macro. This should be added to the bottom of your printer.cfg file.

{% hint style="info" %}
This Macro will take your bed up to 110oC, if your printers bed is not capable of that temperature, please lower the M140 commands to a safe temperature for you.\
\
M140 S110 = 110oC\
M140 S95 = 95oC
{% endhint %}

{% code fullWidth="true" %}

```gcode
[gcode_macro DATA_SAMPLE]
gcode:
  {% set bed_temp = params.BED_TEMP|default(90)|int %}
  {% set nozzle_temp = params.NOZZLE_TEMP|default(250)|int %}
  {% set min_temp = params.MIN_TEMP|default(40)|int %}
  {% set max_temp = params.MAX_TEMP|default(70)|int %}
  G90
  M106 S255
  RESPOND TYPE=command MSG='Waiting for Coil to cool to 40'
  M117 Waiting for Coil to cool to 40
  TEMPERATURE_WAIT SENSOR='temperature_sensor cartographer_coil' MAXIMUM={min_temp}
  RESPOND TYPE=command MSG='Starting Phase 1 of 4'
  M117 Starting Phase 1 of 4
  M106 S0
  G28
  G0 Z1
  M104 S{nozzle_temp}
  M140 S{bed_temp}
  G4 P1000
  TEMPERATURE_WAIT SENSOR='temperature_sensor cartographer_coil' MINIMUM={min_temp}
  CARTOGRAPHER_STREAM FILENAME=data1
  M117 Waiting for Coil to heat to 70
  RESPOND TYPE=command MSG='Waiting for Coil to heat to 70'
  TEMPERATURE_WAIT SENSOR='temperature_sensor cartographer_coil' MINIMUM={max_temp}
  CARTOGRAPHER_STREAM FILENAME=data1
  M104 S0
  M140 S0
  M106 S255
  G0 Z80
  RESPOND TYPE=command MSG='Waiting for Coil to cool to 40'
  M117 Waiting for Coil to cool to 40
  TEMPERATURE_WAIT SENSOR='temperature_sensor cartographer_coil' MAXIMUM={min_temp}
  M117 Starting Phase 2 of 4
  RESPOND TYPE=command MSG='Starting Phase 2 of 4'
  M106 S0
  G28 Z0
  G0 Z2
  M104 S{nozzle_temp}
  M140 S{bed_temp}
  G4 P1000
  CARTOGRAPHER_STREAM FILENAME=data2
  M117 Waiting for Coil to heat to 70
  RESPOND TYPE=command MSG='Waiting for Coil to heat to 70'
  TEMPERATURE_WAIT SENSOR='temperature_sensor cartographer_coil' MINIMUM={max_temp}
  CARTOGRAPHER_STREAM FILENAME=data2
  M104 S0
  M140 S0
  M106 S255
  G0 Z80
  RESPOND TYPE=command MSG='Waiting for Coil to cool to 40'
  M117 Waiting for Coil to cool to 40
  TEMPERATURE_WAIT SENSOR='temperature_sensor cartographer_coil' MAXIMUM={min_temp}
  M117 "Starting Phase 3 of 4"
  RESPOND TYPE=command MSG='Starting Phase 3 of 4'
  M106 S0
  G28 Z0
  G0 Z3
  M104 S{nozzle_temp}
  M140 S{bed_temp}
  G4 P1000
  CARTOGRAPHER_STREAM FILENAME=data3
  M117 Waiting for Coil to heat to 70
  RESPOND TYPE=command MSG='Waiting for Coil to heat to 70'
  TEMPERATURE_WAIT SENSOR='temperature_sensor cartographer_coil' MINIMUM={max_temp}
  CARTOGRAPHER_STREAM FILENAME=data3
  M104 S0
  M140 S0
  RESPOND TYPE=command MSG='Testing complete, please move files using: mv ~/klipper/data1 ~/klipper/data2 ~/klipper/data3 ~/cartographer-klipper/'
  M117 "Testing complete, please move files using: mv ~/klipper/data1 ~/klipper/data2 ~/klipper/data3 ~/cartographer-klipper/"
  RESPOND TYPE=command MSG='Follow the remaining instructions here: https://docs.cartographer3d.com/cartographer-probe/advanced-features/temperature-differential-calibration-beta'
  M117 "Follow the remaining instructions here: https://docs.cartographer3d.com/cartographer-probe/advanced-features/temperature-differential-calibration-beta"
```

{% endcode %}

The macro is then executed, and then the data1, data2, and data3 files are generated in the Klipper folder, note, this can take a very long time.

Once complete, move the files (data1, data2, data3) to your cartographer-klipper folder.

<pre class="language-bash" data-full-width="true"><code class="lang-bash"><strong>mv ~/klipper/data1 ~/klipper/data2 ~/klipper/data3 ~/cartographer-klipper/
</strong></code></pre>

If you are using Cartographer Survey, the default location the macro saves to has change, use this command

{% code fullWidth="true" %}

```
mv /tmp/data1 /tmp/data2 /tmp/data3 ~/cartographer-klipper/
```

{% endcode %}

You will need to ensure your host OS has the libraries and dependancies in it.

{% code fullWidth="true" %}

```bash
~/klippy-env/bin/pip install pandas
~/klippy-env/bin/pip install matplotlib
sudo apt-get install libopenblas-dev
~/klippy-env/bin/pip install -v numpy
~/klippy-env/bin/pip install scipy
```

{% endcode %}

Once installed, run the following script, this will analyse the data from the files that you have moved. You need to ensure that you are on the latest version of our firmware, if you get an error about file not existing, go to our Klipper Setup page and re-run that initial script.

{% code fullWidth="true" %}

```bash
cd ~/cartographer-klipper
~/klippy-env/bin/python tempcalib.py
```

{% endcode %}

After running, four parameters will be generated and a picture will be generated in your bash window and a image in your `cartographer-klipper` folder.

(This process is very computationally intensive and takes a while, if the files are too big it may fail) Please check the picture named fit\_output.png and judge the fitting effect. The picture example is as follows:

<figure><img src="/files/2DL2ta24ESe02fPnoDfb" alt=""><figcaption><p>Example 1</p></figcaption></figure>

<figure><img src="/files/y2bxaQVgUWfb8u5i3why" alt=""><figcaption><p>Example 2</p></figcaption></figure>

Once complete, it will generate an image called fit.png as well as show some values in your terminal window.

{% code fullWidth="true" %}

```
tc_a_a:5.367848131964879e-06
tc_a_b:1.7559290784042338
tc_b_a:0.0007546669217813525
tc_b_b:-343.290029518937
```

{% endcode %}

Copy the results at the end of the `[cartographer]` section of your config,

**Example below**

{% code fullWidth="true" %}

```yaml
[cartographer]
serial:
    canbus_uuid: 39df93ji34
speed: 40.
#   Z probing dive speed.
lift_speed: 5.
#   Z probing lift speed.

#   REST OF THE CONFIG REMOVED TO MAKE THIS LESS CLUNKY.

#   End of config section. 
tc_a_a:5.367848131964879e-06
tc_a_b:1.7559290784042338
tc_b_a:0.0007546669217813525
tc_b_b:-343.290029518937
```

{% endcode %}

Once added, save and restart your config.

You will now have to re-calibrate your probe, to do this

{% code fullWidth="true" %}

```
CARTOGRAPHER_CALIBRATE    
```

{% endcode %}

Once compelete, SAVE & RESTART your config.

{% hint style="danger" %}
After doing any form of Temperature Calirbation, it is essential you re-complete the `CARTOGRAPHER_CALIBRATION` on EVERY model.\
\
IF YOU DO NOT DO THIS, YOU MIGHT DO DAMAGE TO YOUR PRINT SURFACE.
{% endhint %}


# Useful Macros

This page features some community suggested useful macros that work well with the Cartographer probe.

### Bed mesh without Heater

If you have problems with interference in your bed mesh scans, add this macro, it will turn off the heater while you're scanning.

```gcode
[gcode_macro BED_MESH_CALIBRATE]
rename_existing: _BED_MESH_CALIBRATE
gcode:
    {% set TARGET_TEMP = printer.heater_bed.target %}
    M140 S0
    _BED_MESH_CALIBRATE {rawparams}
    M140 S{TARGET_TEMP}
```


# Extras

<details>

<summary>Adjust Z Offset based on Bed Type (OrcaSlicer)</summary>

<img src="/files/SaXPko0zx08Y4xUfiY9Z" alt="" data-size="original"> <img src="/files/LYwxADaX9sTo4Z5HpYHD" alt="" data-size="original">

In your Machine start G-Code modify your PRINT\_START macro to be similar to this based on your personal needs. The main one to worry about <mark style="color:green;">ADDING</mark> is `BED_TYPE="[curr_bed_type]"`

```gcode
START_PRINT EXTRUDER_TEMP=[nozzle_temperature_initial_layer] BED_TEMP=[bed_temperature_initial_layer_single] CHAMBER_TEMP=[chamber_temperature] FILAMENT_TYPE=[filament_type] BED_TYPE="[curr_bed_type]"
```

This will pass which bed type your using to use in the modified PRINT\_START macro below

<mark style="color:red;">THE FOLLOWING GOES LAST IN YOUR PRINT\_START MACRO</mark>

```gcode
{% if params.BED_TYPE == "Cool Plate" %}
  SET_GCODE_OFFSET Z_ADJUST=0.00
{% endif %}
{% if params.BED_TYPE == "Engineering Plate" %}
  SET_GCODE_OFFSET Z_ADJUST=0.00
{% endif %}
{% if params.BED_TYPE == "High Temp Plate" %}
  SET_GCODE_OFFSET Z_ADJUST=0.00
{% endif %}
{% if params.BED_TYPE == "Textured PEI Plate" %}
  SET_GCODE_OFFSET Z_ADJUST=0.00
{% endif %}
```

</details>

<details>

<summary>Adjusting Z Offset via Slicer</summary>

Finding you need additional or less z-offset on a per filament basis? Go into your slicer and find the Filament settings page. You will be able to add the custom g-code below that will run after your PRINT\_START macro giving this option!

```gcode
SET_GCODE_OFFSET Z_ADJUST=0.01
```

You could also set up duplicate filament settings and use them for different bed types to send a different offset depending on which bed your using and use that filament profile to slice!

### SuperSlicer - Per Filament

<img src="/files/7ZDyFiq4s2Kejsr8hKZT" alt="" data-size="original">

### OrcaSlicer - Per Filament

<img src="/files/wk03vyEeAFYSoLer7Mdd" alt="" data-size="original">

### What does it do?

It will add an modify the z-offset based on your filaments custom z-offset gcode, giving you either MORE or LESS squish based on filament settings.

<img src="/files/hTfZulz6r5UvpZP1HKSM" alt="" data-size="original">

</details>


# Settings & Commands (Old Plugin)

<mark style="color:purple;">Last Updated: December 7th 2024</mark>

## Available Commands

### `PROBE_SWITCH`

Using this allows you to easily swap between SCAN and TOUCH modes. You will be prompted to `SAVE_CONFIG`upon completing this command.

<details>

<summary><strong>Available Parameters</strong></summary>

#### MODE **`=`**

* Sets which mode you'd like to use.
* **Default**: scan
* **Constraints**: Can only use either \`scan\` or \`touch\`

</details>

### `CARTOGRAPHER_CALIBRATE`

This commands for both TOUCH and SCAN modes. Users dont need to explicitly set which mode as it will be defined by `mode`under your printer.cfg `[scanner]`OR if default, will be scan mode.

#### SCAN MODE

Will prompt users to do the paper method of lowering the nozzle to the bed, before calibration

#### TOUCH MODE

This will initiate touch mode calibration and should only be for re-calibrating not initial setup.

<details>

<summary>Available Parameters</summary>

#### **`METHOD = MANUAL`**

* Initiates the manual paper test for creating an initial scanner mode.

#### **`SPEED =`**

* Specifies the speed at which the probing move is executed.
* **Default**: 3
* **Constraints**: Cannot exceed 5.

#### **`ACCEL =`**

* Sets the acceleration used during the touch operation.
* **Default**: 100
* **Constraints**: Must be greater than or equal to 100.

#### **`RETRACT =`**

* Determines the distance the toolhead retracts after a probe.
* **Default**: 2
* **Constraints**: Must be at least 1.

#### **`RETRACT_SPEED =`**

* Sets the speed for the retraction move after probin&#x67;**.**
* **Default:** 10
* **Constraints:** Must be at least 1.

#### **`SAMPLES =`**

* Defines the number of samples to take during the touch operation.
* **Default**: 3
* **Constraints**: Must be at least 1.

#### **`TOLERANCE =`**

* Sets the tolerance level for the touch samples.
* **Default**: 0.01
* **Constraints**: Must be above 0.0

#### **`RETRIES =`**

* Specifies the maximum number of retries allowed if samples exceed the tolerance.
* **Default**: 10
* **Constraints**: Must be at least 0.

#### **`THRESHOLD =`**

* Defines the threshold value used for detecting a touch during probing.
* **Default**: 2500 or scanner\_touch\_threshold in printer.cfg
* **Constraints**: Must be at least 100; can be found via `CARTOGRAPHER_THRESHOLD_SCAN`

#### **`DEBUG = 1`**

* Enables or disables debug mode, which controls the verbosity of logging and information output during the touch operation.
* **Default**: 0 (debugging off)
* **Constraints**: 0 if off, 1 is on.
* This will enabled debugging information. Its useful for showing information relevant to how touch height is calculated. If you encounter issues, this is what you should provide in discord alongside klippy.log

</details>

### `CARTOGRAPHER_TOUCH`

The `CARTOGRAPHER_TOUCH` command is designed to initiate a probing process. This will then attempt to bring the nozzle to the bed and measure this for repeatability. This ensures a perfect first layer if configured correctly.

<details>

<summary>Detailed Explanation</summary>

**Key Functions:**

* **Configuration and Initialization:**
  * The command starts by pulling various parameters either from the command itself, or falling back on default values defined in the printer's configuration (printer.cfg).
  * Parameters include speed, acceleration, retraction distances, number of samples, tolerance levels, and the specific location (X and Y coordinates) where the probing will occur.
* **Mode Selection:**
  * The command operates in **Touch Mode**, which uses a physical touch sensor to detect contact with the surface.
  * The mode is determined by the `mode` configuration in **printer.cfg**, and the command ensures that touch mode is selected.
* **Safety and Validation Checks:**
  * Before proceeding, the command ensures that the X and Y axes are homed (i.e., the machine knows their precise positions).
  * If the axes are not homed, the command raises an error, preventing the probing process from proceeding.
* **Probing Process:**
  * The toolhead is moved to the specified touch location (X, Y coordinates).
  * The probing process begins, collecting multiple samples to determine the exact position.
  * The process accounts for factors such as acceleration, speed, retraction distance, and retries if the tolerance levels are not met.
  * If the `manual` method is specified, a manual calibration process (paper test) is initiated instead of the automated touch process.
* **Result Handling:**
  * Once the probing process is completed, the results (e.g., final position, standard deviation of the samples) are logged and displayed.
  * If the probing is successful, the results are used to calibrate the system, adjusting the Z-offset or other calibration parameters as needed.
  * If the probing fails, an error message is provided, and no calibration is applied.
* **Logging and Debugging:**
  * The command supports a debug mode that logs detailed information about the probing process, including all the parameters used and the results obtained.
  * This is useful for troubleshooting and ensuring the probing process is functioning correctly.

#### Use Cases:

* **Bed Leveling:** Ensures that the print bed is perfectly level by detecting any variations in height across different points on the bed.
* **Z-Offset Calibration:** Adjusts the Z-axis offset to ensure the nozzle is at the correct distance from the print bed for optimal printing.
* **Probing Accuracy:** Verifies the precision and repeatability of the probing process, ensuring consistent results.

</details>

<details>

<summary>Available Parameters</summary>

#### `SPEED =`

* Specifies the speed at which the probing move is executed.
* **Default**: 3
* **Constraints**: Cannot exceed 5.

#### `ACCEL =`

* Sets the acceleration used during the touch operation.
* **Default**: 100
* **Constraints**: Must be greater than or equal to 100.

#### `RETRACT =`

* Determines the distance the toolhead retracts after a probe.
* **Default**: 2
* **Constraints**: Must be at least 1.

#### `RETRACT_SPEED =`

* Sets the speed for the retraction move after probin&#x67;**.**
* **Default:** 10
* **Constraints:** Must be at least 1.

#### `SAMPLES =`

* Defines the number of samples to take during the touch operation.
* **Default**: 3
* **Constraints**: Must be at least 1.

#### `TOLERANCE =`

* Sets the tolerance level for the touch samples.
* **Default**: 0.01
* **Constraints**: Must be above 0.0.

#### `RETRIES =`

* Specifies the maximum number of retries allowed if samples exceed the tolerance.
* **Default**: 3
* **Constraints**: Must be at least 0.

#### `FUZZY =`

* Specifies the value that will be used to create a bounding box for touch movements to move around in if attempting multiple touches. A value inside this box will be randomly selected so you don't keep touching the same location.
* **Default Value**: 0
* **Constraints**: MAX is 10

#### `THRESHOLD =`

* Defines the threshold value used for detecting a touch during probing.
* **Default**: 2500 or <mark style="color:green;">scanner\_touch\_threshold</mark> in <mark style="color:red;">printer.cfg</mark>
* **Constraints**: Must be at least 100; can be found via `CARTOGRAPHER_THRESHOLD_SCAN`

#### `DEBUG = 1`

* Enables or disables debug mode, which controls the verbosity of logging and information output during the touch operation.
* **Default**: 0 (debugging off)
* **Constraints**: 0 if off, 1 is on.
* This will enabled debugging information. Its useful for showing information relevant to how touch height is calculated. If you encounter issues, this is what you should provide in discord alongside <mark style="color:red;">klippy.log</mark>

</details>

***

### `CARTOGRAPHER_THRESHOLD_SCAN`

The `CARTOGRAPHER_THRESHOLD_SCAN` command is used to scan a range of threshold values to find the most consistent and reliable threshold for the touch sensor. This function performs a series of probe tests across different threshold values, evaluating the consistency of each threshold until it finds the best one that meets the specified criteria.

<details>

<summary>Detailed Explanation</summary>

**Process**

1. **Threshold Scanning**
   * The scan starts by setting the trigger method to touch and initializing the current threshold to the minimum value (`MIN`).
   * The function then enters a loop where it tests each threshold value, increasing by the step size (`STEP`) until the maximum threshold (`MAX`) is reached.
2. **Threshold Qualification**
   * For each threshold value, a series of probe tests (`QUALIFY_SAMPLES`) are conducted.
   * The results are evaluated to see if they meet the acceptable range value.
3. **Threshold Verification**
   * If a threshold value shows promising consistency during qualification, it is further verified with an additional set of probe tests (`VERIFY_SAMPLES`).
   * The threshold is evaluated for quality based on the consistency of the results.
4. **Finalization**
   * If a threshold value is found that meets or exceeds the target consistency, it is considered the best threshold.
   * If this threshold is different from the original, it is saved for future use.
5. **Logging Results**
   * Throughout the process, the function logs information about the testing of each threshold, including whether it passed qualification and verification.
   * At the end of the scan, the best threshold value is logged along with its quality level and range.

</details>

<details>

<summary>Available Parameters</summary>

#### **`MIN =`**

* Purpose: Defines the minimum threshold value for starting the scan.
* **Default:** 500
* **Constraints:** Must be atleast 100 and less than MAX.

#### **`MAX =`**

* Defines the maximum threshold value for ending the scan.
* **Default:** 5000
* **Constraints:** Must be greater than MIN.

#### **`STEP =`**

* Specifies the increment by which the threshold is increased during the scan.
* **Default:** 250
* **Constraints:** Must be a positive number.

#### **`SKIP =`**

* Indicates the number of initial samples to skip when evaluating thresholds.
* **Default:** 1
* **Constraints:** Must be a positive number.

#### **`QUALIFY_SAMPLES =`**

* The number of samples used to initially qualify a threshold.
* **Default:** 5
* **Constraints:** Must be greater than or equal to SKIP.

#### **`VERIFY_SAMPLES =`**

* The number of samples used to verify a threshold that shows promise during qualification.
* **Default:** 5
* **Constraints:** Must be a positive number.

#### **`TOLERANCE =`**

* Sets the tolerance level for the touch samples.
* **Default**: 0.01
* **Constraints**: Must be above 0.0.

</details>

***

## Available Printer.cfg Settings

{% hint style="info" %}
These shouldn't be needed to changed, however they are available.
{% endhint %}

<details>

<summary>Available Settings</summary>

* **sensor**
  * Default: cartographer
* **sensor\_alt**
  * Default: carto
* **speed**
  * Default: 5.0
  * Constraint: above 0.0
* **lift\_speed**
  * Default: Value of `speed`
  * Constraint: above 0.0
* **backlash\_comp**
  * Backlash compensation distance for removing Z backlash before measuring the sensor response.

    Offsets are measured from the centre of your coil, to the tip of your nozzle on a level axis. It is vital that this is accurate.
  * **Default:** 0.5
* **mesh\_runs:**
  * Number of passes to make during mesh scan.
  * **Default:** 1
  * **Constraint:** Must be above 0.
* **mesh\_main\_direction**
  * Primary direction of travel while running a bed mesh
  * **Default:** x
  * **Constraint:** X or Y
* **probe\_speed**
  * Default: 5.0
* **samples**
  * Default: 5
  * Constraint: above 0.0
* **samples\_retract\_dist**
  * Default: 5.0
  * Constraint: above 0.0
* **samples\_tolerance**
  * Default: 0.2
  * Constraint: min 0.0
* **samples\_tolerance\_retries**
  * Default: 4
  * Constraint: min 0
* **samples\_result**
  * Default: "median"
  * Available Options: median or average
* **x\_offset**
  * X offset of cartographer from the nozzle.
  * **Default:** 0.0
* **y\_offset**
  * Y offset of cartographer from the nozzle.
  * **Default:** 0.0
* **z\_hop\_dist**
  * Default: 5.0
  * Constraint: above 0.0
* **z\_hop\_speed**
  * Default: 5.0
  * Constraint: above 0.0
* **mode**
  * Default: "scan"
  * Available options: touch or scan
* **trigger\_distance**
  * Cartographer trigger distance for homing.
  * **Default:** 2.0
* **trigger\_dive\_threshold**
  * Threshold for range vs dive mode probing. Beyond \`trigger\_distance + trigger\_dive\_threshold\` a dive will be used.
  * **Default:** 1.5
* **trigger\_hysteresis**
  * Hysteresis on trigger threshold for untriggering, as a percentage of the

    trigger threshold.
  * **Default:** 0.006
* **z\_settling\_time**
  * **Default:** 5 seconds
  * **Constraint:** min 0
* **scanner\_touch\_accel**
  * Default: 100
  * Constraint: above 0, min 100
* **scanner\_touch\_max\_speed**
  * Default: 10
  * Constraint: above 0, max 30
* **scanner\_touch\_speed**
  * **Default:** 3
  * **Constraint:** max scanner\_touch\_max\_speed
* **scanner\_touch\_retract\_dist**
  * Default: 2
  * Constraint: min 1
* **scanner\_touch\_retract\_speed**
  * Default: 10
  * Constraint: min 1
* **scanner\_touch\_sample\_count**
  * Default: 3
  * Constraint: min 1
* **scanner\_touch\_tolerance**
  * Default: 0.01
  * Constraint: above 0.0
* **scanner\_touch\_max\_retries**
  * Default: 10
  * Constraint: min 0
* **scanner\_touch\_move\_speed**
  * Default: 50
  * Constraint: min 1
* **scanner\_touch\_z\_offset**
  * Default: 0.05
* **scanner\_touch\_max\_temp**
  * Default: 150
  * Nozzle touching temperature must be below this limit. In Celsius
* **scanner\_touch\_threshold**
  * Default: 2500

</details>


# Firmware - Archive

{% hint style="danger" %}
DO NOT USE FOR Cartographer V4
{% endhint %}


# CANBUS Bitrate Switching

## Do You Need To Switch Bitrate?

Are you running CANBUS at a different bitrate? If you arent using the default 1M (1000000) go ahead and use the steps below to swap to whatever version you need.

***

## Step 1. Plug In Cartographer via CANBUS

## Step 2. SSH Into Your Host Device & Run The Script

```bash
cd ~
if [ -d ~/cartographer_firmware/ ]; then
    echo "Directory Exists - Starting Firmware Script"
    cd ~/cartographer_firmware/
    git pull
else
    git clone https://github.com/Cartographer3D/cartographer_firmware.git
fi
~/cartographer_firmware/scripts/firmware.py
```

<figure><img src="/files/HbeOQ4eg116Sws5Hfabq" alt="" width="557"><figcaption></figcaption></figure>

## Step 3. Find Your Device

<figure><img src="/files/715uqOA1XlAhLjjyhn8M" alt="" width="551"><figcaption></figcaption></figure>

## Step 4. Select Which Firmware/Bitrate You Want

<figure><img src="/files/bBumO07b7wpW2iTj9P9W" alt="" width="551"><figcaption></figcaption></figure>

## Step 5. Flash Firmware

<figure><img src="/files/zQVxAlYaPDk0yj5dHiJ6" alt="" width="551"><figcaption></figcaption></figure>

## Step 6. Re-Run Script

```bash
cd ~/cartographer_firmware/scripts
./firmware.py -f can
```

<figure><img src="/files/HbeOQ4eg116Sws5Hfabq" alt="" width="557"><figcaption></figcaption></figure>

## Step 7. Find Your Device

<figure><img src="/files/715uqOA1XlAhLjjyhn8M" alt="" width="551"><figcaption></figcaption></figure>

## Step 8. Select Firmware & Flash

<figure><img src="/files/yeDYsOScLjaygMSMgulT" alt="" width="551"><figcaption></figcaption></figure>

<figure><img src="/files/fkzbbaaa5nuu9AD8NKXv" alt="" width="551"><figcaption></figcaption></figure>

<figure><img src="/files/zQVxAlYaPDk0yj5dHiJ6" alt="" width="551"><figcaption></figcaption></figure>

## Step 9. Done


# Firmware Switching


# CANBUS to USB

## Currently Using CANBUS?

Looking at using Cartographer via USB instead of CANBUS? Follow the steps below to make the change!

***

## Step 1. Plug In Cartographer via CANBUS

## Step 2. SSH Into Your Host Device & Run The Script

```bash
cd ~
if [ -d ~/cartographer_firmware/ ]; then
    echo "Directory Exists - Starting Firmware Script"
    cd ~/cartographer_firmware/
    git pull
else
    git clone https://github.com/Cartographer3D/cartographer_firmware.git
fi
~/cartographer_firmware/scripts/firmware.py
```

<figure><img src="/files/HbeOQ4eg116Sws5Hfabq" alt="" width="557"><figcaption></figcaption></figure>

## Step 3. Find Your Device

<figure><img src="/files/715uqOA1XlAhLjjyhn8M" alt="" width="551"><figcaption></figcaption></figure>

## Step 4. Select The USB Firmware

<figure><img src="/files/bBumO07b7wpW2iTj9P9W" alt="" width="551"><figcaption></figcaption></figure>

<figure><img src="/files/vtfhuG4EVreEyYu2x4bb" alt="" width="551"><figcaption></figcaption></figure>

## Step 5. Flash Katapult Firmware

<figure><img src="/files/zQVxAlYaPDk0yj5dHiJ6" alt="" width="551"><figcaption></figcaption></figure>

## Step 6. Unplug CANBUS and plug into USB

## Step 7. Re-run Script

```bash
~/cartographer_firmware/scripts/firmware.py -f usb
```

<figure><img src="/files/4ifmfgPBsIcLJQrpRlmS" alt="" width="557"><figcaption></figcaption></figure>

## Step 8. Find Your Device

<figure><img src="/files/vUsiNVTnS7oVZWHccOGK" alt="" width="551"><figcaption></figcaption></figure>

## Step 9.Select Firmware & Flash

<figure><img src="/files/rK6Gj8I8bloI4Ge0gOtz" alt="" width="551"><figcaption></figcaption></figure>

<figure><img src="/files/bIHAeXCkEIPZz0f49wNA" alt="" width="551"><figcaption></figcaption></figure>

<figure><img src="/files/etUZVP5dbSGeY1zEJwov" alt="" width="551"><figcaption></figcaption></figure>

## Step 10. Done


# USB to CANBUS

## Currently Using USB?

Looking at using Cartographer via CANBUS instead of USB? Follow the steps below to make the change!

***

## Step 1. Plug In Cartographer via USB

## Step 2. SSH Into Your Host Device & Run The Script

```bash
cd ~
if [ -d ~/cartographer_firmware/ ]; then
    echo "Directory Exists - Starting Firmware Script"
    cd ~/cartographer_firmware/
    git pull
else
    git clone https://github.com/Cartographer3D/cartographer_firmware.git
fi
~/cartographer_firmware/scripts/firmware.py
```

<figure><img src="/files/4ifmfgPBsIcLJQrpRlmS" alt="" width="557"><figcaption></figcaption></figure>

## Step 3. Find Your Device

<figure><img src="/files/vUsiNVTnS7oVZWHccOGK" alt="" width="551"><figcaption></figcaption></figure>

## Step 4. Select Which Firmware/Bitrate You Want

<figure><img src="/files/Pa2FCp4S1ZjrJRjg7TqF" alt="" width="551"><figcaption></figcaption></figure>

<figure><img src="/files/jK2gJJ1iQykfknGUI2nT" alt="" width="551"><figcaption></figcaption></figure>

## Step 5. Flash Katapult Firmware

<figure><img src="/files/etUZVP5dbSGeY1zEJwov" alt="" width="551"><figcaption></figcaption></figure>

## Step 6. Unplug USB and plug into CANBUS

## Step 7. Re-run Script

```bash
~/cartographer_firmware/scripts/firmware.py -f can
```

## Step 8. Find Your Device

<figure><img src="/files/HbeOQ4eg116Sws5Hfabq" alt="" width="557"><figcaption></figcaption></figure>

<figure><img src="/files/715uqOA1XlAhLjjyhn8M" alt="" width="551"><figcaption></figcaption></figure>

## Step 9. Select Firmware & Flash

<figure><img src="/files/yeDYsOScLjaygMSMgulT" alt="" width="551"><figcaption></figcaption></figure>

<figure><img src="/files/fkzbbaaa5nuu9AD8NKXv" alt="" width="551"><figcaption></figcaption></figure>

<figure><img src="/files/zQVxAlYaPDk0yj5dHiJ6" alt="" width="551"><figcaption></figcaption></figure>

## Step 10. Done


# Firmware Updating


# via Katapult


# USB Flash

### CANBUS or USB

* If you ordered a USB flashed cartographer, you use the [USB Katapult Method](/original-plugin/firmware-archive/firmware-updating/via-katapult/usb-flash)
* If you ordered a CAN flashed cartographer, you use the [CANBUS Katapult Me](/original-plugin/firmware-archive/firmware-updating/via-katapult/canbus-flash)[thod](/original-plugin/firmware-archive/firmware-updating/via-katapult/canbus-flash)

### Whats Required?

* Cartographer Probe
* USB-A to JST-PH Cable

  <figure><img src="https://github.com/user-attachments/assets/1c082c5d-44ff-43e1-b1bf-f70b4249a490" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Using the scripts below, you may need to use the **Install Prerequisites** option first to make sure everything is configured prior to flashing.
{% endhint %}

## USB Katapult Updating

## Step 1. Plug Cartographer in via USB

## Step 2. SSH into Device & Run Script

```bash
cd ~
if [ -d ~/cartographer_firmware/ ]; then
    echo "Directory Exists - Starting Firmware Script"
    cd ~/cartographer_firmware/
    git pull
else
    git clone https://github.com/Cartographer3D/cartographer_firmware.git
fi
~/cartographer_firmware/scripts/firmware.py
```

## Step 3. Select Katapult - USB Menu

<figure><img src="/files/Sm0qN3jLBjGTNFXWQ7Hh" alt="" width="543"><figcaption></figcaption></figure>

## Step 4. Find Your Device

<figure><img src="/files/4ifmfgPBsIcLJQrpRlmS" alt="" width="557"><figcaption></figcaption></figure>

## Step 5. Select Your Device

<figure><img src="/files/vUsiNVTnS7oVZWHccOGK" alt="" width="551"><figcaption></figcaption></figure>

## Step 6. Find Latest Firmware

<figure><img src="/files/bIHAeXCkEIPZz0f49wNA" alt="" width="551"><figcaption></figcaption></figure>

## Step 7. Flash Firmware

<figure><img src="/files/rK6Gj8I8bloI4Ge0gOtz" alt="" width="551"><figcaption></figcaption></figure>

## Step 8. Device Flashing

<figure><img src="/files/etUZVP5dbSGeY1zEJwov" alt="" width="551"><figcaption></figcaption></figure>

## Step 9. All Done


# CANBUS Flash

### CANBUS or USB

* If you ordered a USB flashed cartographer, you use the [USB Katapult Method](/original-plugin/firmware-archive/firmware-updating/via-katapult/usb-flash)
* If you ordered a CAN flashed cartographer, you use the [CANBUS Katapult Me](/original-plugin/firmware-archive/firmware-updating/via-katapult/canbus-flash)[thod](/original-plugin/firmware-archive/firmware-updating/via-katapult/canbus-flash)

### Whats Required?

* Cartographer Probe
* Canbus to JST-PH Cable (For Katapult Canbus Flashing)

{% hint style="info" %}
Using the scripts below, you may need to use the **Install Prerequisites** option first to make sure everything is configured prior to flashing.
{% endhint %}

## CANBus Katapult Updating

## Step 1. Plug Cartographer in via CANBUS

## Step 2. Get Your UUID

This method requires prior knowledge of your **CANBUS UUID**.

This should have been supplied to you in your hardware box if purchased (insert date).

If you do not have your UUID. Visit [HERE](/cartographer-probe/archive/classic-installation/klipper-setup#finding-the-serial-or-uuid) to get it.

## Step 2. SSH into Device & Run Script

```bash
cd ~
if [ -d ~/cartographer_firmware/ ]; then
    echo "Directory Exists - Starting Firmware Script"
    cd ~/cartographer_firmware/
    git pull
else
    git clone https://github.com/Cartographer3D/cartographer_firmware.git
fi
~/cartographer_firmware/scripts/firmware.py
```

## Step 3. Select Katapult - Can Menu

![Screen #1 - Canbus Detected](/files/Sm0qN3jLBjGTNFXWQ7Hh)

## Step 3. Find Your Device

<figure><img src="/files/HbeOQ4eg116Sws5Hfabq" alt="" width="557"><figcaption></figcaption></figure>

## Step 4. Find Your Device pt2

<figure><img src="/files/715uqOA1XlAhLjjyhn8M" alt="" width="551"><figcaption></figcaption></figure>

## Step 5. Find Latest Firmware

{% hint style="info" %}
Your CANBUS bitrare (if configured on your host device) should be detected and displayed. You should flash your cartographer with MATCHING bitrate firmware.
{% endhint %}

<figure><img src="/files/yeDYsOScLjaygMSMgulT" alt="" width="551"><figcaption></figcaption></figure>

## Step 6. Flash Firmware

<figure><img src="/files/fkzbbaaa5nuu9AD8NKXv" alt="" width="551"><figcaption></figcaption></figure>

## Step 7. Device Flashing

<figure><img src="/files/zQVxAlYaPDk0yj5dHiJ6" alt="" width="551"><figcaption></figcaption></figure>

## Step 8. All Done


# via DFU

### Should You Be Using DFU?

* DFU mode should be used to flash if you dont have access to CAN in order to change from CAN to USB or if for some reason Katapult isnt available.

### Whats Required?

* Host device (RaspPi/Manta + CB1 etc)
* Cartographer Probe
* Two pairs of conductive (Metal) Tweezers
* USB-A to JST-PH Cable

  <figure><img src="https://github.com/user-attachments/assets/1c082c5d-44ff-43e1-b1bf-f70b4249a490" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Using the scripts below, you may need to use the **Install Prerequisites** option first to make sure everything is configured prior to flashing.
{% endhint %}

## DFU Updating

### What is DFU

* DFU Mode (Device Firmware Upgrade Mode) is STM's bootloader thats apart of the STM32 chip included on cartographer probes. Its next to impossible to make this mode fail. For the STM chip to enter DFU mode all that needs to happen is to have the boot pin pulled high when the chip itself starts up.

### Step 1. Enter DFU Mode

![image](https://github.com/user-attachments/assets/b9d2581f-9b64-4e61-bc7f-e3382b0155ad)

{% hint style="danger" %}
No LEDs will be on when in DFU mode. If the blue LED is lit, even intermittently, the device is in runtime mode and this isnt what we want. Continue touching those pads till it works!
{% endhint %}

* Entering DFU mode is simple in theory but a bit more fiddly in practice. With the cartographer plugged in via USB, first short the two pads of the **BOOT0** set (marked 1 on the photo). With **BOOT0** still shorted, briefly short the RESET pads (marked 2). This will put the device in DFU mode.
* You can also just short the **BOOT0** pads and <mark style="color:red;">NOT the RESET pads</mark>, whilst plugging in the device via USB which should be easier to enter DFU.
* This process can be tricky and take some time, so listed below are two ways to make it simpler.

#### Make-it-easier option #1: printed tweezer guide

* You can use the PCB cover designed by [MakerMylo](https://www.youtube.com/@makermylo) to help with the fine-motor work of shorting pads. It clips onto the PCB and helps you to align tweezers accurately for shorting pads.

{% file src="/files/4WHYd3CV2Fni2mp6cVEz" %}

#### Make-it-easier option #2: solder-bridging the **BOOT0** pads

* Soldering a bridge on the **BOOT0** pads can make this process much easier. You will still need to briefly short the **RESET** pads, but you won't have to coordinate two sets of tweezers.
* Once you've flashed by using DFU mode, remember to de-solder the bridge.

### Step 2. SSH into Host & Run Script

{% hint style="info" %}
Via SSH, use the command `lsusb` to determine whether the device is in **DFU Mode**\
\
**OR**\
\
**This can now be entered and automated using the** [**script below**](https://docs.cartographer3d.com/cartographer-probe/firmware/firmware-updating/via-dfu#step-2.-ssh-into-host-and-run-script) **and using lsusb from option #2 which loops the lsusb command while you attempt to tap the pins.**
{% endhint %}

<figure><img src="https://github.com/user-attachments/assets/5996588d-1049-458f-8aa4-82894c26168f" alt=""><figcaption><p>lsusb should look like this if DFU mode is found.</p></figcaption></figure>

```bash
cd ~
if [ -d ~/cartographer_firmware/ ]; then
    echo "Directory Exists - Starting Firmware Script"
    cd ~/cartographer_firmware/
    git pull
else
    git clone https://github.com/Cartographer3D/cartographer_firmware.git
fi
~/cartographer_firmware/scripts/firmware.py -f dfu
```

![Screen #1](/files/Sm0qN3jLBjGTNFXWQ7Hh)

![Screen #2](/files/qTKYE02UkrdDIzfMkiTJ)

{% hint style="info" %}
On the next screen it will attempt to find your DFU device. This will loop for 30 seconds while you put your device into DFU mode if it isn't already.\
\
You do this by either bridging the <mark style="color:yellow;">**boot0**</mark> pins and plugging in the USB or by plugging in via USB and then bridging both <mark style="color:yellow;">**boot0**</mark> and <mark style="color:yellow;">**reset**</mark> pins.
{% endhint %}

<figure><img src="/files/AoM3Q6J7Z7dYTlk5NKVb" alt="" width="557"><figcaption></figcaption></figure>

<figure><img src="/files/NkoeYJAkcoTpIR7u4Khm" alt="" width="557"><figcaption></figcaption></figure>

{% hint style="info" %}
Choose FULL\_CARTOGRAPHER\_CANBUS for using Cartographer via CANBUS.

Choose FULL\_CARTOGRAPHER\_USB for using Cartographer via USB
{% endhint %}

![Screen #3](/files/govVf4gYZd38q0onHCn1)

<figure><img src="/files/sy3r3IKX81a96iA1BdMX" alt="" width="551"><figcaption></figcaption></figure>

### Step 3. Done

Once flashed, you will see the image below. This is a successful flash and youre all finished.

<figure><img src="/files/J3BVMp4fa21hHqXdEBvH" alt="" width="551"><figcaption><p>Screen #4</p></figcaption></figure>

<figure><img src="/files/Hym77978w4QjXzmXA6w0" alt="" width="551"><figcaption></figcaption></figure>

### Step 4. Now What?

* If you flashed for canbus, unplug cartographer and plug in via canbus
* If you flashed for usb, power cycle your device.


# Manual Methods

In the off-chance the automatic script methods dont work for you, this is a compilation of guides on doing it the manual way. This can take some time and a few linux commands via SSH so be prepared.


# Firmware

Guide to flashing your Cartographer probe with new or updated firmware.

### Which Firmware Should I use & What Address Do I Flash To? <a href="#which-firmware-should-i-use" id="which-firmware-should-i-use"></a>

#### Firmware Types & Flash Address

Combined Firmware = Katapult + Software: flash at `0x08000000` \
Katapult = Bootloader Only: flash at `0x08000000` \
Software = Cartographer Software Only: flash at `0x08002000`

#### Cartographer Software?

**Cartographer V2 & V3:**\
Cartographer = Scan Only\
Survey\_Cartographer = Scan + Touch (Firmware 5.0.0 - 5.1.0)\
CartographerV3 = Scan + Touch (Firmware 6.1.0+)\
\
**Cartographer V4:**\
CartographerV4 = Scan + Touch (Firmware 5.1.0+)

#### CAN Speeds

If the firmware has a build available the CAN speed (Baudrate) will be in the firmware name, 250k, 500k, 1M.\
\
Examples:\
`CartographerV3_6.1.0_CAN_250K_full_8kib_offset.bin`\
`CartographerV4_6.1.0_CAN_500K_full_8kib_offset.bin`\
`CartographerV4_6.1.0_CAN_1M_full_8kib_offset.bin`

#### Download Links

V2 & V3 - [Firmware](https://github.com/Cartographer3D/cartographer_firmware/tree/main/firmware/v2-v3)\
\
V4 - [Firmware](https://github.com/Cartographer3D/cartographer_firmware/tree/main/firmware/v4)

## Firmware - Archive ⬇

Selecting the correct firmware is essential for the operation of the probe, please check which probe you have, and which mode it is being used in and cross reference the table below.

#### Cartographer v1 RP2040 <a href="#cartographer-v1-rp2040" id="cartographer-v1-rp2040"></a>

| Mode | Firmware         | Link                                                                                                      | Notes                                                 |
| ---- | ---------------- | --------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| USB  | carto-rp2040.uf2 | [GitHub](https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v1/carto-rp2040.uf2) | Only USB Compatible - No Katapult Bootloader Required |

#### Cartographer v2 w/ Input Shaper (USB or CAN) <a href="#cartographer-v2-w-input-shaper-usb-or-can" id="cartographer-v2-w-input-shaper-usb-or-can"></a>

With Cartographer v2, the device will only work in the mode that it was purchased. This is a hardware limitation. The CAN Probe can be forced to work in USB Mode, but is unreliable and requires hardware modifications, this is not something we recommend right now.

**USB Version**

| Firmware                                                                                                                                                                              | Type                  | Address    | Notes                                           |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | ---------- | ----------------------------------------------- |
| [Katapult\_USB.bin](https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/Katapult_USB.bin)                                                               | Bootloader (Katapult) | 0x08000000 |                                                 |
| [Survey\_Cartographer\_USB\_8kib\_offset.bin](https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/survey/5.0.0/Survey_Cartographer_USB_8kib_offset.bin) | Firmware (Klipper)    | 0x08002000 | 8KiB Offset required, so needs to be 0x08002000 |

**CAN Version**

| Firmware                                                                                                                                                                                               | Type                  | Address    | Baudrate | Notes                                           |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------- | ---------- | -------- | ----------------------------------------------- |
| [Katapult\_1m.bin](https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/Katapult_1m.bin)                                                                                  | Bootloader (Katapult) | 0x08000000 | 1M       |                                                 |
| [Katapult\_250k.bin](https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/Katapult_250k.bin)                                                                              | Bootloader (Katapult) | 0x08000000 | 250k     |                                                 |
| [Katapult\_500k.bin](https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/Katapult_500k.bin)                                                                              | Bootloader (Katapult) | 0x08000000 | 500k     |                                                 |
| [Survey\_Cartographer\_CAN\_1000000\_8kib\_offset.bin](https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/survey/5.0.0/Survey_Cartographer_CAN_1000000_8kib_offset.bin) | Firmware (Klipper)    | 0x08002000 | 1M       | 8KiB Offset required, so needs to be 0x08002000 |
| [Survey\_Cartographer\_CAN\_250000\_8kib\_offset.bin](https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/survey/5.0.0/Survey_Cartographer_CAN_250000_8kib_offset.bin)   | Firmware (Klipper)    | 0x08002000 | 250K     | 8KiB Offset required, so needs to be 0x08002000 |
| [Survey\_Cartographer\_CAN\_500000\_8kib\_offset.bin](https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/survey/5.0.0/Survey_Cartographer_CAN_500000_8kib_offset.bin)   | Firmware (Klipper)    | 0x08002000 | 500K     | 8KiB Offset required, so needs to be 0x08002000 |

#### Cartographer v3 w/ Input Shaper (USB/CAN) <a href="#cartographer-v3-w-input-shaper-usb-can" id="cartographer-v3-w-input-shaper-usb-can"></a>

Cartographer v3 by default will come pre-flashed for CAN. You can switch between both USB and CAN modes via firmware with no hardware modification required.

**USB / CAN Version**

| Firmware                                                                                                                                                                                                | Type                            | Address    | Baudrate | Note                                                                                               |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | ---------- | -------- | -------------------------------------------------------------------------------------------------- |
| [Full\_Survey\_Cartographer\_USB\_5\_1\_0.bin](https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/combined-firmware/5.0.0/Full_Survey_Cartographer_USB_5_0_0.bin)        | Bootloader & Firmware Combined  | 0x08000000 | N/A      | This is the only firmware you need, you don't need to flash the bootloader or firmware separately. |
| [Full\_Survey\_Cartographer\_CAN\_1M\_5\_0\_0.bin](https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/combined-firmware/5.0.0/Full_Survey_Cartographer_CAN_1M_5_0_0.bin) | Bootloader & Firmware Combined  | 0x08000000 | 1M       | This is the only firmware you need, you don't need to flash the bootloader or firmware separately. |
| [Katapult\_250k.](https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/Katapult_250k.bin)                                                                                  | Bootloader (Katapult)           | 0x08000000 | 250K     |                                                                                                    |
| [Katapult\_500k.bin](https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/Katapult_500k.bin)                                                                               | Bootloader (Katapult)           | 0x08000000 | 500K     |                                                                                                    |
| [Katapult\_1m.bin](https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/Katapult_1m.bin)                                                                                   | <p>Bootloader<br>(Katapult)</p> | 0x08000000 | 1M       |                                                                                                    |
| [Katapult\_USB.bin](https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/Katapult_USB.bin)                                                                                 | <p>Bootloader<br>(Katapult)</p> | 0x08000000 | N/A      |                                                                                                    |
| [Survey\_Cartographer\_CAN\_250000\_8kib\_offset.bin](https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/survey/5.0.0/Survey_Cartographer_CAN_250000_8kib_offset.bin)    | Firmware (Klipper)              | 0x08002000 | 250K     | 8KiB Offset required, so needs to be 0x08002000                                                    |
| [Survey\_Cartographer\_CAN\_500000\_8kib\_offset.bin](https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/survey/5.0.0/Survey_Cartographer_CAN_500000_8kib_offset.bin)    | Firmware (Klipper)              | 0x08002000 | 500K     | 8KiB Offset required, so needs to be 0x08002000                                                    |
| [Survey\_Cartographer\_CAN\_1000000\_8kib\_offset.bin](https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/survey/5.0.0/Survey_Cartographer_CAN_1000000_8kib_offset.bin)  | Firmware (Klipper)              | 0x08002000 | 1M       | 8KiB Offset required, so needs to be 0x08002000                                                    |
| [Survey\_Cartographer\_USB\_8kib\_offset.bin](https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/survey/5.0.0/Survey_Cartographer_USB_8kib_offset.bin)                   | Firmware (Klipper)              | 0x08002000 | N/A      | 8KiB Offset required, so needs to be 0x08002000                                                    |
| [Survey\_Cartographer\_K1\_USB\_8kib\_offset.bin](https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/survey/5.0.0/Survey_Cartographer_K1_USB_8kib_offset.bin)            | <p>Firmware<br>(Klipper)</p>    | 0x08002000 | N/A      | Creality K1 Printers ONLY                                                                          |


# Update or Re-Flash via ST-Link

pdating via the ST-Link provides a reliable and easy way to flash any STM based MCU's especially if you have issues entering DFU mode, the only time where it becomes problematic is when older/fake ST-Links are used, please see the notes and ways of identifying below.

### Requirements

* ST-Link v2 (Below is a table of the most common ST-Link v2s. There are obviously more available on the market.

| STLink                 | ST-Link V2 Mini (Fake MCU)                                                                     | ST-Link V2 Mini                                                     | ST-Link V2                                                          |
| ---------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
| Image                  | <img src="/files/UHH4BAGackjpRmtTZ5dR" alt="" data-size="original">                            | <img src="/files/of3t5fvUY9hbcEpNWpkT" alt="" data-size="original"> | <img src="/files/h2tHQ2AGX2BgNvnSVmNa" alt="" data-size="original"> |
| Note                   | Uses fake STM Chip, Pin order is different and isnt always recognised via STM Cube Programmer. | Occasional Issues, depending on age / firmware.                     | Most Reliable                                                       |
| STMCubeProg Compatible | <p>❌</p><p>May not work</p>                                                                    | ✅                                                                   | ✅                                                                   |

* STM Cube Programmer - (recommended version v2.15.0) **- if using Windows or MacOS**
* 4x DuPont M-M or M-F Cables
* Cartographer V3 Probe

{% embed url="<https://www.st.com/en/development-tools/stm32cubeprog.html#st-get-software>" %}

### Step 1 - Wire up your probe

Connect the following pins based upon the different ST-Links.

| Hardware                        | Pinout                                                              | Connections (STLink - Probe)                                                                                                                |
| ------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| **ST-Link V2**                  | <img src="/files/ytgxoRzrJLFbzao6nKNA" alt="" data-size="original"> | <p>SWDIO - SWD<br>SWCLK - SCL<br>GND - GND<br>VCC - 5V</p>                                                                                  |
| **ST-Link V2 Mini (Fake Chip)** | <img src="/files/jDQ7P4do043CLs9lnU31" alt="" data-size="original"> | <p>SWDIO - SWD<br>SWCLK - SCL<br>GND - GND<br>3.3V\*- 5V<br><br>\* 5v may also work , but on some mini's it can cause stability issues.</p> |
| **ST-Link V2 Mini**             | <img src="/files/TzJppOeF13mcRgiIoCuQ" alt="" data-size="original"> | <p>SWDIO - SWD<br>SWCLK - SCL<br>GND - GND<br>3.3V\*- 5V<br><br>\* 5v may also work , but on some mini's it can cause stability issues.</p> |

Connect your probe to the STLink connectors to the left and the right of the JST connector.

<figure><img src="/files/Icx3g4owGhnAfFNswuGQ" alt=""><figcaption><p>Pinout on Cartgorapher V2 and V3</p></figcaption></figure>

{% hint style="warning" %}
You do NOT need to solder in the connector, pressure fit is fine.
{% endhint %}

<figure><img src="/files/buqXMLjPjtsU9cMt0q6N" alt=""><figcaption><p>Connected on ST-Link V2</p></figcaption></figure>

<figure><img src="/files/XcUcrd4V5YfVmnFLGx2C" alt=""><figcaption><p>Connected to a ST-Link v2 Mini (with a Genuine STM Chip)</p></figcaption></figure>

### If using Windows follow the next steps, if you are using Linux (Pi) [click here](#flashing-via-linux-pi)

Open STM32CubeProg

<figure><img src="/files/N0GNTIkbYFaE7YsG5yWc" alt=""><figcaption></figcaption></figure>

Select **Open File** and select the file you want to open. For this, I recommend flashing the FULL complete firmware files, which include both **bootloader** and **Cartographer firmware.**

<figure><img src="/files/asJS5CPnr46emdEEwI9S" alt=""><figcaption><p>Select the file you need</p></figcaption></figure>

### Step 3 - Check the Settings

Ensure that you are writing to the correct memory location

If your firmware is from the **`combined-firmware`** folder or starts with the words `Katapult`**,** ensure that the address is set to `0x08000000`

<figure><img src="/files/VRGTYuNTIEsqPOWzuaF1" alt=""><figcaption></figcaption></figure>

Ensure that you have ST-LINK slelected on the right (this can default to DFU mode if you havnt used this before)

<figure><img src="/files/8a3KOFVbnse3yC8lLfcO" alt=""><figcaption></figcaption></figure>

Now press Connect and the screen should indicate that the probe is Connected

<figure><img src="/files/u2XEzaSUmJMp3LNOXhUY" alt=""><figcaption></figcaption></figure>

### Flash and Confirm Firmware

Press download to Download the firmware to your Cartographer

<figure><img src="/files/bwib7vTbBwWu2mucJ5cT" alt=""><figcaption></figcaption></figure>

The output should look something like this

<figure><img src="/files/FayepW3VDqPyYzWTvNVi" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/GsXOh5fxbI0mMggqEY0i" alt=""><figcaption></figcaption></figure>

Press Disconnect and unplug the probe.

### Flashing via Linux (Pi)

1. SSH into your 3D Printer using your client of choice
2. Run the following command (this may take a little while)

```bash
sudo apt-get update
sudo apt-get upgrade
sudo apt-get -y install stlink-tools
```

3. Navigate to the folder where your firmware is stored, usually

```bash
cd ~/cartographer-klipper/firmware/v2-v3/combined-firmware
```

4. Check if the ST-Link has been detected using `lsusb` if it is not visable, unplug and re-plug it back in.

<figure><img src="/files/VrvmCDaNQrPrYxgXAXOJ" alt=""><figcaption><p>Original lsusb not being able to see the ST-Link, second one able to see it.</p></figcaption></figure>

4. run the following command replacing firmware.bin and the memory address with the correct address for the firmware that you are using.

```
st-flash write firmware.bin 0x08000000
```

For example to flash the Survey CAN firmware

```
st-flash write Full_Survey_Cartographer_CAN_1M_5_0_0.bin 0x08000000
```

Upon completion, you should see something like this

<figure><img src="/files/GksZO8xjwHeYqyVHgNoW" alt=""><figcaption><p>Successful Flash</p></figcaption></figure>

### Reconnect your probe to your printer

Reconnect your probe to your 3D Printer, and it should work perfectly :)


# Switching between CAN and USB Operation (v3 only)

Switching your probe between USB and CAN modes, simply, requires you to reflash the firmware suitable for the mode of operation you wish to use.

When doing this, it is VITAL that you flash not only the Cartographer Firmware, but also the modified Katapult bootloader as well.

My recommendation would be for you to do this via your computer, using the STM32CubeProgrammer, [follow our guide on updating the firmware via DFU Mode](/original-plugin/firmware-archive/manual-methods/cartographer-with-input-shaper/update-via-dfu-mode).

{% content-ref url="/pages/wulGU7niKROq4FSGXyfW" %}
[Update via DFU Mode](/original-plugin/firmware-archive/manual-methods/cartographer-with-input-shaper/update-via-dfu-mode)
{% endcontent-ref %}

Any questions or issues, please feel free to join our [Discord server,](https://discord.gg/HjJbdbVrJM) where we will be happy to provide help and support.


# Cartographer with Input Shaper

Update or re-flash the firmware on your Cartographer probe with Input Shaper

Coming Soon


# Update via Katapult (recommended)

Your probe will come pre-flashed with Katapult (formally CanBoot), this is on both the USB, CAN and Hybrid USB/CAN Probes.

### Firmware

The best place to get the probes firmware is from our [GitHub](https://github.com/Cartographer3D/cartographer-klipper/tree/master/firmware). These have been tested thoroughly, and are known to work perfectly.

You can also build your own firmware, our GitHub organisation has both a custom build of [Klipper](/) and [Katapult](https://github.com/Cartographer3D/katapult) that you can build yourself.

{% hint style="danger" %}
Untested Firmware could brick your probe - it is advisable if this is the case, you have a STLink handy in order to easily re-flash the probe.
{% endhint %}

The files labelled 'Katapult' are the bootloader, NOT the firmware themselves. Use the firmware labelled \`Cartographer\`

### Updating a CAN probe via Katapult

Updating via Katapult and CAN is super easy, all you need is to know your probes UUID (available in your Klippers printer.cfg and which firmware you need to flash.

SSH into your printer, and navigate to the folder where the firmware you want to flash is located and run the following command replacing `<firmware.bin>` with the fimware file name and `<uuid>` with your probes UUID.

{% hint style="danger" %}
CHECK THE FIRMWARE YOU ARE FLASHING IS THE CORRECT FIRMWARE.\
\ <mark style="color:red;">Any firmware labelled Katapult, or Full CANNOT be flashed using this method.</mark>
{% endhint %}

```
python3 ~/katapult/scripts/flash_can.py -i can0 -f <firmware.bin> -u <myuuid>
```

Example of fully structured command.

```
python3 ~/katapult/scripts/flash_can.py -i can0 -f Cartographer_CAN_1000000_8kib_offset.bin -u 379702c36ad1
```

Klipper will then require a Firmware restart, and if you did it correctly it will all work.

<figure><img src="/files/YdvRPwrLak3ruWKq2rWI" alt=""><figcaption><p>Example of full process of Firmware Update</p></figcaption></figure>

### Updating a USB Probe via Katapult

Updating via USB is just as easy, just requires a couple more steps.

The initial step is noting down the probes Serial ID, you do this by typing the following command

```
ls -l /dev/serial/by-id/
```

<figure><img src="/files/UFxGEihM4b9xqC2IB8mC" alt=""><figcaption></figcaption></figure>

You now need to load the probe into the Katapult bootloader, to do this you simply replace \<serialID> with your own serial ID and path as found in the above step.

```
cd ~/klipper/scripts
~/klippy-env/bin/python -c 'import flash_usb as u; u.enter_bootloader("<serialID>")'
```

Example of full command;

```
cd ~/klipper/scripts
~/klippy-env/bin/python -c 'import flash_usb as u; u.enter_bootloader("/dev/serial/by-id/usb-Cartographer_614e_060004001443303856303820-if00")'
```

<figure><img src="/files/rVD7SL0SYWfw5VhgnrgI" alt=""><figcaption></figcaption></figure>

After the command runs, repeat step 1, and run a `ls -l /dev/serial/by-id/` and note down the new ID, this should have changed to usb-katapult, rather than usb-cartographer.

Now navigate to the folder where your firmware is located, for the example I will be using, I will be updating a v2 probe.

Now, run the following command, replacing \<firmware> with the firmware you are flashing, and \<serial> with the serial ID and path.

```
~/klippy-env/bin/python ~/klipper/lib/canboot/flash_can.py -f <firmware> -d <serial>
```

Again, an example of a full command

```
~/klippy-env/bin/python ~/klipper/lib/canboot/flash_can.py -f Cartographer_USB_8kib_offset.bin -d /dev/serial/by-id/usb-katapult_stm32f042x6_060012001643565537353020-if00
```

If successful, you should have the following output.

<figure><img src="/files/MFkmGKCj1QZd77mRzh76" alt=""><figcaption></figcaption></figure>

Restart your printer firmware, and everything should work as normal.


# Update via DFU Mode

Update or reflash your Cartographer Probe via DFU Mode.

### Compatibility

The following method is compatible with MOST Cartographer probes, please check the compatibility chart listed below.

| Probe                                                       | Interface | Compatible                                                                                                         |
| ----------------------------------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------ |
| Cartographer V1 (RP2040)                                    | USB       | [Click Here](/original-plugin/firmware-archive/manual-methods/archive/cartographer-rp2040/dfu-u2f-bootloader-mode) |
| Cartographer with Input Shaper (v2)                         | USB       | Yes                                                                                                                |
|                                                             | CAN       | No                                                                                                                 |
| Cartographer Probe v3 with Input Shaping (Hybrid USB & CAN) | USB       | Yes                                                                                                                |
|                                                             | CAN       | Yes                                                                                                                |

### Pre-requirements

Prior to flashing, you will need to following tools

* 2 x Ferrous Tweezers (or any conductive tool to bridge the two pads)
* 1 x Compatible Cartographer Probe (see above)
* 1 x USB Cable terminated to work w/ Catographer

### Firmware

The best place to get the probes firmware is from our [GitHub](https://github.com/Cartographer3D/cartographer-klipper/tree/master/firmware). These have been tested thoroughly, and are known to work perfectly. If you want to find a link to the latest firmware for each of your probes, please check [here](/original-plugin/firmware-archive/manual-methods/firmware-update).

You can also build your own firmware, our GitHub organisation has both a custom build of [Klipper](/) and [Katapult](https://github.com/Cartographer3D/katapult) that you can build yourself.

{% hint style="danger" %}
Untested Firmware could brick your probe - it is advisable if this is the case, you have a STLink handy in order to easily re-flash the probe.
{% endhint %}

### Entering DFU Mode

To enter DFU Mode, it can be a bit fiddly, but once you get the knack of it, it's fairly simple.

Plug your USB cable into the device you will be flashing from and your Cartographer probe, this can be either a seprate Windows PC, Mac, or a Linux machine, or the device you run your 3D Printer off.

Using your ferrous tweezers, or similar use one to bridge pads 1 (boot0), once you have a solid contact on those tap pad 2 (reset) with your other ferrous tool.

<figure><img src="/files/z0OcrylHnR5vMTrZaDAT" alt=""><figcaption></figcaption></figure>

If you have done this correctly, your device should have entered DFU Mode.

To check,

* Linux - follow the following steps
  * SSH in, or load a termanal shell.
  * type `lsusb` in your bash shell, it should list a device in DFU Mode
  * One of the options should be `Bus 001 Device 004: ID 0483:df11 STMicroelectronics STM Device in DFU Mode` - This (as long as you don't have any other devices in DFU Mode) should be your Cartographer Probe in DFU Mode.
* Windows - follow the following steps
  * Start Menu
  * Search and open "Device Manager"
  * Scroll down to Universal Serial Bus Devices
  * You should see STM32 BOOTLOADER as an option\ <img src="/files/DXl8A7J6QysazmUMw9as" alt="Device Manager view of Cartographer in Bootloader mode." data-size="original">
* Mac - TBC

### Flashing via STM32CubeProgrammer (Windows & MacOS)

Download and Install STM32CubeProgrammer from [here](https://www.st.com/en/development-tools/stm32cubeprog.html), I warn you it requires you to sign up for an account.

{% hint style="warning" %}
Version 2.14.0 is recommended due to a known bug in 2.16.0 which causes issues when flashing via STMCubeProgammer - this can be selected from the version 'drop down' on the site.
{% endhint %}

Open the application, and on the RIGHT side, select the following options and press **Connect**.

<figure><img src="/files/PGP0edffQ7fOhxB14JHk" alt=""><figcaption><p>STM32CubeProgrammer Settings</p></figcaption></figure>

Once you have connected, Click Open File - you will need to select both the Katapult Bootloader for your board, and your Cartographer Firmware that you have downloaded.

<figure><img src="/files/aEeXdrK5c8dTVGsIbk1j" alt=""><figcaption><p>Firmwares Loaded</p></figcaption></figure>

For your Cartographer Firmware, you need to set the address to `0x08002000` This provides the 8KiB offset for the firmware. Katapult firmware can be flashed at the default `0x08000000.`

<figure><img src="/files/ihsnfJRmdSPtBAEbsAbL" alt=""><figcaption><p>How to change the address in STM32CubeProgrammer</p></figcaption></figure>

If in doubt about what address to use, please check the relevent tables [here](https://docs.cartographer3d.com/firmware-update)

On each of the firmware's press "Download", starting with Katapult, then with Cartographer.\
\
Now press Disconnect in the TOP RIGHT corner.

If your BLUE LED is Flashing, you have not fully flashed your Firmware, and you should start again, If you now Power Cycle your probe, or simply hit the RESET (2) pads from earlier, your probe should react when it has anything solid metal put under it.

### Flashing via DFU Util (Linux Terminal).

{% embed url="<https://youtu.be/casMZXMRWNs>" %}

SSH into your linux host MCU, ensuring that your Cartographer is plugged in and in DFU Mode.

Navigate into the correct folder, so if you want to update your v2 or v3 run the following command.

```
cd ~/cartographer-klipper/firmware/v2-v3 - Carto with Input Shaper Hybrid
```

Once in the folder, simply check that your probe is still in DFU Mode by running `lsusb`, and if you still get a result stating it is in DFU Mode, run the following command.

```
dfu-util -R -a 0 -s 0x08000000:leave -D firmware.bin
```

NOTE - REPLACE the address (`0x08000000`) with what ever is listed in the [table here](/original-plugin/firmware-archive/manual-methods/firmware-update) for the specific firmware you are using, and rename `firmware.bin` to what ever the firmware file you are using is called.

Example:

```
dfu-util -R -a 0 -s 0x08000000:leave -D Full_Survey_Cartographer_USB_v3.bin
```

Once compelte, it shoudl exit out of DFU mode, and you should be able to find your probe using either CAN or USB.


# Archive


# Katapult

You may want to build your own version of Katapult, currently Katapult doesn't support the stm32f042 at 24mhz.

Download our build of Katapult below.

{% @github-files/github-code-block url="<https://github.com/Cartographer3D/katapult>" %}

### Cartographer v2 and v3 (stm32f042 based probes).

#### USB

The USB version requires the following settings.

<figure><img src="/files/kidPsKgLExjqjXxn8o8D" alt=""><figcaption><p>Katapult settings for USB Cartographer</p></figcaption></figure>

#### CAN

The CAN version requires the following settings.

<figure><img src="/files/QfdWJ4yTn8krFbi31nLZ" alt=""><figcaption><p>Katapult settings for CAN Cartographer</p></figcaption></figure>


# Re-Flashing Firmware

A number of probes unfortunatly shipped miss-flashed with the incorrect firmware, this guide will go through how to re-flash them with the correct firmware.

### Equipment / Parts Required

For this, you will need the following items / tools, though it does vary depending on the configuration you recieved, or if you have any existing equipment.

If you recieved a USB Cable with your order, OR have a USB Cable terminated with a JST-PH connector then continue from **here**

If you happen to have a ST-Link Flasher ([like this](https://www.amazon.com/Sumklin-ST-Link-Emulator-Downloader-Connect/dp/B0CHWKJQYB/ref=sr_1_6?crid=S6B8HWUSRC0Z\&dib=eyJ2IjoiMSJ9.qqFD5Om07FWVxJ7mURnZvPq709MTcuqoA3fE0gXiF_SWEFG9f1NUd634THxfckI76D_hZ3arbsDiW-Db1xTIEOza_to4Idw50g0wqw8NlTEQcTI_alwxI6Vlp09baxGXlMWWQvW8BoursvDtdmAKY7ExUxOwyWdp-R7b-9ekncnwAIKpE0SS1KY7FmNICg4GXiJzwnURM0ze_dw8vLbUXr2P1rsvtNRHpObpiPAhdS4.usA91wnACoc6mryl4h5GOt6De85Z-hRVX8W9dbaCDLc\&dib_tag=se\&keywords=ST+Link\&qid=1710043006\&sprefix=st+l%2Caps%2C874\&sr=8-6)), the process is a bit simpler, to find out more information click [here](/original-plugin/firmware-archive/manual-methods/archive/update-via-stlink)

There are two solutions;

* Method 1 - Modifying a USB cable to connect with the CAN cable
* Method 2 - Create a USB Cable with a JST-PH Connector

**Method 1 Equipment**

* A old USB cable, any old USB2 cable which does data (not a charge only USB-C Cable)
* Your fastener pack that came with your probe
* Your CAN cable
* Some cutters / strippers.
* 1 or 2 Tweezers (or something to bridge the BT0 and RESET pad)

Method 2 Equipment

* A old USB cable, any old USB2 cable which does data (not a charge only USB-C Cable)
* Your fastener pack that came with your probe
* Some cutters / strippers.
* A crimp tool for JST-PH
* 1 or 2 Tweezers (or something to bridge the BT0 and RESET pad)

### Method 1

Step 1 - Cut the end off your donor USB cable

<figure><img src="/files/HoleX7WZVkZx7rRL7fuR" alt=""><figcaption><p>Remove the end of the USB Cable</p></figcaption></figure>

Step 2 - Remove the outer plastic, revealing the 4 pairs of cables

<figure><img src="/files/fapUyi36IpeL29T43VHb" alt=""><figcaption><p>Remove the outer plastic</p></figcaption></figure>

Remove any outer sheilding

<figure><img src="/files/dMyFAH2qCXjMxW8sfCje" alt=""><figcaption></figcaption></figure>

Use your snippers / strippers to expose about 6 - 8 mm at the end of your wires

<figure><img src="/files/y53XeO1D69tbiUtpkXGM" alt=""><figcaption></figcaption></figure>

Step 3 - Feed the exposed wires into the DuPont connectors, and use the right angle DuPont male connectors to plug the cable in and force contact

<figure><img src="/files/SnlmZqx3p3sbrQZ5VXDl" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/gMk6QGyjvmsB07PHF35N" alt=""><figcaption><p>Notice the DuPont 2.54mm RA connectors plugging the cable in.</p></figcaption></figure>

Typically the following cables will be matched with each other

| USB Cable   | CAN Cable      |
| ----------- | -------------- |
| Red - 5v    | Red - 5v       |
| Black - GND | Black - GND    |
| Green (D+)  | Yellow (Can H) |
| White (D-)  | White (Can L)  |

You should be able to connect your USB Cable to your computer now, as the probe will have accidently been flashed with USB Firmware rather than CAN, so if you plug into a Windows PC, you should hear that new device connected chime.

If you plug it into your Pi, or a linux PC it shouild appear under `lsusb` as OpenMoko, and if you recieved your probe in mid-march, and it has the USB firmware on it, if you do:

`ls /dev/serial/by-id/`

It should appear as a serial device there. Any issues, please join our Discord and ping me (RichardTHF) for help and support.

### Method 2

Crimping your own JST-PH - USB cable, this is a useful cable to have, and can be done with the crimps and connector incldued with the probe.

#### Step 1

Cut the end off your donor USB cable. This needs to be a cable which works for data, there seem to be a lot of USB cables which are power only, these will not work.

<figure><img src="/files/HoleX7WZVkZx7rRL7fuR" alt=""><figcaption></figcaption></figure>

#### Step 2

Strip the cable back to reveal the internal cables.

<figure><img src="/files/Um6qxuwM6XIefhc9hUCW" alt=""><figcaption></figcaption></figure>

#### Step 3

Crimp the JST PH connectors onto the cable.

I found this video for how to crimp JST connectors, check it out its very well done.

{% embed url="<https://youtube.com/watch?v=jHfYzrSF4pY>" %}

<figure><img src="/files/ZdS4X1UPpi4KiQbrS6FK" alt=""><figcaption></figcaption></figure>

Step 4 - Rehouse the connector

Notice the order - of the cable and connector.

<figure><img src="/files/npyrEm6X2VfgFoMIUfHZ" alt=""><figcaption><p>Notice the order of the cables.</p></figcaption></figure>

You should be able to connect your USB Cable to your computer now, as the probe will have accidently been flashed with USB Firmware rather than CAN, so if you plug into a Windows PC, you should hear that new device connected chime.

If you plug it into your Pi, or a linux PC it shouild appear under `lsusb` as OpenMoko, and if you recieved your probe in mid-march, and it has the USB firmware on it, if you do:

`ls /dev/serial/by-id/`

It should appear as a serial device there. Any issues, please join our Discord and ping me (RichardTHF) for help and support.

The following method is compatible with MOST Cartographer probes, please check the compatibility chart listed below.

### Firmware

The best place to get the probes firmware is from our [GitHub](https://github.com/Cartographer3D/cartographer-klipper/tree/master/firmware). These have been tested thoroughly, and are known to work perfectly. If you want to find a link to the latest firmware for each of your probes, please check [here](https://docs.cartographer3d.com/firmware-update/which-firmware).

You can also build your own firmware, our GitHub organisation has both a custom build of [Klipper](/) and [Katapult](https://github.com/Cartographer3D/katapult) that you can build yourself.

{% hint style="danger" %}
Untested Firmware could brick your probe - it is advisable if this is the case, you have a STLink handy in order to easily re-flash the probe.
{% endhint %}

### Entering DFU Mode

To enter DFU Mode, it can be a bit fiddly, but once you get the knack of it, it's fairly simple.

Plug your USB cable into the device you will be flashing from and your Cartographer probe, this can be either a seprate Windows PC, Mac, or a Linux machine, or the device you run your 3D Printer off.

Using your ferrous tweezers, or similar use one to bridge pads 1 (boot0), once you have a solid contact on those tap pad 2 (reset) with your other ferrous tool.

<figure><img src="/files/z0OcrylHnR5vMTrZaDAT" alt=""><figcaption></figcaption></figure>

{% embed url="<https://www.youtube.com/watch?v=LFZAsPjAlmY>" %}

If you have done this correctly, your device should have entered DFU Mode.

To check,

* Linux - follow the following steps
  * SSH in, or load a termanal shell.
  * type `lsusb` in your bash shell, it should list a device in DFU Mode
  * One of the options should be `Bus 001 Device 004: ID 0483:df11 STMicroelectronics STM Device in DFU Mode` - This (as long as you don't have any other devices in DFU Mode) should be your Cartographer Probe in DFU Mode.
* Windows - follow the following steps
  * Start Menu
  * Search and open "Device Manager"
  * Scroll down to Universal Serial Bus Devices
  * You should see STM32 BOOTLOADER as an option\ <img src="/files/DXl8A7J6QysazmUMw9as" alt="Device Manager view of Cartographer in Bootloader mode." data-size="original">
* Mac - TBC

### Flashing via STM32CubeProgrammer (Windows & MacOS)

{% embed url="<https://www.youtube.com/watch?v=DvyLR0R_Occ>" %}

Download and Install STM32CubeProgrammer from [here](https://www.st.com/en/development-tools/stm32cubeprog.html), I warn you it requires you to sign up for an account.

{% hint style="warning" %}
Version 2.14.0 is recommended due to a known bug in 2.16.0 which causes issues when flashing via STMCubeProgammer - this can be selected from the version 'drop down' on the site.
{% endhint %}

Open the application, and on the RIGHT side, select the following options and press **Connect**.

<figure><img src="/files/PGP0edffQ7fOhxB14JHk" alt=""><figcaption><p>STM32CubeProgrammer Settings</p></figcaption></figure>

Once you have connected, Click Open File - you will need to select both the Katapult Bootloader for your board, and your Cartographer Firmware that you have downloaded.

<figure><img src="/files/aEeXdrK5c8dTVGsIbk1j" alt=""><figcaption><p>Firmwares Loaded</p></figcaption></figure>

For your Cartographer Firmware, you need to set the address to `0x08002000` This provides the 8KiB offset for the firmware. Katapult firmware can be flashed at the default `0x08000000.`

<figure><img src="/files/ihsnfJRmdSPtBAEbsAbL" alt=""><figcaption><p>How to change the address in STM32CubeProgrammer</p></figcaption></figure>

If in doubt about what address to use, please check the relevent tables [here](https://docs.cartographer3d.com/firmware-update)

On each of the firmware's press "Download", starting with Katapult, then with Cartographer.\
\
Now press Disconnect in the TOP RIGHT corner.

If your BLUE LED is Flashing, you have not fully flashed your Firmware, and you should start again, If you now Power Cycle your probe, or simply hit the RESET (2) pads from earlier, your probe should react when it has anything solid metal put under it.

### Flashing via DFU Util (Linux Terminal).

{% embed url="<https://youtu.be/casMZXMRWNs>" %}

SSH into your linux host MCU, ensuring that your Cartographer is plugged in and in DFU Mode.

Navigate into the correct folder, so if you want to update your v3 run the following command.

```
cd ~/cartographer-klipper/firmware/v3 - Carto with Input Shaper Hybrid
```

Once in the folder, simply check that your probe is still in DFU Mode by running `lsusb`, and if you still get a result stating it is in DFU Mode, run the following command.

```
dfu-util -R -a 0 -s 0x08000000:leave -D firmware.bin
```

NOTE - REPLACE the address (`0x08000000`) with what ever is listed in the table here for the specific firmware you are using, and rename `firmware.bin` to what ever the firmware file you are using is called.

Example:

```
dfu-util -R -a 0 -s 0x08000000:leave -D Full_Cartographer_USB_v3.bin
```

Once compelete, it should exit out of DFU mode, and you should be able to find your probe using either CAN or USB.


# Cartographer (rp2040)

Update or re-flash the firmware on your Cartographer (rp2040) probe

Coming Soon


# DFU / U2F Bootloader Mode

Coming Soon


# Which Firmware?

Guide to flashing your Cartographer probe with new or updated firmware.

Which firmware should I use?

Selecting the correct firwmare is essential for the operation of the probe, please check which probe you have, and which mode it is being used in and cross reference the table below.

### If you have a RP2040 based V1 - [Check Here](/original-plugin/firmware-archive/manual-methods/archive/which-firmware/cartographer-v1-rp2040-based-probe)

### If you have a STM32 based V2 or V3 - [Check Here](/original-plugin/firmware-archive/manual-methods/archive/which-firmware/cartographer-v3-w-input-shaper-usb-can)


# Cartographer v1 (RP2040 based probe)

### Cartographer v1 RP2040

<table><thead><tr><th width="120">Mode</th><th width="177">Firmware</th><th width="95">Link</th><th>Notes</th></tr></thead><tbody><tr><td>USB</td><td>carto-rp2040.uf2</td><td><a href="https://github.com/Cartographer3D/cartographer-klipper/tree/master/firmware/v1">GitHub</a></td><td>Only USB Compatible - No Katapult bootloader required</td></tr></tbody></table>

### Cartographer v2 w/ Input Shaper (USB o


# Cartographer v2 or v3 w/ Input Shaper (USB/CAN)

### Firmware

Cartographer v3 by default will come pre-flashed for CAN. You can switch between both USB and CAN modes via firmware with no hardware modification required.

{% hint style="info" %}
You need to use both a bootloader, and firmware. When updating, it is currently only neccessary to flash the Firmware.
{% endhint %}

Firmware Build 4.0.0 is compatible with both lis2dw and ADXL345 based probes. and is available from the GitHub repository. If you have cloned the firmware down to your Pi, it is already available.

### Bootloaders

Using the correct bootloader is essential for this the probe to work in the correct mode. The bootloader used is Katapult, this also allows for easy updating of your firmware.

<mark style="color:red;">**Note: These files should only be written using**</mark> [<mark style="color:red;">**DFU Mode**</mark>](/original-plugin/firmware-archive/manual-methods/cartographer-with-input-shaper/update-via-dfu-mode) <mark style="color:red;">**or a**</mark> [<mark style="color:red;">**ST-Link**</mark>](/original-plugin/firmware-archive/manual-methods/archive/update-via-stlink)

To navigate to these on your Pi, they are located in the following directory -\
\
`/cartographer-klipper/firmware/v2-v3/`

| Firmware                                                                                                                  | Type                  | Address    | Baudrate | Note                                                             |
| ------------------------------------------------------------------------------------------------------------------------- | --------------------- | ---------- | :------: | ---------------------------------------------------------------- |
| [Katapult\_250k.bin](https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/Katapult_250k.bin) | Bootloader (Katapult) | 0x08000000 |   250K   | This is the Katapult bootloader, do not flash this via Ka        |
| [Katapult\_500k.bin](https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/Katapult_500k.bin) | Bootloader (Katapult) | 0x08000000 |   500K   | This is the Katapult bootloader, do not flash this via Katapult. |
| [Katapult\_1m.bin](https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/Katapult_1m.bin)     | Bootloader (Katapult) | 0x08000000 |    1M    | This is the Katapult bootloader, do not flash this via Katapult. |
| [Katapult\_USB.bin](https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/Katapult_USB.bin)   | Bootloader (Katapult) | 0x08000000 |    USB   | This is the Katapult bootloader, do not flash this via Katapult. |

### Cartographer Firmware

The following firmware files must be flashed at 0x08002000 if using DFU mode, or written directly via Katapult. These will not work without a Bootloader.<br>

To navigate to these on your Pi, they are located in the following directory -\
\
`/cartographer-klipper/firmware/v2-v3/`

<table><thead><tr><th width="269">Firmware</th><th width="75">Type</th><th width="140">Address</th><th width="78" align="center">Baudrate</th><th>Note</th></tr></thead><tbody><tr><td><a href="https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/Cartographer_CAN_250000_8kib_offset.bin">Cartographer_CAN_250000_8kib_offset.bin</a></td><td>Firmware Pre Survey</td><td>0x08002000</td><td align="center">250K</td><td>Firmware Build 4.0.0 - Compatible with ADXL &#x26; lis2dw Hybrid Probes.</td></tr><tr><td><a href="https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/Cartographer_CAN_500000_8kib_offset.bin">Cartographer_CAN_500000_8kib_offset.bin</a></td><td>Firmware Pre Survey</td><td>0x08002000</td><td align="center">500K</td><td>Firmware Build 4.0.0 - Compatible with ADXL &#x26; lis2dw Hybrid Probes.</td></tr><tr><td><a href="https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/Cartographer_CAN_1000000_8kib_offset.bin">Cartographer_CAN_1000000_8kib_offset.bin</a></td><td>Firmware Pre Survey</td><td>0x08002000</td><td align="center">1M</td><td>Firmware Build 4.0.0 - Compatible with ADXL &#x26; lis2dw Hybrid Probes.</td></tr><tr><td><a href="https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/Cartographer_USB_4_0_0_8kib_offset.bin">Cartographer_USB_4_0_0_8kib_offset.bin</a></td><td>Firmware Pre Survey</td><td>0x08002000</td><td align="center">USB</td><td>Firmware Build 4.0.0 - Compatible with ADXL &#x26; lis2dw Hybrid Probes.</td></tr><tr><td><a href="https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/survey/Survey_Cartographer_CAN_250000_8kib_offset.bin">Survey_Cartographer_CAN_250000_8kib_offset.bin</a></td><td>Survey Firmware</td><td>0x08002000</td><td align="center">250k</td><td>Cartographer Survey Firmware (uses scanner.py)</td></tr><tr><td><a href="https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/survey/Survey_Cartographer_CAN_500000_8kib_offset.bin">Survey_Cartographer_CAN_500000_8kib_offset.bin</a></td><td>Survey Firmware</td><td>0x08002000</td><td align="center">500k</td><td>Cartographer Survey Firmware (uses scanner.py)</td></tr><tr><td><a href="https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/survey/Survey_Cartographer_CAN_1000000_8kib_offset.bin">Survey_Cartographer_CAN_1000000_8kib_offset.bin</a></td><td>Survey Firmware</td><td>0x08002000</td><td align="center">1M</td><td>Cartographer Survey Firmware (uses scanner.py)</td></tr><tr><td><a href="https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/survey/Survey_Cartographer_USB_8kib_offset.bin">Survey_Cartographer_USB_8kib_offset.bin</a></td><td>Survey Firmware</td><td>0x08002000</td><td align="center">USB</td><td>Cartographer Survey Firmware (uses scanner.py)</td></tr></tbody></table>

###

### Combined Firmwares

These firmware files contain both the Katapult Bootloader, and Cartographer Firmware.\
\
These WILL NOT work if they are flashed via Katapult mode, please either use [STLink ](/original-plugin/firmware-archive/manual-methods/archive/update-via-stlink)or [DFU Mode](/original-plugin/firmware-archive/manual-methods/cartographer-with-input-shaper/update-via-dfu-mode).\
\
To navigate to these on your Pi, they are located in the following directory -\
\
`/cartographer-klipper/firmware/v2-v3/combined-firmware`

<table><thead><tr><th>Firmware</th><th width="149">Type</th><th width="155">Address</th><th align="center">Baudrate</th><th>Note</th></tr></thead><tbody><tr><td><a href="https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/combined-firmware/Full_Cartographer_CAN_1M_4_0_1.bin">Full_Cartographer_CAN_1M_4_0_1.bin</a></td><td>Katapult Bootloader + Cartographer Firmware.</td><td>0x08000000</td><td align="center">1M</td><td>Firmware Build 4.0.0 - Compatible with ADXL &#x26; lis2dw Hybrid Probes.</td></tr><tr><td><a href="https://github.com/Cartographer3D/cartographer-klipper/blob/master/firmware/v2-v3/combined-firmware/Full_Cartographer_USB_4_0_0.bin">Full_Cartographer_USB_4_0_0.bin</a></td><td>Katapult Bootloader + Cartographer Firmware.</td><td>0x08000000</td><td align="center">USB</td><td>Firmware Build 4.0.0 - Compatible with ADXL &#x26; lis2dw Hybrid Probes.</td></tr></tbody></table>


# Old Firmware

#### USB / CAN Version (for Klipper pre-version v0.12.0-85)

[Link to folder with Firmware](https://github.com/Cartographer3D/cartographer-klipper/tree/master/firmware/v3/for%20Klipper%20older%20than%20v0-12-0-85)

<table><thead><tr><th width="235">Firmware</th><th width="125">Type</th><th width="137">Address</th><th width="105" align="center">Baudrate</th><th>Note</th></tr></thead><tbody><tr><td>Full_Cartographer_USB_v3.bin</td><td>Bootloader &#x26; Firmware Combined</td><td>0x08000000</td><td align="center">USB</td><td>This is the only firmware you need, you don't need to flash the bootloader or firmware seperately.<br><br><strong>DO NOT FLASH VIA KATAPULT.</strong></td></tr><tr><td>Full_Cartographer_CAN_1M_v3.bin</td><td>Bootloader &#x26; Firmware Combined</td><td>0x08000000</td><td align="center">1M</td><td>This is the only firmware you need, you don't need to flash the bootloader or firmware seperately.<br><br><strong>DO NOT FLASH VIA KATAPULT.</strong></td></tr><tr><td>Katapult_250k_withSwitch.bin</td><td>Bootloader (Katapult)</td><td>0x08000000</td><td align="center">250K</td><td>This is the Katapult bootloader, do not flash this via Katapult.</td></tr><tr><td>Katapult_500k_withSwitch.bin</td><td>Bootloader (Katapult)</td><td>0x08000000</td><td align="center">500K</td><td>This is the Katapult bootloader, do not flash this via Katapult.</td></tr><tr><td>Katapult_USB.bin</td><td>Bootloader (Katapult)</td><td>0x08000000</td><td align="center">USB</td><td>This is the Katapult bootloader, do not flash this via Katapult.</td></tr><tr><td>Cartographer_CAN_250000_8kib_offset.bin</td><td>Firmware (Klipper)</td><td>0x08002000</td><td align="center">250K</td><td>8KiB Offset required, so needs ot 0x08002000</td></tr><tr><td>Cartographer_CAN_500000_8kib_offset.bin</td><td>Firmware (Klipper)</td><td>0x08002000</td><td align="center">500K</td><td>8KiB Offset required, so needs ot 0x08002000</td></tr><tr><td>Cartographer_CAN_1000000_8kib_offset.bin</td><td>Firmware (Klipper)</td><td>0x08002000</td><td align="center">1M</td><td>8KiB Offset required, so needs ot 0x08002000</td></tr><tr><td>Cartographer_USB_v3_8kib_offset.bin</td><td>Firmware (Klipper)</td><td>0x08002000</td><td align="center">USB</td><td>8KiB Offset required, so needs ot 0x08002000</td></tr></tbody></table>

#### USB / CAN Version (for Klipper pre-version v0.12.0-85 and later)

[Link to folder with Firmware](https://github.com/Cartographer3D/cartographer-klipper/tree/master/firmware/v3)

<table><thead><tr><th>Firmware</th><th width="125">Type</th><th width="137">Address</th><th width="105" align="center">Baudrate</th><th>Note</th></tr></thead><tbody><tr><td>Full_Cartographer_USB_v3.bin</td><td>Bootloader &#x26; Firmware Combined</td><td>0x08000000</td><td align="center">USB</td><td>This is the only firmware you need, you don't need to flash the bootloader or firmware seperately.<br><br><strong>DO NOT FLASH VIA KATAPULT.</strong></td></tr><tr><td>Full_Cartographer_CAN_1M_v3.bin</td><td>Bootloader &#x26; Firmware Combined</td><td>0x08000000</td><td align="center">1M</td><td>This is the only firmware you need, you don't need to flash the bootloader or firmware seperately.<br><br><strong>DO NOT FLASH VIA KATAPULT.</strong></td></tr><tr><td>Katapult_250k_withSwitch.bin</td><td>Bootloader (Katapult)</td><td>0x08000000</td><td align="center">250K</td><td>This is the Katapult bootloader, do not flash this via Katapult.</td></tr><tr><td>Katapult_500k_withSwitch.bin</td><td>Bootloader (Katapult)</td><td>0x08000000</td><td align="center">500K</td><td>This is the Katapult bootloader, do not flash this via Katapult.</td></tr><tr><td>Katapult_USB.bin</td><td>Bootloader (Katapult)</td><td>0x08000000</td><td align="center">USB</td><td>This is the Katapult bootloader, do not flash this via Katapult.</td></tr><tr><td>Katapult_1m_withSwitch.bin</td><td>Bootloader (Katapult)</td><td>0x08000000</td><td align="center">1M</td><td>This is the Katapult bootloader, do not flash this via Katapult.</td></tr><tr><td>Cartographer_CAN_250000_8kib_offset.bin</td><td>Firmware (Klipper)</td><td>0x08002000</td><td align="center">250K</td><td>8KiB Offset required, so needs ot 0x08002000</td></tr><tr><td>Cartographer_CAN_500000_8kib_offset.bin</td><td>Firmware (Klipper)</td><td>0x08002000</td><td align="center">500K</td><td>8KiB Offset required, so needs ot 0x08002000</td></tr><tr><td>Cartographer_CAN_1000000_8kib_offset.bin</td><td>Firmware (Klipper)</td><td>0x08002000</td><td align="center">1M</td><td>8KiB Offset required, so needs ot 0x08002000</td></tr><tr><td>Cartographer_USB_v3_8kib_offset.bin</td><td>Firmware (Klipper)</td><td>0x08002000</td><td align="center">USB</td><td>8KiB Offset required, so needs ot 0x08002000</td></tr></tbody></table>


# Update via STLink

Flashing via a STLink is super simple, and requires a STLink v2 (or similar). Unfortunatly you cannot use a standard TTL-USB adaptor.

This method only works on V2 and V3 probes with the STLink connection points next to the USB Port.

{% hint style="info" %}
I have only personally tested this on a ST-LINK/V2 Mini with modern firmware on it - some older V2's will not work with STM32CubeProgrammer.
{% endhint %}

### Step 1 - Wiring

Wiring is super simple (diagram will be added soon), connect the following to each other

<figure><img src="/files/Q88j1XUKc7wSv4PxLzoz" alt="" width="188"><figcaption></figcaption></figure>

| ST-LINK/V2 | Cartographer v2 / v3 | Notes                                                                                          |
| ---------- | -------------------- | ---------------------------------------------------------------------------------------------- |
| 3.3v       | 5v                   | 5v-5v will work, but seems less reliable, could have been my ST-LINK, but 3.3v works perfectly |
| GND        | GND                  |                                                                                                |
| SWDIO      | SWD                  |                                                                                                |
| SWCLK      | SCL                  |                                                                                                |

### Flashing via STM32CubeProgrammer (Windows & MacOS)

Download and Install STM32CubeProgrammer from [here](https://www.st.com/en/development-tools/stm32cubeprog.html), I warn you it requires you to sign up for an account.

{% hint style="warning" %}
Version 2.14.0 is recommended due to a known bug in 2.16.0 which causes issues when flashing via STMCubeProgammer - this can be selected from the version 'drop down' on the site.
{% endhint %}

Open the STMCubeProgrammer, and on the RIGHT side, select select STLink from the drop down menu and press **Connect**.

<figure><img src="/files/K92Xh5QtgkdoxzhVTEHK" alt=""><figcaption></figcaption></figure>

Once you have connected, Click Open File - you will need to select both the Katapult Bootloader for your board, and your Cartographer Firmware that you have downloaded.

<figure><img src="/files/aEeXdrK5c8dTVGsIbk1j" alt=""><figcaption><p>Firmwares Loaded (Note same screenshots used for USB version, yours will say STLink on ther right)</p></figcaption></figure>

For your Cartographer Firmware, you need to set the address to `0x08002000` This provides the 8KiB offset for the firmware. Katapult firmware can be flashed at the default `0x08000000.`

<figure><img src="/files/ihsnfJRmdSPtBAEbsAbL" alt=""><figcaption><p>How to change the address in STM32CubeProgrammer (Note same screenshots used for USB version, yours will say STLink on ther right)</p></figcaption></figure>

If in doubt about what address to use, please check the relevent tables [here](https://docs.cartographer3d.com/firmware-update)

On each of the firmware's press "Download", starting with Katapult, then with Cartographer.\
\
Now press Disconnect in the TOP RIGHT corner.

If your BLUE LED is Flashing, you have not fully flashed your Firmware, and you should start again, If you now Power Cycle your probe, or simply hit the RESET (2) pads from earlier, your probe should react when it has anything solid metal put under it.


