Seven Squares

May 15, 2024
Description
These seven squares create a palette you inspect by sight and touch to calibrate z-offset.
To use this test, you will need to set some Advanced options in PrusaSlicer and modify the gcode directly. The names of the objects in the attached project file greatly simplify this task.
This project has been tested with a 0.4mm nozzle and 0.2mm layer height, but should be widely applicable to most configurations. Use good judgement; the author will not be held responsible if you break your printer in any way associated with this project.
Prusa Slicer Settings
Enable Advanced settings in the upper-right-hand corner of PrusaSlicer, if you haven't done so already. Then, proceed with the following steps:
- Navigate Print Settings → Output Options
- Check Complete individual objects
- Under Label objects, select OctoPrint comments
You're all set to export the G-code.
Modify G-code
Open the exported G-code in an editor of your choice.
The author recommends Visual Studio Code with the G-Code Syntax extension.
Search for ; printing object
.
Ignore the first block containing matching lines if it looks like this:
; printing object Square 0.21mm id:4 copy 0
; stop printing object Square 0.21mm id:4 copy 0
; printing object Square 0.16mm id:0 copy 0
; stop printing object Square 0.16mm id:0 copy 0
; printing object Square 0.24mm id:6 copy 0
; ...
The search will eventually lead to code resembling the block below. Line 6 is a comment that indicates which object will be printed, and line 5 sets the z-position for that object.
1 ;LAYER_CHANGE
2 ;Z:0.2
3 ;HEIGHT:0.2
4 G1 E-2.5 F4800 ; retract
5 G1 Z.20 F15000 ; lift
6 ; printing object Square -0.04 id:0 copy 0
7 G92 E0 ; reset extrusion distance
8 G1 X59.357 Y130.922 ; move to first layer point
9 G1 E2.5 F4800 ; ; unretract
10 G92 E0 ; reset extrusion distance
11 M204 S2500 ; adjust acceleration
For each object, modify the z-position on the line before the ; printing object
line by the offset in the object's name.
Per the example above, subtract 0.04 from .20 on line 5 to produce the following G-code:
5 G1 Z.16 F15000 ; lift
6 ; printing object Square -0.04 id:0 copy 0
Instead of Z.2
, the Z parameter reads Z.16
.
The Last Step
Print it. Once the print is complete, inspect the squares. If the square that looks best is 0.00, you're done. For any other square, adjust z-offset according to the square's number. If you think the best level might be +/-0.03, or even further, adjust z-offset and reprint the squares.
Reference on Bed Leveling and First Layer:
You can find the author's website at https://www.billieruben.info.