Manual Mesh Leveling for The Ender 3 3D Printer

[2020, Feb 9 edit: I am not a C-family programmer by trade, and in the first published version of this article I neglected the octothorpes in from of some of the “define” commands. They are completely necessary. If you tried these instructions and had issues, please ensure you have the corrected code.]

Leveling my 3D printer beds is not how I derive enjoyment from this machine. When I saw this video pop into my subscription page on YouTube I was instantly curious about whether I could do this with my Ender 3 . Despite using borosilicate glass beds on both my machines, I find that they are not perfectly flat (or the aluminum bed underneath the glass is warping) so I’m expecting that having this setting available will make the overall process less cumbersome. I will be writing these instructions for the TH3D firmware on an Ender3 with the V1.1.5 motherboard, though the standard Marlin build will be roughly the same.

For folks who don’t want to watch the video, mesh leveling is the process by which the printer will move the print head to some number of locations on the print bed (9, 16, or 25). You’ll check whether it’s at the height that’s desired (using paper or a thickness gage) and adjust the print head up or down in 0.025mm increments using the control wheel. These incremental adjustments are saved to the EEPROM and the board will calculate how much up or down it needs to move the Z axis to keep the nozzle at a uniform height above the print bed. If you’ve seen a BL Touch sensor, it’s doing this same process, only you’re the sensor.

It turns out it’s really easy to do if the circumstance is correct. There are three things that you’ll need: 1) The V1.1.5 motherboard (or whichever motherboard is being used when you read this) or 1A) an Arduino to act as a bootloader*. 2) a copy of the firmware you’re using. I prefer TH3D’s firmware, and they have a great set of tutorials for updating the motherboard. And 3) You’ll need the Arduino IDE (which not-coincidentally comes in the TH3D download)

Once you are familiar with the Arduino IDE and have flashed your board once or twice (to get accustomed to the process) you’ll want to open the Configuration.h file in the firmware package. Use the find/search tool to look for “MANUAL_MESH_LEVELING” in the file. The // in front of an instruction tells the compiler to ignore that line (this is referred to as commented code). Remove the // in front of #define MANUAL_MESH_LEVELING. This adds the option for mesh leveling to the printer’s menu.

Next search for “PROBE_OFFSET”. In TH3D you’ll find:

#define X_PROBE_OFFSET_FROM_EXTRUDER 0 // X offset: -left +right [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER 0 // Y offset: -front +behind [the nozzle]

Uncomment both of these lines. You’ll also need to add

These lines tell the leveling code that we’re using the nozzle itself (0 offset) as the location where the leveling value is being set. If we had a BL Touch, then it would be some distance X and Y away from the nozzle head, and the probe will be some distance Z above or below the actual nozzle aperture.

TH3D users can skip the next few settings in the video, Marlin users may need to set them (again, depending on when you’re reading this). The video instructs us to find “mesh_bed_leveling” as a setting. If you’re using Marlin, you’ll need to uncomment that line. The video also tells us to look for the “grid_max_points_X” which TH3D doesn’t include. Marlin users should be able to set this to 3, 4, or 5 to check 9, 16, or 25 points on the bed. LCD_BED_LEVELING is also a convenience setting that Marlin users will need to uncomment.

That is all that’s needed for firmware changes. Flash your build to the motherboard, and when it’s finished turn on the machine.

  • NOTE:
  • the TH3D instruction video for Creality printers uses the CR-10S and tells you to use Board: Arduino Mega 2560 and Processor: AT Mega 2560
  • The V1.1.5 board is a Sanguino 1284p that also uses the AT Mega 2560 processor
  • Also double check that you have only #define Ender3 uncommented; otherwise the Arduino IDE will try to flash the settings for a different printer
  • Do not have any of your slicer software running. For some reason that messes up the ports and you may get an error that the COM port is not available (this primarily applies to Windows users)

Go to Control and turn on the bed heater. I usually print at 65C for PETG, so I turned it up to 70C to ensure maximum bed-warping foolishness. In the Prepare menu you’ll now have a Bed Leveling option. Use your gage of choice (paper, thickness gage) to check that the nozzle is the proper distance from the bed. If it’s too high, turn the knob left and lower the height. I sometimes turn it way to the right to raise it some then work my way back down. I also try to not look at the numbers on the screen, instead focusing on the feel of the gage between the nozzle and bed.

When the settings are where you’d like them, select Store Settings from the menu. Then open your slicer and go to the area where you update your G Code. After your G28 command (home all axes) you’ll want to add M420 S1. This tells the slicer to use these z settings each time you start a new print.

That’s all there is to it. Run your favorite bed level test file to double check that it’s doing what you expect. Once it’s laying down the first layer to your satisfaction move on with printing other fun and useful things.

Manual Mesh Leveling for The Ender 3 3D Printer