Skip to main content

Site Navigation

Your Account

Choose Language

Test and calibrate a Z probe

Static test of the Z probe

Static test using the web interface

  • Apply power to the printer.
  • Connect to the printer from a browser.
  • If the probe needs to be deployed before use (e.g. BLTouch), test the deploy and retract functions, by sending M401 to deploy the probe and M402 to retract it.
  • With the Z probe deployed (if applicable) but not close enough to the bed to trigger it, check that the Z probe reading in Duet Web Control is zero or close to zero.
  • If your Z probe is of a type that produces a continuous output when triggered (for example IR, inductive, capacitive and switch-type probes), hold a surface below the Z probe to cause it to trigger (or jog the nozzle towards the bed until it is close enough to trigger). Check that the Z probe reading in DWC is correct (about 537 for the Mini Differential IR probe, and about 1000 for most other types).
  • If your Z probe produces a short pulse when it triggers (e.g. Smart Effector, Precision Piezo, FSRs with John SL board, BLTouch) then the pulse will probably be too short for you to see. Proceed to the dynamic test.

Static test using Panel Due or a USB connection

As above, but either monitor the Z probe reading in PanelDue if you have one, or send G31 via USB every time you want to read it.

Dynamic test

  • Apply power to the printer.
  • Connect to the printer from a browser or via USB.
  • If your printer is Cartesian or CoreXY, home X and Y. If it is a Delta, home all.
  • Position the print head well above the bed.
  • Send command G30 to do a single Z probe. This will deploy the probe (if applicable) and start the head descending or the bed rising.
  • Hold a suitable surface below the print head to trigger the Z probe. The probe should trigger and the Z movement should stop.
  • If the Z movement doesn't stop, turn off power to the printer before the head crashes into the bed.

Calibrate the Z probe trigger height

  1. Make sure the dynamic test is successful (Z probe stops when it senses the bed) before doing this.
  2. Use the X and Y jog buttons to position the nozzle over the centre of the bed
  3. Jog the nozzle down until it is just touching the bed or just gripping a sheet of paper. If the firmware doesn't let you jog it down far enough, send M564 S0 to disable axis limits.
  4. Once you have the nozzle touching the bed, send command G92 Z0 to tell the firmware that the head is at Z=0
  5. Jog the head up by 5 to 10mm
  6. Send command G30 S-1. The nozzle will descend or the bed rise until the probe triggers and the Z height at which the probe stopped will be reported. If you are using a nozzle-contact Z probe, the trigger height will be slightly negative. For any other type of Z probe where the probe triggers before the nozzle contacts the bed, it will be positive.
  7. Repeat from step 5 two or three times to make sure that the trigger height is consistent.
  8. In Duet Web Control, go to Settings -> System Editor and edit the config.g file. Set the Z parameter in the G31 command to the trigger height that was reported. Save the file.
  9. Open config-override.g and check that there are no G31 commands in it. If you find any, delete those lines and save the file.
  10. To apply the new trigger height, restart the Duet by sending M999 or pressing Emergency Stop.

Measuring Probe X Y Offset

  • The firmware needs to know the position of the probe in relation to the tool. In most cases, the nozzle tip.
  • If your probe uses the nozzle tip, the X Y offset would be G31 X0 Y0.
  • If you have access to the CAD files for your probe mount you may already know the probe X Y offset, or it may have been provided to you with the parts.
  • Otherwise, you will need to measure the distance between probe and nozzle.

Here is an easy way to measure the offset:

  1. Tape down a piece of paper onto the bed.
  2. Bring the nozzle down to the bed surface and lower it until the nozzle starts to depress into the paper, making a small impression.
  3. Mark the impression with a marker tip to make it more visible.
  4. Now jog X and Y until the probe is directly over the spot where the nozzle was.
  5. Take the amount you jogged as your X and Y offset to use in G31.

Note that the offsets will follow the right hand coordinate system, meaning that X movement to the left of the nozzle will be negative, and right of the nozzle will be positive. And Y movement behind the nozzle will be positive, and movement in front of the nozzle will be negative.

More information on Z Probes

BL Touch

There is detailed information here:

Connecting a BL Touch.

Also has a very detailed tutorial on using a BL touch, including how to setup bed leveling an bed compensation here:


In the Calibrate Z probe trigger height bullet point 7, you misspelled probe twice. In bullet point 9, you left out a “o” in the sentence “Set the Z parameter in the G31 command t(o) the trigger height that was reported. This method is a whole lot easier than the way I have been calibrating it. Wish I had asked someone.

Vance Howard - Reply

Thanks, I have updated it.

Tony -

Thanks for this - it is so helpful, and I hope this can help to make it even more helpful:

With instructions like “make sure condition X is true,” it’s important to have instructions for both outcomes, i.e. “''If X is true, continue with next steps, otherwise, you need to re-boink the dinglehopper and try again''.”

I’m currently unable to proceed beyond Step 8 of Calibrate the Z probe trigger height, which instructs readers to “make sure that the trigger height is consistent.”

In my case, it’s not consistent. The reported Z height when the probe stops keeps increasing by 0.01 on each and every iteration. Unfortunately, there is no mention of what anyone should do at this point —

Is the 0.01 increase acceptable? If not, is there something I can try to prevent it, or am I SOL and need to return the probe (dc42 mini differential IR sensor)?

Alan Smile - Reply

Alan Smile

I To had the very same thing going on and it turned out that I had missed the (-) in the G30 S-1.

I re entered it correctly and it reads as its supposed to now without increasing 1 every time .

Hope that helps am a noob at this

Tony - Reply

I found this much more helpful to calibrate the probe height.

Mesh bed compensation

Checking the trigger height

The Z probe trigger height must not vary significantly with XY position. Measure the trigger height of your Z probe at various XY positions and make sure it is consistent. To measure the trigger height:

Make sure there is no filament stuck to the nozzle (you may want to do this test with the nozzle hot)

Cancel any existing bed compensation by sending M561

Send M208 S1 Z-3 to temporarily allow Z moves down to Z=-3mm. This is to ensure that you can lower the nozzle all the way to the bed in step 5.

Command the print head to the coordinates you want to probe. To probe the center, send G1 Z1.

Command the print head down in small steps until the nozzle just touches the bed or just grips a sheet of paper. You may need to send M564 S0 to allow movement lower than where the firmware thinks Z=0 is. You may also wish to create a macro to lower the head by e.g. 0.02mm to get greater accuracy (G91 followed by G1 Z-0.02).

Send G92 Z0 to define that height as Z=0

Command the nozzle up 5mm (G1 Z5)

Send G30 S-1 to probe the bed without resetting the Z=0 position

Read off the Z height from the web interface. That is the trigger height.

Repeat the previous two steps a couple of times to make sure you are getting a consistent result

Repeat steps 4-10 for the other XY positions you want to check.

On a delta printer, it can be quite hard to achieve a consistent trigger height. Z probes that are mounted on the effector are sensitive to any tilting of the effector, because it affects the relative heights of the Z probe and the nozzle. You can reduce this effect by mounting the probe as close to the nozzle as possible. Probing solutions that use the nozzle itself as the probe are usually not affected by effector tilt, but some types are sensitive to the XY position of the nozzle for other reasons.

Once you are satisfied with your trigger height result (should be between 0 and 1mm, depending on your printer), open your config.g file (this can be found in your DuetWebControl), find the G31 command and enter your trigger height as a negative value in the Z parameter (ex. G31 X0 Y0 Z-.43).

Max Nippard - Reply

Add Comment

View Statistics:

Past 24 Hours: 63

Past 7 Days: 418

Past 30 Days: 1,741

All Time: 22,069