# What is ABL or UBL? Is this the same?

When looking at Marlin firmware or reading on leveling of the printer bed the term ABL and UBL are frequently used.

• What are ABL and UBL?
• Are they the same?

• What are ABL and UBL?
• ABL stands for Automatic Bed Leveling
• UBL stands for Unified Bed Leveling

## Level the bed?

A level bed (twisting knobs under the bed), or a surface that is exactly followed by the nozzle is a prime requisite for 3D printing. Without a proper bed setup (not only level, but also the initial nozzle to bed surface gap; usually the paper thickness distance, but a feeler gauge will do a similar job), adhesion to the print surface might not be optimal and causes the print to get loose during printing or the first layer may not adhere at all.

## A leveling solution

Over the years, 3D printing hardware and software has evolved to aid the 3D print operator. One such a solution is the use of a sensor (see e.g. Automatic Bed Leveling (ABL) with a sensor (BLTouch, inductive, capacitive), how does it work?). But a dedicated sensor it not a prime requisite, you can also do it manually.

## ABL

Automatic bed leveling comes in many forms, the use of a sensor to sense the proximity of the build surface (inductive, capacitive, optical or through physical touching) enabled scanning of the build surface. In the Marlin firmware, more specific in the configuration.h file of the firmware (note this is a generic one, your printer might need adaptions!), the following on automatic bed leveling is to be found:

• AUTO_BED_LEVELING_3POINT
Probe 3 arbitrary points on the bed (that aren't collinear)
You specify the XY coordinates of all 3 points.
The result is a single tilted plane. Best for a flat bed.

• AUTO_BED_LEVELING_LINEAR
Probe several points in a grid.
You specify the rectangle and the density of sample points.
The result is a single tilted plane. Best for a flat bed.

• AUTO_BED_LEVELING_BILINEAR
Probe several points in a grid.
You specify the rectangle and the density of sample points.
The result is a mesh, best for large or uneven beds.

Note that bilinear leveling is automatic leveling option that doesn’t require you to adjust any leveling knobs (but remember that automatic leveling is not magic, you still need to provide a bed as level as possible! see Does auto leveling result in sheared prints?), but it is laborious to use in the sense you typically have to run the multi probing points prior to printing, which can take some time depending on the grid size (see How to increase the amount of probing points for a BLTouch sensor in Marlin firmware?).

This is where Unified Bed Leveling comes in.

## UBL

Unified bed leveling (UBL) introduces a mesh-based software procedure in Marlin firmware similar to (ABL) bilinear leveling but with some extra features. From the configuration.h file:

• AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
A comprehensive bed leveling system combining the features and benefits
of other systems. UBL also includes integrated Mesh Generation, Mesh
Validation and Mesh Editing systems.

A UBL mesh is generally using more probing points than the (ABL) bilinear leveling equivalent to create a better digital representation (topography) of the used build surface. Bilinear meshes typically use 9-25 probing points, UBL meshes generally use 81-100 probing points to scan the surface more thoroughly. Note that this is up to you how you define this, the bottom line is that UBL is not something you do prior to every print, so you can get away with having some more probing points. Note to choose a value that is in line with the surface (type and size), for a flat glass surface 100 probing points might not be necessary.

Essentially, the operator is presented a means to interact with the 3D printer to control the leveling to allows to easily store (save up to seven meshes), adjust, and swap multiple digitally stored leveling meshes on your printer to encounter the various print surfaces you may use like in multiple build plates.

The main difference between UBL and the ABL systems is that UBL combines features of other leveling techniques to provide users with more control. With Unified Bed Leveling, you’re not technically required to have an automatic bed leveling sensor. Through the interface, you can manually create the mesh! As the machine is homed, the coordinate system is fixed, movement relative to the reference is used by each probing point.

With so many points, creating UBL meshes can take a long time compared to other systems (certainly without a leveling sensor), but once the process is done, you don’t have to redo this again as the UBL features allow you to modify the probing points.

The G26 command is designed to use with mesh enabled leveling procedures (Marlin < 1.1.6 AUTO_BED_LEVELING_UBL and since Marlin 1.1.7 it also works with MESH_BED_LEVELING and AUTO_BED_LEVELING_BILINEAR). The various options are described in the Marlin implementation of G26.

• Are they the same?

To sum up, ABL and UBL are the same in that some sort of procedure is used to scan the topography of the bed surface but they differ in the sense that for ABL you are required to have a automatic leveling sensor and choose less points while you can have more probe points using UBL including advanced features as editing and storing multiple meshes.