Skip to main content

Site Navigation

Your Account

Choose Language


Revision to Setting up automatic probing of the print bed


[title|Setting up automatic probing of the print bed]
The first layer of a print must be printed at the right height, to within perhaps 50 microns, everywhere across the print bed, to ensure that the print sticks to the bed and the nozzle doesn't crash into it. For a Cartesian printer this may be as simple as ensuring that the bed is level, but a delta printer has a number of additional parameters to adjust. Even if your printer is well calibrated and unchanging, a high-quality Z probe may be more repeatable than your endstop . It is often useful to run a quick autoprobe before every print (and not re-home afterwards). Setting up such an autoprobe requires a certain amount of configuration.
See [[Connecting a Z probe|Connecting a Z probe]] for details on the electrical connections.
Instructions on setting up the mini differential IR probe are [|available on dc42's web page].
== Choosing which types(s) of probing to use ==
RepRapFirmware supports two different types of Z probing:
* [[Gcode#Section_G32_Probe_Z_and_calculate_Z_plane|G32]] probing uses a bed.g file to define the probe points individually, including an optional Z probe trigger height adjustment for each point. On a Delta printer it is used for auto calibration. On a Cartesian or CoreXY printer it is used for leadscrew adjustment if you have multiple independently-driven Z leadscrews.
* G32 bed probing can also be used for 3, 4- and 5-point bed compensation, however this method is no longer recommended unless your Z probe has a trigger height that varies significantly with XY position..
* [[Gcode#Section_G29_Detailed_Z_Probe|G29]] probing uses a grid of points defined by its size and the spacing between points. You can probe a large number of points without having to define their coordinates individually. It is only used for bed compensation.
On a Delta printer, you can if you wish use G32 to perform auto calibration followed by G29 to compensate for any residual bed height errors. On a Cartesian or CoreXY printer you can use G32 bed probing for leadscrew adjustment, followed by G29 probing to do bed compensation.
'''The remainder of this page describes G32 bed probing for bed compensation, which is no longer recommended. For G29 bed probing, see [[Using mesh bed compensation|Using mesh bed compensation]].'''
== Setting up the probe points for G32 probing ==
The autoprobing command, G32, probes the bed at some number of points and then tells the printer to do a least-squares fit for some of the parameters. The set of points and number of parameters is set in the file bed.g. The easiest way to make such a file is with [].
Because the fitting process is a least-squares process, measurement errors from different points will average out. If your surface is somewhat rough, or if your Z probe is somewhat "noisy", increasing the number of points will have a similar effect to repeatedly probing the same points: the averaging process will improve the fitting process as the square root of the number of points. Currently the firmware limit is something like 16, but it may be as high as 64. (Obviously if you can it is better to use a smoother surface and a better sensor.)
Some sensors produce height errors that depend on the (X,Y) position. For example, a slightly misaligned delta robot will have an effector platform that tilts as it moves around the bed; if the sensor is not exactly at the same place as the nozzle, this will slightly change the height readings. If this is a problem with your printer, you can provide a height correction to each probe point with the H parameter. These would be determined by manually measuring the right height (perhaps with the paper test), probing at the same position, and recording the difference.
== Setting probe parameters ==
The most important probe parameter is the height of the nozzle when the probe triggers. This will determine the height of the first layer. It is set with the G31 command, usually placed in your config.g. The process of determining this value is fairly straightforward:
* Move the nozzle until it is at a good Z=0 height (for example a height that will touch but not pin a piece of paper against the bed).
* Set this height as Z=0 with G92 Z0
* Move the print head up perhaps a centimeter
* Run a single probe without updating the printer's coordinates: G30 S-1
* Use M114 to find the Z height. This is the value to put in your G31 command
* If, in later prints, you find the first layer is too thick or too thin, adjust the value in your G31 command
== Sensor offset adjustment (H parameter in bed and bed_report macro) ==
'''''Note: the best way to avoide the effect of trigger height varying across the bed is to use a nozzle contact sensor such as the [[Smart Effector]]'''''
Mechanical sensors (FSR and other switches types) have offsets which may vary with the head position, especially on delta printers. The offset shall be adjusted for each probe point.
For this purpose, it is practical to create a macro for each probe point , moving to this point: p0.g, p1.g, etc.
On delta printers, depending the sensor type, you may have more offset on the side than in center or the reverse (bed sensors like FSR have more offset in the center while effector sensors have more offset on the sides).
Bed, bed_report and p0.g to p6.g (or more) macros shall have same coordinates and be adjusted while you displace probing points, which may notably be needed if your bed surface is weared (as could occurred easily with BuildTak) or for a different usable diameter.
To test the offset, you shall :
* Do at least 3 calibrations till you get consistent results.
* Execute [[Gcode#Section_M665_Set_delta_configuration|M665]] and note the reported parameters to modify your configuration file.
Please note that if you use the homing macro without end switches, the height in M665 will not be used and the height shall be modified in the homedelta.g
Move to the calibration points with the P0 to P6 macros and lower the head manually atop a paper sheet till the paper sheet began to have difficulties to slide.
Repeat for all the probe points, note the values on a paper.
You shall then modify the H parameters in the bed.g file and reload this file on the SD card. Use web interface system panel (not macro panel) for that.
Values found shall be substracted to the already defined offset, meaning that if you find +0,1 and the offset is already -0,22, you shall do -0,22-(+0,1) = -0,32
If using a ‘BuildTak’ surface, you should not ‘crush’ the filament on the surface and the resulting value while the paper begins not to slide should be within – 0.1~0,12 mm , so you should subtract 0,12 to lift up the hotend, say if offset is -0,25 while the paper is sliding at exactly 0, you should set -0,36.
After adjustment of H parameters in bed.g, modify the bed_report.g with same values, then reload bed_report.g on the SD card and run the macro.
If your paper report is neat, but the results of the calibration and bed_reports shows differences, that means that your bed is not flat. What counts is the paper measure, not the calibration result, so do not cheat by modifying the H parameter to obtain a very low calibration value.
Note that all macros could be run after being loaded on the SD card, without rebooting or restarting.
== Probing-related G-code ==
* [[Gcode#Section_G30_Single_Z_Probe|G30]] - run a single probe.
* [[Gcode#Section_G31_Set_or_Report_Current_Probe_status|G31]] - set up probe, in particular the Z height at which the probe triggers; note the firmware supports multiple probes, so you must run M558 first to specify which one.
* [[Gcode#Section_G32_Probe_Z_and_calculate_Z_plane|G32]] - run a full autoprobe (that is, execute bed.g or uses the matrix defined by M557)
* [[Gcode#Section_G92_Set_Position|G92]] - redefine coordinates so that current position is zero (or values specified)
* [[Gcode#Section_M114_Get_Current_Position|M114]] - report current position.
* [[Gcode#Section_M557_Set_Z_probe_point_or_define_probing_grid|M557]] - Set Z probe point or define probing grid.
* [[Gcode#Section_M558_Set_Z_probe_type|M558]] - set probe type (e.g. analog); also select which probe to use, so run this early in the setup process
* [[Gcode#Section_M561_Set_Identity_Transform|M561]] - clear all autocalibration or G92 settings
* [[Gcode#Section_M665_Set_delta_configuration|M665]] - set delta configuration; this includes the manual calibration values that are the starting point for autocalibration. You can also use this command after an autoprobe to see the fitted values
* [[Gcode#Section_M666_Set_delta_endstop_adjustment|M666]] - set delta endstop adjustment; this includes the manual calibration values that are the starting point for autocalibration. You can also use this command after an autoprobe to see the fitted values