Marlin Auto Bed Leveling Not Working? (Issue Resolved)

Marlin’s automatic bed leveling feature is an easy way to adjust your print to meet the specific needs of your bed – whether the bed is perfectly level or not. The idea is that you check the desired nozzle height at multiple points across the bed – and then adjust the nozzle height as you print for a perfect print. Unfortunately, Marlin bed auto leveling is prone to problems. 

Fixing Marlin bed auto leveling normally means resetting the bed leveling, checking the mesh layer, or ensuring that the leveling has been saved. Even if you do auto bed leveling manually, your Marlin firmware has to save it in order to properly use it. In addition, you might have some issues with configuration and code. 

How Does Auto Bed Leveling or ABL Work? 

Auto bed leveling or ABL functions to automatically adjust the height of the nozzle based on the actual height of the bed. This is ideal if you’re unable to perfectly level your bed. It’s also a great idea if you have scratches or other imperfections in the bed. And, if you use surfaces like tape or film to ensure adhesion – bed leveling checks the actual height at every part of the bed to automatically adjust the nozzle. Eventually, this creates better print quality, because you’ll have the same thickness throughout the model. Marlin firmware achieves this by controlling the arm’s Z-axis in addition to the XY axis. 

Possible Issues If ABL is Not Working on Marlin 

Unfortunately, there are plenty of reasons your ABL might stop working. Some of the most likely include sensor issues, your endstop settings, the firmware version, and even basics like whether the file is saving or not. Determining which has gone wrong can be difficult without troubleshooting. 

Release Version 

Make sure you’re using the latest version of Marlin’s firmware and that you have a stable release installed. 

Sensor

Auto bed leveling requires using a sensor to detect where the bed is at. If you expect the bed probe is not working properly, you can try using the PROBE_MANUALLY option to manually set bed levelling. This can take some time, as you have to check and level multiple points across the bed. If your sensor is fine, it could be an issue with the mesh or a corrupted file. You can always check configuration to be sure. 

Saving or EEPROM Issues

If your first layer print is coming out the same with auto leveling turned on or off, chances are, the file isn’t being saved. That can be an issue with saving. For example, you have to manually use M502 to reset defaults and then M500 to update the settings in the EEPROM. Otherwise, it will continue to use the older, saved settings. If that doesn’t help, you might have problems with your EEPROM. If you’re unsure, try using M501, then try again. 

You can also try using M503 and then resetting EEPROM. To do so, go to EEPROM_SETTINGS and choose Store Settings.

Endstops

If endstops are improperly configured, you will see issues with your auto leveling. It’s always worth checking that they are properly configured. However, if your Marlin is running the ABL properly, it should auto-configure endstops as well. Therefore, you shouldn’t have to adjust this data. 

See also  Cura Vase Mode: Settings & Usage Guide for Ideal 3D Prints

Startcode 

If you’re missing lines of code, you will have issues. Marlin code is relatively simple, so you can easily skim and see if everything is there. For instance, is M420 S1 taken into account during print? 

Starting out with 3D printing and want to AVOID rookie MISTAKES? New: Filament Printing 101 Course
Starting out with 3D printing and want to AVOID rookie MISTAKES?
  • Our new Filament Printing 101 Course is just for you! Lean how to create perfect professional prints without all the hassle.
  • Don't let common mistakes hold you back, click the link to learn more and get ahead now!

Configuration.h File

If you’re having issues, it may be an idea to change the configuration file. Marlin offers its configuration.h file as a free download on Github. The configuration file includes settings for different, popular 3D printers, different nozzles, and the different auto-leveling configurations. 

Leveling Procedure 

Auto bed leveling should account for most of the problems that can come with a slightly uneven bed. However, if your sensor is off, if the sensor on the nozzle is too low or too high, or you have other mechanical issues, you will have issues. For example, if screws are too tight or too loose. Check everything before you move forward to the next step. 


Try Without Auto Bed Leveling 

If you’re having issues with your Marlin auto bed leveling, it may be a good idea to turn it off to test the leveling procedure. For example, if the sensor is faulty, if the mesh layer is corrupt, or if the EEPROM is not saving data, this can help you to determine that. Running a print without the auto bed leveling on also lets you know if you’re printing at default settings. 

Turn Auto Bed Leveling Off 

You can turn auto bed leveling off with the G28 command. In fact, one of the most common reasons that auto bed leveling doesn’t work is that Marlin actually automatically turns it off. In fact, unless you put M420 S1 or RESTORE_LEVELING_AFTER_G28 into your code, your printer will turn auto bed leveling off after every print. That is, in part, intended to prevent issues where you print with the same auto bed leveling settings before or after adding tape for different prints. G28 will always re-home the printer and turn auto bed leveling off unless you modify the start code. 

Run the Print 

Print your first layer. Compare the print to the print you got with auto bed leveling turned on. If it’s the same, chances are you’re simply not running auto bed leveling. That might mean you have to add M420 S1 to your startcode after G28. It might also mean you have to check that files were saved to EEPROM. In this case, you should run auto-leveling again and be sure to save the file using M502 and then M500. 

Errors 

If you have errors in trying to turn your auto bed leveling off, you should look at your configuration.h file. Here, it may be a good idea to update to the default version. However, you might also want to check for common code issues. For example, if you look for: void adjust_delta(float cartesian[3]), you can check for “#ifdef NONLINEAR_BED_LEVELING”, underneath. If it’s not there, add it in. Make sure that #endif is in place just behind the closing brace. 

See also  Cura Z Offset: The Ultimate Tool For Accurate 3D Printing

How to Set Up Marlin Auto Bed Leveling Properly 

Marlin includes multiple auto bed leveling settings and you can choose the ones that best work for your print needs and sensor. For example, if you’re using the popular BLTouch sensor, you can use UBL, Mesh, or ABL. All three options are a good choice for Marlin. However, Auto Bed Leveling or ABL is the default and usually where you should start. In addition, BLtouch Marlin setup is relatively automated. It should automatically handle configurations. However, you might have to do some manual work. For example, configuring Marlin bed dimensions. 

That means: 

  • Checking that MIN/MAX positions are set properly 
  • Checking endpoints 
  • Checking bed settings

In almost every case, the default should be good if you use Marlin configurations for your printer. 

Choose a Bed Leveling Type 

Marlin includes three bed leveling options: 

  • 3-Point – The software probes the bed at three randomly chosen points to assess the bed’s overall positioning.
  • Planar Grid – Check the bed on a grid pattern and apply a matrix to the overall tilt.
  • Bilinear Grid – Probe the bed in a grid and apply a mesh-based compensation. 

Each of these options is best for a different scenario. For example, the 3-point ABL is fast, easy to set up, and easy to repeat. It’s good if you’re generally certain of your bed leveling. The Planar Grid takes longer but allows you to ensure the bed is level. And, the bilinear grid is a good solution if you know your bed is irregular or not level. Marlin recommends using AUTO_BED_LEVELING_BILINEAR as the default. And, if you have enough program memory, they also recommend enabling LCD_BED_LEVELING to add a bed leveling menu to your LCD. 

Turn on Detailed Logging 

Turn on M111 S247 to create a detailed log. This ensures G28 and G29 commands create a detailed log of everything they do – which allows you to see when things go wrong, like if your G28 is homing and disabling auto bed leveling. 

Home the Printer

Home the printer with G28 to establish the current position and ensure the carriage won’t move outside physical limits. 

Configure Settings

Set the number of points in the X and Y grid. If you have a square bed, use an equal number of points. If you have a rectangular bed, adjust based on the length against the width. It’s important that you probe the same number of points respective to the distance on each axis. 

Monitor the Machine 

Monitor the printer to ensure the printer doesn’t try to move out of bounds. If it does, turn it off. You should never leave the room while configuring ABL. 

Check the Nozzle Height at Each Point 

Use a piece of paper to determine whether the nozzle is the right height from the print bed. The paper should just slide under the nozzle with a bit of resistance. Use the G1 command to test the accuracy of the height at each point. This can take some time but should only have to be done once. If the paper slides easily under the nozzle, the bed is too low. If the paper doesn’t slide under the nozzle, the nozzle is too low. In either of these cases, you should recalibrate and try again. 

See also  Cura Z Hop: Boosting Accuracy & Precision In 3D Printing

Assess Leveling Accuracy 

Use M48 to ensure that the bed probe is measuring accurately. This should take a few minutes of your time at most, so it’s well worth the time, especially if you’ve been having issues getting it to work properly. 

Save the Data

Running G29 saves the ABL to RAM. Unfortunately, that means you’re not saving the data once you turn the machine off. Use command M500 to save the data to EEPROM. If you’d like to get rid of old saved data, use M502. 

Check That G29 Is Enabled

G29 should be automatically enabled after running a G29 setup. However, it’s a good idea to ensure that it is. You can check “Start G-Code” in your slicer settings to be sure. If it’s not enabled, insert M420 S1 into the file, after G29. If there is no data, the code will be ignored, and your machine will print without using auto bed leveling. 

Check the Mesh 

It’s also a good idea to check that you’ve saved your mesh properly. To do so, use G29 S0. This will show you the current mesh. If it exists, you can send M420 S1 to immediately use it. Then, you can check the mesh using G29 S1 to move the nozzle to the first point. Check the distance with a piece of paper. If it needs adjustment, do so. Use G29 S2 to save the value and move to the next point. Keep repeating the process until you’ve moved through every point. 

Again, you have to save using M500. Otherwise, your updates won’t save to the EEPROM and will vanish when you reset or restart the machine. 

What If You Don’t Have a Sensor? 

Marlin offers a manual auto bed leveling function. This takes some time because you have to manually set every point and adjust the nozzle yourself. However, it’s relatively simple and only requires slightly more manual work than the process listed above. 

  • Enable LCD_BED_LEVELING to update and control bed leveling via your LCD. This makes the full process faster and easier. 
  • Use PROBE_MANUALLY.
  • Hit G29 SO to see current status and mesh.
  • Use G29 S1 to move to the first point.
  • Manually check the height and adjust the nozzle using the knob. The paper should just pass under the nozzle with a slight adjustment.
  • Use G29 S2 to save the Z-value and move to the next point.
  • Repeat for all points.
  • Use M500 to save the Z-values to EEPROM.

Final Thoughts

If your Marlin’s auto bed leveling isn’t working, the easiest answer is that it might not be saving to EEPROM or it might be automatically turning off. You can also always reset your EEPROM, reprogram the bed leveling, or manually run bed leveling to see if that resolves the issue. And, if you’re still having problems, downloading and replacing the configure.h file will reset configurations so you can try again in case you’ve missed a line of code or another crucial element. 

Hopefully, this article helped you fix your auto bed leveling issues.

Recent Posts