Skip to content

Adaptive Mesh Leveling (AML)

Miguel Risco-Castillo edited this page Oct 30, 2024 · 22 revisions

Adaptive mesh leveling (AML) is a technique that uses a bed leveling probe to create a mesh of the print bed surface. This mesh is then used to compensate for any unevenness in the bed during printing, resulting in better first layer adhesion and overall print quality. AML is different from traditional mesh leveling in that it only probes the areas of the bed where the print will be located. This reduces the amount of time it takes to level the bed and also provides a more accurate mesh, as it is only focused on the area of the bed that will be used. AML will not solve adhesion problems, so make sure that you have a clean, trammed bed and that your printer is properly calibrated. AML doesn't do miracles, it can't fix a printer which doesn't work ok with the standard leveling options (ABL or UBL). What AML does for you is reduce and improve the accuracy of the mesh by automatically constrain the leveling area to only the area occupied by the model.

For be able to use AML it is necessary to have a firmware with support for AML and the proper plugin/post-processing script installed in the slicer.

You can get the instructions and scripts to use AML here: https://www.patreon.com/mriscoc/shop?search=AML

cura-scripts-3

Currently it is very important to use the proposed start g-code scripts to be able to use AML correctly.

Cura start g-code script for use with AML

; Heat up
M104 S{material_print_temperature_layer_0} ; Set Extruder temperature
M140 S{material_bed_temperature_layer_0} ; Set Heat Bed temperature
G28 ; Home all axes
G27 ; Park toolhead
M190 S{material_bed_temperature_layer_0} ; Wait for Heat Bed temperature
M109 S{material_print_temperature_layer_0} ; Wait for Extruder temperature
;
; Reset settings
M220 S100 ;Reset Feedrate
M221 S100 ;Reset Flowrate
;
; Ender Custom Start G-code
G92 E0 ; Reset Extruder
G28O ; Home optionally if steppers were shutdown
M420 S1 ; activate leveling
;
; Adaptive Mesh Leveling (AML)
C29 A ; use AML
;

Orca/Prusa/Super Slicer start g-code script for use with AML

;
; First layer print x min = [first_layer_print_min_0]
; First layer print y min = [first_layer_print_min_1]
; First layer print x max = [first_layer_print_max_0]
; First layer print y max = [first_layer_print_max_1]
; Total layer count = [total_layer_count]
;
G90 ; use absolute coordinates
M83 ; extruder relative mode
; Heat up
M104 S[first_layer_temperature] ; set extruder temperature
M140 S[first_layer_bed_temperature] ; set bed temperature
G28 ; Home all axes
G27 ; Park toolhead
M190 S[first_layer_bed_temperature] ; wait for bed temperature
M109 S[first_layer_temperature] ; wait for extruder temperature
;
; Reset settings
M220 S100 ;Reset Feedrate
M221 S100 ;Reset Flowrate
;
; Ender Custom Start G-code
G92 E0 ; Reset Extruder
G28O ; Home optionally if steppers were shutdown
M420 S1 ; activate leveling
;
; Adaptive Mesh Leveling (AML)
; AML mesh density X = auto
; AML mesh density Y = auto
; AML margin = 5
; AML prime = 1
C29 A ; use AML
;

Use the new postprocessing script. Do not save parameters or mesh to keep the mesh from full bed.

references

Related issues and discussions

https://github.com/mriscoc/Ender3V2S1/issues?q=is%3Aissue+AML+in%3Atitle https://github.com/mriscoc/Ender3V2S1/discussions?discussions_q=AML+in%3Atitle