8730763008_2663df7782_z.jpg

Hardware requirements:

You will need a probe switch attached to the machine's actuator, or a bed able to trigger an end stop input when the hotend touches it. (FSRs or another method)

The SD CARD must be unmounted from the host before doing any zprobes

Probing is delicate. If the host accesses the SD card while the probing is going on, which it does by itself even if you don't tell it to, unless the card is unmounted, the probe results will be wrong, or worse the probe may even crash into the bed.

Always unmount from the computer before doing Zprobes.

Configuration

Add the following to the config file :

gamma_min_endstop            nc                 # normally 1.28. Change to nc to prevent conflict, not needed on Azteeg X5

zprobe.enable                true               # set to true to enable a zprobe
zprobe.probe_pin             1.28!^             # pin probe is attached to if NC remove the !, Azteeg X5 this is 1.29
zprobe.slow_feedrate         5                  # mm/sec probe feed rate
#zprobe.debounce_count       100                # set if noisy
zprobe.fast_feedrate         100                # move feedrate
zprobe.probe_height          5                  # how much above bed to start probe NB only needed for G32 on delta
zprobe.return_feedrate       0                  # feedrate after a probe, default 0 is double of slow_feedrate (mm/s)

NOTE the slow_feedrate is the speed the probe moves down to find the bed, it returns (probe up) at 2*slow_feedrate or return_feedrate. fast_feedrate is only used for any XY moves done during probing.

G30 will probe from the current position until it hits the bed and the probe triggers, it will report the distance traveled then return to where it started.

G30 Znnn will probe until it hits the bed then sets Z to nnn, this can be used to set the nozzle height if nnn is the probes Z offset from the nozzle in the Z direction. NOTE this is NOT supported for deltas, use on Cartesians only.

G30 Fxxx will run the probe at xxx mm/min overriding the slow_feedrate.

G38.2 and G38.3 are also implemented as documented here

If there are multiple levelling strategies selected the Pn parameter will select which one to send leveling codes to, 0 being the first defined one, 1 the second and so on. eg G29 P1 will send G29 to the second defined levelling strategy.

There are several M670 parameters that can set different settings for zprobe overriding the config settings, these are all saved with M500

M670 S0.50 K2.00 R2.5 Set Probe feedrates slow/fast/return (mm/sec)
M670 Z200.00 Set Probe max_z (mm)
M670 H2.00 Set Probe height (mm)
M670 I1 Temporarily invert the sense of the probe pin (Not saved with M500)

Leveling strategies

If a leveling-strategy.xxx.enable is set to true this enables one of the bed leveling strategies described below.

All options

Option Example value Explanation
zprobe.enable false Set to true to enable the Z-probe module. This is used to scan surfaces, and to calibrate parameters and compensate for non-planar surfaces.
zprobe.probe_pin 1.28!^ Pin the probe is connected to.
zprobe.slow_feedrate 5 Speed in millimetres/second at which the probe seeks a surface.
zprobe.fast_feedrate 100 Speed in millimetres/second at which the probe does fast moves.
zprobe.return_feedrate 50 Speed in millimetres/second at which the probe does the return after a probe.
zprobe.debounce_count 100 Debounce the probe pin over this number of values. Set to 100 if your probe is too noisy and give false readings.
zprobe.probe_height 5 Distance above the bed at which the probing is started, once the bed's height is known.

Leveling strategy options

Option Example value Explanation
leveling-strategy.three-point-leveling.enable true Set to true to enable the leveling strategy that probes three points to define a plane and then keeps the Z parallel to that plane. This is useful if your Z plate/bed is not perfectly aligned with your XY gantry
leveling-strategy.three-point-leveling.point1 100.0,0.0 The first probe point (X, Y)
leveling-strategy.three-point-leveling.point2 200.0,200.0 The second probe point (X, Y)
leveling-strategy.three-point-leveling.point3 0.0,200.0 The third probe point (X, Y)
leveling-strategy.three-point-leveling.home_first true Home the X and Y axes before probing
leveling-strategy.three-point-leveling.tolerance 0.03 The probe tolerance in millimetres, anything less that this will be ignored, default is 0.03mm
leveling-strategy.three-point-leveling.probe_offsets 0,0,0 The probe offset from nozzle, must be X,Y,Z, default is no offset. This is used if your nozzle is not exactly at the same position as where your tool would be.
leveling-strategy.three-point-leveling.save_plane false Set to true to allow the bed plane to be saved with M500, default is false
leveling-strategy.delta-calibration.enable true Set to true to enable the delta calibration levelling strategy. This uses the probe to figure out the plane's tilt and arm's radius in a delta machine
leveling-strategy.delta-calibration.radius 100 Radius at which to probe the three points
leveling-strategy.delta-calibration.initial_height 10 the initial height above the bed we stop the initial move down after home to find the bed. This should be a height that is enough that the probe will not hit the bed and is an offset from gamma_max (can be set to 0 if gamma_max takes into account the probe offset)

Delta calibration

NOTE

This calibrates the endstops and delta radius only, it is designed to be run once and done, no need to run it before each print. Just run it and save the results. It does not set the Z height, that can be done in several different ways as described later.

Make sure the the config has delta_homing true set.

Also in the config set :

leveling-strategy.delta-calibration.enable   true            # basic delta calibration
leveling-strategy.delta-calibration.radius   100             # the probe radius
#the initial height above the bed we stop the intial move down after home to find the bed
#this should be a height that is enough that the probe will not hit the bed and is an offset from gamma_max (can be set to 0 if gamma_max takes into account the probe offset)
leveling-strategy.delta-calibration.initial_height 10 # height above bed to stop initial move

Radius

Note that leveling-strategy.delta-calibration.radius should optimally be set such that the probe points are on the circumference of a circle that is equidistant from the center of the bed to the towers.

This minimizes the affect one endstop has on the others when adjusted.

This will usually put the probe points close to the edge of the glass bed.

Calibration routine

Issuing the G32 command will run the full calibration sequence automatically.

It will cycle several times to converge on a good result.

If the result is good use M500 to save the M666 settings.

What will happen is it will home the probe down to find the bed, then home again then move down to 5mm above the bed (or whatever you set zprobe.probe_height to).

Then it will probe the three towers at the specified leveling-strategy.delta-calibration.radius from the center, and will print out the results, it will set the endstop trims and home, this will repeat 3-4 times, each time the difference between the three probes should get smaller, once it has completed 4 probes or the difference is under 0.03mm it will home one last time then probe the three points to confirm the calibration, then probe the center.

It will also adjust the delta radius (M665 Rnnn) to get the center the same height as the outside points.

Use

These are the different ways to use the calibration routine : 

G29 will probe the seven points on your bed, you can use this to see how well the bed is leveled.
G29.1 will probe the seven points on your bed,and output the data that can be fed into some offline least errors scripts to adjust tower offsets
G32 Does the full calibration sequence, endstop and delta radius
G32 R0 Will only do delta radius calibration
G32 E0 Will only do endstop calibration
G32 I0.02 Will set the target to within 0.02mm
G32 K0 Will keep the current endstop trim settings and check them, without K the trims are cleared to zero and a full calibration is performed
G32 J110.0 will set the probe radius to 110.0 mm for this session

Z height

You will need to set the z height after calibration using one of the several methods available mentioned here [http://smoothieware.org/delta]

Offsets

There are NO probe offsets for delta calibration, so the probe should be within 10-20mm of the nozzle. This is by design as the calibration works solely on relative positions.

To be clear : there are no offsets in Smoothie, and they would not be useful as calibration is relative. This can be confusing to Marlin users. Just use it and you'll see.

If you are getting the Calibration failed to complete error it usually means you need to increase the
leveling-strategy.delta-calibration.initial_height config setting to a bigger value, try 10 or 20 or bigger.

See http://minow.blogspot.com/ for more details of calibrating a delta.


Delta Grid Compensation

Probes delta_grid.size points in X and Y (total probes size * size) and stores the relative offsets from the 0,0 Z height.
When enabled every move will calculate the Z offset based on interpolating the height offset within the grids nearest 4 points.
Should be used in conjunction with the delta calibration strategy above. First calibrate with G32 then if needed do G31 to set the grid compensation.
NOTE The delta-grid.radius specified should be at least as big as the largest X,Y position likely to be moved to. It gets very inaccurate if you try to print outside of the radius you specified.

Configuration

The strategy must be enabled in the config as well as zprobe.

leveling-strategy.delta-grid.enable         true

The radius of the bed must be specified with…

leveling-strategy.delta-grid.radius        50

this needs to be at least as big as the maximum printing radius as moves outside of this will not be compensated for correctly

The size of the grid can be set with…

leveling-strategy.delta-grid.size        7

this is the X and Y size of the grid, it must be an odd number, the default is 7 which is 49 probe points

Optionally probe offsets from the nozzle or tool head can be defined with…

leveling-strategy.delta-grid.probe_offsets  0,0,0  # probe offsetrs x,y,z

they may also be set with M565 X0 Y0 Z0. NOTE setting probe offsets will make the grid less effective the further the probe is from the head, this is especially true if you are using it to correct geometry errors, as they depend on the actuator position not the head position. So having a probe offset from the head will try to compensate for errors which are offset from where the head actually is. There is no easy way to overcome this other than have the probe as close to the nozzle as possible.

If the saved grid is to be loaded on boot then this must be set in the config…

leveling-strategy.delta-grid.save        true

Then when M500 is issued it will save M375 which will cause the grid to be loaded on boot. The default is to not autoload the grid on boot. NOTE the grid size and the radius is saved in the file, and restored when it is loaded with M375. If the grid size is different from the one in config it will NOT load. If the radius is different, then the radius will be set to whatever was saved overriding the one set in config.

Optionally an initial_height can be set that tell the initial probe where to stop the fast decent before it probes, this should be around 5-10mm above the bed

leveling-strategy.delta-grid.initial_height  10

Usage

G29 test probes in a grid pattern within the radius producing a map of offsets, this can be imported into a graphing program to visualize the bed (NOTE if delta calibration is also enabled then this is executed with G29 P1). optional parameters In sets the number of points to the value n, Jn sets the radius for this probe.
G29.1 test probes in a spiral pattern within the radius producing a map of offsets, this can be imported into a graphing program to visualize the bed heights (NOTE if delta calibration is also enabled then this is executed with G29 P1). optional parameters In sets the number of points to the value n, Jn sets the radius for this probe.
G31 probes the grid and turns the compensation on, this will remain in effect until reset or M561/M370 optional parameters Jn sets the radius for this probe.
M370 clears the grid and turns off compensation
M374 Save grid to /sd/delta.grid
M374.1 delete /sd/delta.grid
M375 Load the grid from /sd/delta.grid and enable compensation
M375.1 display the current grid
M561 clears the grid and turns off compensation
M565 defines the probe offsets from the nozzle or tool head
M500 saves the probe points
M503 displays the current settings

Three point platform compensation for Cartesians

Also incorrectly called bed leveling.

DO NOT USE ON DELTAS

It just won't work. Use the delta-specific strategy above.

the following third party user guide is helpful : 

However note it is NOT recommended to automate the probe sequence in your gcode as suggested in that post.

3-point.svg

Summary

Probes three user specified points on the bed and determines the plane of the bed relative to the probe.

As the head moves in X and Y it will adjust Z to keep the head tram with the bed.

NOTE The probe does not set the bed height, the probes find the relative level of the bed based on the first probe point, so after you have defined the bed plane with G32, you then set the bed height at the first probe point and use M206 or M306 to set the homing offset. Once saved you do not need to do zprobe or bed height again. In this case it is best to have a Z endstop as well as the ZProbe. the Z endstop is used to set the bed height after the probe.
This is different to other Firmware and is deliberate. This allows people to use temporary Z probes and not have a permanent z probe or know the exact Z offset of the probe in relation to the nozzle.

Configuration

The strategy must be enabled in the config as well as zprobe.

leveling-strategy.three-point-leveling.enable         true

Three probe points must be defined, these are best if they are the three points of an equilateral triangle, as far apart as possible.
They can be defined in the config file as:-

leveling-strategy.three-point-leveling.point1         100.0,0.0   # the first probe point (x,y)
leveling-strategy.three-point-leveling.point2         200.0,200.0 # the second probe point (x,y)
leveling-strategy.three-point-leveling.point3         0.0,200.0   # the third probe point (x,y)

Or they may be defined (and saved with M500) using M557 P0 X30 Y40.5 where P is 0,1,2

Probe offsets from the nozzle or tool head can be defined with :

leveling-strategy.three-point-leveling.probe_offsets  0,0,0  # probe offsets x,y,z

They may also be set with M565 X0 Y0 Z0

To force homing in X and Y before G32 does the probe the following can be set in config, this is the default

leveling-strategy.three-point-leveling.home_first    true   # disable by setting to false

The probe tolerance can be set using the config

leveling-strategy.three-point-leveling.tolerance   0.03    # the probe tolerance in mm, default is 0.03mm

You can save the bed plane so it can be used again without probing again presuming the bed stays flat etc. to do this you must enable the feature

leveling-strategy.three-point-leveling.save_plane   true    #

For this to be effective you must do your Z home to the first probe point defined when creating the plane. Set the Z height to zero at the first probe point,
then the bed plane should be relative from that point on. You save it with M500, although it will not display with M503 as it is not a user settable function.

A nice guide is here. http://reprapme.com/2015/07/z-probing/ although use of an automatic probe deploy is entirely optional, and running a probe every print is also not the recommended way to use this, it is preferable to probe once and save the results, no more probes are required unless something changes on your bed.

Usage

The machine must be homed in X and Y before running the probe.
If you need to set the bed height after probing you must set the height at the first probe point, and save it with homing offsets. (M206 or M306)

G29 probes the three probe points and reports the Z at each point, if a plane is active it will be used to level the probe.
G32 Probes the three probe points and defines the bed plane, this will remain in effect until reset or M561
G31 Reports the status
M557 Defines the probe points
M561 Clears the plane and the bed leveling is disabled until G32 is run again
M565 Defines the probe offsets from the nozzle or tool head
M500 Saves the probe points and the probe offsets
M503 Displays the current settings

Example use :

    G28 (Home XYZ)
    Move Z up to about 30mm and attach probe
    G32
    remove probe.
    M500 (to save probe results)
    Move to the Probe P0 point (first probe point)
    jog down to touch the plate
    M306 Z0
    M500 (to save homing offset)
    G28
    Move to 0,0 check Z height
    Move to P0 check z height ditto for P1 and P2

ZGrid level compensation for Morgans (or multipoint bilinear bed leveling)

NOTE It is fully functional and tested on Morgan machines only.

NOTE this currently does not work on Deltas (use DeltaGrid) and is not well tested on Cartesians. If you want to use it on those platforms please report any problems in the Github issue tracker with a subject [ZGrid] problem summary (Where problem summary is replaced with a summary of your problem).

Summary

Probes a grid of user specified number of points on the bed and populates a data array of offsets to be used with a bilinear offset calculation.

As the head moves in X and Y it will adjust Z to keep the head tracking the bed surface.

Configuration

The strategy must be enabled in the config as well as zprobe.

leveling-strategy.ZGrid-leveling.enable         true

The bed size limits must be defined, in order for the module to calculate the calibration points

leveling-strategy.ZGrid-leveling.bed_x           200
leveling-strategy.ZGrid-leveling.bed_y           200

Also ensure that the max Z is defined and valid for the machine (Gamma end stop section)

gamma_max                                    200              #

The number of divisions for X and Y should be defined

leveling-strategy.ZGrid-leveling.rows           7          # X divisions (Default 5)
leveling-strategy.ZGrid-leveling.cols           9          # Y divisions (Default 5)

The probe offset should be defined, default to zero offset

leveling-strategy.ZGrid-leveling.probe_offsets  0,0,16.3

slow feedrate can be defined for probe speed

leveling-strategy.ZGrid-leveling.slow_feedrate  100

Usage

The machine will home automatically when running the probe.
The machine will then position the head in the center of the defined space for probe attachment (if required)
When ready, trigger the probe manually to start the probe run.

G32 Probes the probe points and defines the bed ZGrid, this will remain in effect until reset or M370
G31 Reports the status and displays grid data
M370 clears the ZGrid and the bed leveling is disabled until G32 is run again
M370 X7 Y9 Overrides config grid size and allocates a new grid size of 7x9 and clears as above
M371 Moves the head to the next calibration position without saving for manual calibration
M372 Moves the head to the next calibration position after saving the current probe point to memory - manual calibration
M373 Completes manual calibration and enables the Z compensation grid
M374 Saves the grid to a file on the SD card (ZGrid). This file contains the grid size, and Z-offset so that the system can recall the exact position. Ensure that the M306 Z calibration is performed before saving the grid.
M375 Recall the saved grid file from the SD card
M565 Defines the probe offsets from the nozzle or tool head
M500 Saves the probe offsets
M503 Displays the current settings

ZGrid file

The Zgrid file is a simple list of offsets prefaced by the Z probe length and the XY probe count. The order is identical to the probing order.

Example:

In the file below, P100 refers to the number of probe points to sample.
The two 10s are the number of rows and columns (X, Y), and the floating point number is the Z home offset.
The rest of the values are the probing offsets (calculated as the travel distance - the home offset). Higher values indicate that the probe moved less before triggering (so the bed at that point is higher), smaller values mean bed is lower.
P100 10 10 20.100
1.725
0.663
0.413
0.725
0.625
0.513
0.375
0.263

1.025
0.875
0.956

Using FSRs and proximity detectors as a probe

A message about FSRs and other non contact probes

If you use these and do not get a good calibration result, look closely at the probe repeatability on different parts of the bed, before you blame Smoothie.

FSRs need to be mounted in a very particular way so they do not trigger by vibration, and do not need too much force before triggering. Proximity probes tend to give different results depending on where they are on the bed, different densities of the underlying metal and less metal at the edges affects this, making the calibration results less than optimal.

Setting up FSRs to work reliably is tricky…

To use FSR's with the smoothieboard an aux board is needed to interface the FSR's to the smoothieboard's endstop input. Smoothieware will accept this input as if it was a simple mechanical switch.

JohnSL (Github) has created such a board. It is available via TriD Printing & UltiBots. See John's blog post about the board. This board is powered from the endstop pins.

The Deltabot group is where most discussion on using FSR's is located.
Topics to look for are:

  • Alternative boards like the arduino mini.
  • WingWong's trinket derived design.
  • Mounting of FSR's