Probing with Smoothie

A probe is a switch ( much like an Endstop ) used to find where something is located automatically.

Smoothie will use it to move until the probe is “triggered” and stop there.

It can be used on CNC mills to :

  • Find the length of a tool and how far it's bottom is from the 0 position in Z
  • Find the touching point between the workpiece and the tool

It can be used on 3D printers to :

  • Find the touching point between the actuator and the bed
  • Calibrate Delta geometry
  • Do grid-based bed leveling to compensate for bed height irregularities

Different strategies are useful for different geometries of machines, click on one to go to it :



A servo-controlled retractable probe


Making the probe retractable allows the probe not to be in the way of the plastic when it is not used.

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. A point detection is best as the actual position is important for probing. (proximity probes are suboptimal as they do not detect the point position).

Homing

A probe is not an endstop and therefore cannot be used to Home the Z axis. You need a Z endstop to use G28 to home the Z axis. Below are some instructions on how you can set the bed Z height using a probe (G30).

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_ms          1                  # 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.

First test the zprobe with M119, make sure that the probe is 1 when triggered and 0 when not triggered.

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.

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

G38.2 and G38.3 ( for probing in X and Y ) 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.

Configuration 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_ms 1 Debounce the probe pin over this number of millisceconds. Set to 1 or 2 if your probe is too noisy and gives false readings.
zprobe.probe_height 5 Distance above the bed at which the probing is started, once the bed's height is known.
2017/01/25 14:20 · arthur

Probing for linear delta machines

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 and that gamma_max is set to about 20-30mm shorter than the distance to the bed, otherwise it will crash into the bed at high speed.

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 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)
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 effect 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.

Configuration options

Option Example value Explanation
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)
2017/01/25 14:19 · arthur

Example configuration

To activate this leveling strategy, copy/paste the following to your configuration file and edit it accordingly :

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)

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
M500 saves the probe points
M503 displays the current settings

Example use :

    G28 (Home XYZ)
    (Move Z at least 30mm away from the bed if it's not, and attach probe if you have a removable probe)
    G32 ( Calibrate the machine )
    (Remove probe if you have a removable probe)
    M500 (to save probe results)
    G28 (Home XYZ)
    (jog down to touch the plate)
    M306 Z0
    M500 (to save homing offset)
    G28
    (Machine is now calibrated and knows it's correct height above the bed)

Z height

You will need to set the z height after calibration using one of the several methods available mentioned here 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, or the probe crashes into the bed on the initial probe, 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.
With the recent version it should move fast to just above the bed then move to the bed slowly, if it hits the bed on the first fast move then you need to set initial-height bigger.

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


A probing height map


Nothing is perfect

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

For use on linear delta machines only, do not use for a cartesian machine.

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.

Note

G31 is the probe command on this not G32.

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

leveling-strategy.delta-grid.do_home         true

This must be set on a Delta printer (although it should default to true).

If you are not using all 3 endstops (or prefer to home manually before G32):

leveling-strategy.delta-grid.do_home        false

Note

You are responsible to make sure that (0,0) is in a repeatable location if do_home is set to false.

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

leveling-strategy.delta-grid.probe_offsets  0,0,0  # probe offsets x,y,z  (Z should always be 0)

They may also be set with M565 X0 Y0 Z0.

Note

Setting probe offsets on a delta 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

Note

Even though you have set the Machine coordinates to 0,0 in the middle of the bed you can still have the workspace coordinate system have 0,0 at the bottom, left (or wherever you want). To do this, do the following:
  • After homing, jog to where you want 0,0 to be.
  • Issue G92 X0 Y0, or G10 L20 P0 X0 Y0, (if using G92 set the config option save_g92 true)
  • Save with M500.

Configuration options

Option Example value Explanation
leveling-strategy.delta-grid.enable true The strategy must be enabled in the config, as well as the zprobe module.
leveling-strategy.delta-grid.size 7 The size of the grid, for example, 7 causes a 7×7 grid with 49 points. Must be an odd number.
leveling-strategy.delta-grid.probe_offsets 0,0,0 Optional probe offsets from the nozzle or tool head NOTE Z must be 0
leveling-strategy.delta-grid.save false If the saved grid is to be loaded on boot then this must be set to true
leveling-strategy.delta-grid.initial_height 10 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
2017/01/25 14:19 · arthur

Example configuration

To activate this leveling strategy, copy/paste the following to your configuration file and edit it accordingly :

leveling-strategy.delta-grid.enable               true     # The strategy must be enabled in the config, as well as the zprobe module.
leveling-strategy.delta-grid.radius               50       # Radius of the bed, must be specified. This needs to be at least as big as 
                                                           # the maximum printing radius as moves outside of this will not 
                                                           # be compensated for correctly
leveling-strategy.delta-grid.size                 7 	   # The size of the grid, for example, 7 causes a 7x7 grid with 49 points. 
                                                           # Must be an odd number.
leveling-strategy.delta-grid.probe_offsets        0,0,0    # Optional probe offsets from the nozzle or tool head
leveling-strategy.delta-grid.save                 false    # If the saved grid is to be loaded on boot then this must be set to true
leveling-strategy.delta-grid.initial_height       10       # Optionally an initial_height can be set that tell the intial probe 
                                                           # where to stop the fast decent before it probes, this should be 
                                                           # around 5-10mm above the bed

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 (NOTE you must home after this)
M374 Save grid to /sd/delta.grid
M374.1 delete /sd/delta.grid
M375 Load the grid from /sd/delta.grid and enable compensation (NOTE you must home after this)
M375.1 display the current grid
M561 clears the grid and turns off compensation (NOTE you must home after this)
M565 defines the probe offsets from the nozzle or tool head
M500 saves the probe points
M503 displays the current settings

Example use :

    G28 (Home XYZ)
    (Move Z at least 30mm away from the bed if it's not, and attach probe if you have a removable probe)
    G31 ( Probe the grid )
    M374 ( Save grid to sdcard)
    (Remove probe if you have a removable probe)
    M500 (write M375 to override file to auto load grid if leveling-strategy.delta-grid.save is set to true)
    G28 (Home XYZ)
    (jog down to touch the plate)
    M306 Z0
    M500 (to save homing offset)
    G28
    (Machine is now grid-levelled and knows it's correct height above the bed)

Probing for Cartesian machines

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.

Three-point levelling


If your plate is perfectly flat, but not perfectly level, this is all you need

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. In addition the z component of the .probe_offsets should always be zero.

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 (Z should always be 0)

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.

Configuration 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 (Z should always be 0), 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
2017/01/25 14:20 · arthur

Example configuration

To activate this leveling strategy, copy/paste the following to your configuration file and edit it accordingly :

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 (Z should always be 0), 
                                                                    # 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

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 (NOTE you must home after this)
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 :
(This only works if you have a Z endstop as well as a probe).

    G28 (Home XYZ)
    (Move Z up to about 30mm and attach probe if you have a removable probe)
    G32
    (Remove probe if you have a removable probe)
    M500 (to save probe results)
    G28 (Home XYZ)
    (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)

A probing height map


Nothing is perfect

This leveling strategy probes rectangular-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.

NOTE there is NO extrapolation in this version, so printing (or milling) MUST not be done outside of the probed area.

Configuration

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

leveling-strategy.rectangular-grid.enable         true

Also the the bed size must be set:

  • set x_size and y_size to the size of the bed to probe
leveling-strategy.rectangular-grid.x_size        75
leveling-strategy.rectangular-grid.y_size        50

The size of the grid (the number of probe points in X and Y) MUST be set with…

leveling-strategy.rectangular-grid.size        7

This is the X and Y size of the grid, it must be an odd number ( like 7, 9, 11, 13 ), the default is 7 which is 49 probe points ( 7×7 is 49 ).

leveling-strategy.rectangular-grid.do_home         true

This can be set if you want the leveling strategy to home before probing.

If you are not using all 3 endstops (or prefer to home manually before G32):

leveling-strategy.rectangular-grid.do_home        false

Note

You are responsible to make sure that (0,0) is in a repeatable location if you set do_home to false.

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

leveling-strategy.rectangular-grid.probe_offsets  0,0,0  # probe offsets x,y,z  (Z should always be 0)

Probe offsets may also be set with M565 X0 Y0 Z0.

The head of your printer will be moved to the X and Y bed sizes set above, PLUS any X and/or Y offset.
Make sure your printer's mechanism will allow moves to these locations.
For example, if your probe is 60mm down from your nozzle in the Y direction (M565 X0 Y-60 Z0), and you bed is set to 200x200mm, the top row of probes will be done with the nozzle at Y=260 mm

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

leveling-strategy.rectangular-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 rectangle size 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 rectangle is different, then the rectangle 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.rectangular-grid.initial_height  10

IMPORTANT set mm_per_line_segment:

mm_per_line_segment 1 # necessary for cartesians using rectangular-grid

Configuration options

Option Example value Explanation
leveling-strategy.rectangular-grid.enable true The strategy must be enabled in the config, as well as the zprobe module.
leveling-strategy.rectangular-grid.x_size 190 the distance from homed position to the right edge of the bed in mm
leveling-strategy.rectangular-grid.y_size 180 the distance from homed position to the top edge edge in mm
leveling-strategy.rectangular-grid.size 7 The size of the grid, for example, 7 causes a 7×7 grid with 49 points. Must be an odd number.
leveling-strategy.rectangular-grid.probe_offsets 0,0,0 Optional probe offsets from the nozzle or tool head in mm
leveling-strategy.rectangular-grid.save false If the saved grid is to be loaded on boot then this must be set to true
leveling-strategy.rectangular-grid.initial_height 10 Optionally an initial_height (in mm) 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
2017/02/10 08:58 · wolfmanjm

Example configuration

To activate this leveling strategy, copy/paste the following to your configuration file and edit it accordingly :

leveling-strategy.rectangular-grid.enable               true     # The strategy must be enabled in the config, as well as the zprobe module.
leveling-strategy.rectangular-grid.x_size               75       # size of bed in the X axis
leveling-strategy.rectangular-grid.y_size               50       # size of bed in the Y axis
leveling-strategy.rectangular-grid.size                 7 	 # The size of the grid, for example, 7 causes a 7x7 grid with 49 points. 
                                                           # Must be an odd number.
leveling-strategy.rectangular-grid.probe_offsets        0,0,0    # Optional probe offsets from the nozzle or tool head
leveling-strategy.rectangular-grid.save                 false    # If the saved grid is to be loaded on boot then this must be set to true
leveling-strategy.rectangular-grid.initial_height       10       # Optionally an initial_height can be set that tell the intial probe 
                                                           # where to stop the fast decent before it probes, this should be 
                                                           # around 5-10mm above the bed

Usage

G29 test probes in a grid pattern within the size specified producing a map of offsets, this can be imported into a graphing program to visualize the bed. optional parameters In sets the number of points to the value n, Xn sets the x size for this probe, and Yn sets the y size for this probe.
G32 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 (NOTE you must home after this)
M374 Save grid to /sd/cartesian.grid
M374.1 delete /sd/cartesian.grid
M375 Load the grid from /sd/cartesian.grid and enable compensation (NOTE you must home after this)
M375.1 display the current grid
M561 clears the grid and turns off compensation (NOTE you must home after this)
M565 defines the probe offsets from the nozzle or tool head
M500 saves the probe points
M503 displays the current settings

Example use :

    G28 (Home XYZ)
    (Move Z at least 30mm away from the bed if it's not, and attach probe if you have a removable probe)
    G32 ( Probe the grid )
    (Remove probe if you have a removable probe)
    M500 (to save probe results)
    G28 (Home XYZ)
    (jog down to touch the plate)
    M306 Z0
    M500 (to save homing offset)
    G28
    (Machine is now grid-levelled and knows it's correct height above the bed)

Tuning machine height

After homing ( with G28 ), the machine knows it is at Z maximum position if your machine homes to max, and at Z minimum position if your machine homes to min.

Because of this, it will read the configuration option gamma_max or gamma_min depending and set the current Z position to that value.

So after homing, the Z position is set to gamma_max or gamma_min.

This means for example if you home to max that if your hotend is 300mm above your bed after homing, and you set gamma_max to 300, after homing, you can just tell the machine to go to Z position 0, and it will go to the bed's height.

To put it simply, setting gamma_max or gamma_min is your way of telling Smoothie what the distance is between your bed, and the hotend, when the machine has just homed.

To find the right value for gamma_max or gamma_min do one of the following :

First home the machine :

G28

Then move to the point the machine currently thinks is Z 0 :

G0 Z0

Then move the head to the bed by jogging, using Pronterface's arrows, the panel, the web interface or whatever other method is adequate in your case.

Finally issue the M306 Z0 command which will use the current Z position as a homing offset : 

M306 Z0

Then save to the SD card with M500 :

M500

Next time you home, the machine will know how high above the bed it is.

Height adjustment


Finding gamma_max manually

First home the machine :

G28

Then set the current Z position to 0 :

G92 Z0

Then move the head to the bed by jogging, using Pronterface's arrows, the panel, the web interface or whatever other method is adequate in your case.

Once the head is exactly at the bed, issue this command :

M114

This will return the position of all axes. The current position of the Z axis is the value you must use as your gamma_max value.

Now simply edit the configuration file to set this value, and reset the board.

Alternatively you can use the M665 Z(distance) command to set the value in the config override system, and M500 to save that value to the SD card.

The gamma_max value in the configuration file is ignored if M665 is set and saved.

Next time you home, the machine will know how high above the bed it is.

Finding gamma_max with a probe

If you have some sort of probe attached to your head ( or bellow your bed ), which triggers when the hotend gets close to the bed, then you can use this to find your gamma_max value without manually jogging.

Now there are two different cases here :

  • Either when the probe is triggered, the hotend is exactly at bed level ( this is the case of probes under the bed, or probes that trigger when the hotend itself is pushed )
  • Or, when the probe is triggered, the hotend is above the bed by a given distance, which we will call the z probe offset ( this is the case of servo-retracted probes, bltouch, inductive probes, IR probes, etc ).

Probe offset


First home the machine :

G28

Then ask the probe to go find the bed :

G30

This will report the distance traveled by the probe.

Your gamma_max value is that reported distance, plus the z probe offset ( distance between the probe triggering point, and the bed ).

For example, if you home, then do G30, and it reports a height of 311mm, and your probe is 7mm bellow your hotend, then your gamma_max is 311 + 7 = 318mm.

Simply edit the configuration file to set this value, and reset the board.

Alternatively you can use the M665 Z(distance) command to set the value in the config override system, and M500 to save that value to the SD card.

The gamma_max value in the configuration file is ignored if M665 is set and saved.

Next time you home, the machine will know how high above the bed it is.

Automatically finding the bed with a probe

Smoothie allows you to save both the Z height, and the delta calibration data, to the SD card.

This means you do not need to probe every time you start the machine, you only need to do it once, and save the values, which will then stay valid as long as your machine's geometry doesn't change.

This means you can have a removable probe that you only connect and attach to the head at the rare occasions when you need it.

However, if for whatever reason you have a fixed ( or retractable ) probe on your head ( or sensors bellow your bed ), then you might want to automatically probe at the beginning of each print.

To do so, simply change your slicing program's “beginning of file” G-code sequence, and replace :

G28

with :

G28
G30 Znnn

When nnn is the distance between your probe's triggering point, and the bed ( or probe offset ) :

Probe offset


The G30 Znnn command moves the head until the probe triggers, then sets the current Z height to nnn

So for example if your probe triggers when the hotend is 5mm above the bed, do G30 Z5, and if your probe triggers exactly when the hotend touches the bed, do G30 Z0.

2017/01/25 14:19 · arthur
2017/01/25 22:57 · arthur

Additional resources

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. Also for grid probes and the like you need a probe that detects the bed at a point, whereas things like proximity and IR probes detect an area not a point, this makes the grid points less than reliable.

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 AndOrNot, TriD Printing & UltiBots. See John's blog post about the board. This board is powered from the endstop pins. Also see AndOrNot's write up on FSR's design for a delta printer FSR pad design.

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
2017/01/25 14:20 · arthur

The BLTouch is designed to exactly emulate a servo-deployed switch probe. It is wired, configured and interfaced exactly the same way as a servo and a switch.

BLTouch probe


How to wire a bltouch probe

Note that this wiring is also valid for a servo and a switch probe, as this is what the bltouch emulates.


~ Command ~ BLTouch status
M280 S3.0 Push-pin down
M280 S7.0 Push-pin up
M280 S10.6 Alarm release
M280 S8.4 Self-test
M280 S5.5 ZMin test mode (for M119)

Note : those probes are generally much less reliable than a simple mechanical switch. However, if it is what you own, here is a video about them : 

If you want to be able to deploy and retract your probe using a small servo motor, see the Switch module documentation.

You can use an accelerometer and a small arduino as a probe which detects the “shock” of touching. This probe is read exactly like a “switch” or any other on/off probe, so it's wired to Smoothie the exact same way.

To find more information on this, see this link and this link.