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

Comparative costs for 3D prints -or- why high school chemistry is useful

Greetings! I recently purchased a resin 3D printer and got to thinking, “how much -does- it cost to print a miniature?”. I printed the same* mini in both resin and PLA plastic to get this started. It’s a skeleton from Fat Dragon Games that is designed to be printed without supports. I weighed them on the same scale, which displays three decimal places, so I’m fine taking an accuracy of two decimal places. (*Ok, they’re not 100% the same. the resin mini -does- have the thicker spear, and I think the skull was reworked a little as well. This is the upgraded model from FDG in response to people saying the end of the spear was breaking off during PLA printing.)

Resin on the left, PLA plastic on the right

Let’s start with the easy case, a FDM printed mini. FDM printers operate by pushing a plastic filament into a block that has a heater (to melt the plastic) and a nozzle (to direct the flow). The hot end deposits a layer of filament in very much the same way that frosting is piped onto a cake, then moves up a fixed amount to do the same with the next layer. This mini was printed at 0.12mm (120 micron). With FDM, there are no losses to speak of when I print a mini directly on the build plate, and if there are supports required, I can easily weigh those to consider them a part of my final cost.

The PLA-pro that I buy is currently $23 on Amazon (affiliate link if you want to check today’s price) and the rolls are 1kg. Simply moving the decimal place indicates 1g of filament is 2.3cents. Hooray for easy math. The PLA print weighs 1.97g so the PLA mini costs roughly 4.5cents. Four. Point. Five. Cents. This means for the price of three molded plastic minis I can print an army of about 180 skeletons.

Resin prints are formed from a bath of the resin goo. The build plate descends into the reservoir, UV light cures a layer of resin to the build plate, the plate moves up then back down to within some small distance from the bottom of the reservoir, UV light again and the process repeats. For this skeleton I printed each layer at 70micron (0.07mm). When the print is finished there’s some amount of resin that needs to be washed off the mini, and there are some losses when the resin is filtered during its return to the resin bottle. I’m going to say this is an ideal project where “only a little” of the resin spills out of the reservoir during cleanup, plus the film of partially-solid resin that surrounds the mini and is removed during post-processing combines to be 20% of the final weight. (This is partially based on conversations online regarding resin print costs in industry). I don’t know that’s an accurate value, but it’s a) within reason and b) easy to work with for math.

One thing I didn’t consider when I bought the Anycubic Photon is that resin, a liquid, is sold by weight? volume? Umm… I’m not sure. I know I pay $24.99 for a bottle, but the Amazon listing shows it’s both 500ml and 500g. Typically resins are sold by weight, and we found the cost of the PLA print by using weight, so let’s do that again, and we’ll say this resin costs $25/500g or 5cents/g.

For those of you a little rusty with your chemistry, density is mass divided by volume. 1ml (milliliter) of water ideally weighs 1g (gram), which means its density is 1g/ml. Note that 1ml is 1cm^3 (which will be handy to remember in a minute). Intuitively I considered that UV curing resin cannot have the same density as water, simply because there are lots of things that make up this goo. So I looked up the spec sheet to find that it has a liquid density of 1.1g/cm^3 and a solid density of 1.184g/cm^3.

So, let’s figure out how much this skeleton cost in materials. I have a mini that weighs 3.22g and has a reported solid density of 1.184g/cm^3. But I didn’t put solid resin into the reservoir, which means I need to do a density calculation if I want to be accurate about this. And let’s be honest, we’re talking about 3D printing miniatures for Dungeons and Dragons… we’re freaking nerds so we’re curious about the accurate measurement!

I need the volume of the mini to find the weight of the liquid resin so I can figure the cost per gram. density is mass/volume, so volume is mass divided by density. For the solid: 3.22g / 1.184g/cm^3 = 2.72cm^3. Now I take this volume and multiply it by the solid density to get the mass of liquid resin: 2.72cm^3 * 1.1g/cm^3 = 2.99g liquid resin.

Gut check – does this make sense? I assume the volume stays the same, only the density of the material is changing as a response to exposure to 405nm UV light. A more dense material for the same volume will weigh more.

Let’s add 20% to the liquid mass as described above to get our total liquid mass used in this project: 3.58g. At 5cents per gram, the resin skeleton cost a whopping 17.94cents. That means I can only print 47 skeletons for the cost of the Reaper skeletons listed above.

Rhetorical question: is this a reasonable comparison if we’re only printing 28mm miniatures in the Dungeons and Dragons medium- to large-size? Or, which printer should you buy if you only want one?

The Ender 3 that I listed above has a couple upgrades, in particular to the build surface. I prefer a glass build surface, and I upgraded the extruder gear (hob) on my machine. The machine linked is roughly $260 and I added about another $40 in parts to mine (here’s a link if you want a more bare-bones machine if you also plan to do these small upgrades).

My Anycubic Photon was purchased on sale for $340 and I have added nothing to it. I continue to use the included USB drive despite knowing it’s probably garbage, and I’m still using the resin and FEP sheet that were included in the box. Today, the machine is closer to $450.

I don’t think there’s a reasonable argument that the resin print does not look significantly better than the PLA print at the distance that picture was taken. This print is 100% on par with models that are available commercially, and I dare say they’re better because the spear isn’t all wobbly (I’m looking at you, Reaper). The resin prints cost more, oddly because the prints weigh more, not due exclusively to resin costs (though that’s what I expected coming into this). The resin printer’s layer height has a useful range of 20micron to 100micron. The print time on the resin skeleton at 70micron was about five hours. But! I can fit ten six* skeletons on the print bed and I can print them all at the same time for no additional time cost; the printer illuminates everything in a layer at the same time. On the other end, large prints, like a two-inch-tall section of terrain will still take five hours, at 100micron and I’ll have to add development time to hollow out the model and add holes to let uncured resin seep out.

* I did check how many minis I can print on the Photon’s bed and six is really the max because I print at a 40 degree angle, leaning back.

The resin printer lives in the garage because the smell is really powerful (think tire store, or cheap Chinese tools). It sits inside a disposable aluminum turkey pan in case the resin spills. I have to wear gloves and eye protection when handling anything that may have uncured resin on/in it. Each print has to go into an isopropyl alcohol bath for initial resin removal then a second alcohol bath to ensure the partially cured resin layer has been removed. Then each print goes into a UV curing chamber for at least 10 minutes, as do the paper towels I use to clean up, and the filter funnels I use when returning resin to the bottle. This translates to roughly another $60 in expenses for post-processing.

The FDM print, compared to commercial models looks pretty good. Put some paint on it, put it on a table in a room that’s lit for D&D and I suspect no one will know it’s a 3D print unless they already knew it was a 3D print. The miniature took roughly 90 minutes to complete. Each additional mini adds about 105% time because there’s time lost waiting for the print head to move from one mini to another. The FDM printer’s layer height has a useful range of 120micron to 320 micron (0.12mm to 0.32mm). This means the mini shown above is about as good as it gets with FDM but I can print larger pieces like terrain without it taking all day for a single two-inch-tall tile. I can swap out the nozzle for something larger, which gives me a higher top-end for layer heights and the slicing software knows it can push a wider bead of filament. The opposite is not true, unfortunately. I spent many many hours trying to make a 0.2mm nozzle print layer heights of 0.04mm (still 20% of the nozzle’s diameter) and could not produce reliable results that look better than what you see above. Mostly the issues came down to the filament clogging in the nozzle.
FDM printers also have a larger range of bed sizes. I printed the pieces for this Tiamat model at 150% of the original, and each wing is twelve inches, which just fit my build plate.

The FDM printer lives in my basement and I’ve had two of them running during game nights in their cabinets and no one knew they were working until I mentioned it during a break. I can handle bare filament and printed filament with bare hands. FDM prints are ready to go as soon as the print head stops depositing plastic.

If I had to have only one I would have an Ender 3, despite really appreciating the larger build volume of my CR-10S. But the Anycubic will be fantastic for printing “special” minis like player heroes, bosses and military vehicles that require high detail to fit the game. If I need more minion pieces, like skeletons, they’re going to be printed on an FDM.

Comparative costs for 3D prints -or- why high school chemistry is useful

Why I Switched to Capricorn XS PTFE Tubing

In 2018-style, this is not a sponsored post. I’m simply very impressed by this product and I want to share why.

Earlier this year I began experimenting with PETG on my Monoprice Maker Select Plus (MMSP). The MMSP is a direct-drive printer with a 34mm PTFE tube that guides the filament through the heat break and into the nozzle. The PETG I was using required a temperature of 245C to flow properly. However, the PTFE that came with the MMSP was not up to the task and it began to deteriorate in short order.

If you’ve not had a PTFE melt down the easiest way to tell there’s a problem is that the filament starts to act as though there’s a clog. You can clean the nozzle all day long, but the problem is that the PTFE is becoming gummy. The other problem is that PTFE is teflon, and vaporized teflon is not something humans should be breathing (as happens when PTFE tubing overheats to the point of losing its integrity).

I am deeply resistant to the refrain of “just get an all-metal hot end!!”. For every person whose printing hobby is saved by an all-metal, just as many find that they regret spending the money and that they wasted their time. I am also cheap. While searching for alternatives to the white PTFE that came with the MMSP I quickly found reference to Capricorn.

Capricorn’s XS PTFE tubing is reportedly able to retain its integrity up to 260C, which is (for all intents a purposes) well above the temperature I intend to print at. It’s also $12 per meter. The MMSP requires 34mm of tubing. That 34mm of tubing put me back in business and my PETG printed flawlessly. That alone is enough to prompt me to evangelize the product.

I also run a Creality CR-10S, which is an indirect/Bowden tube design. With this machine I’ve been using a 1.0mm nozzle to print terrain pieces. The increased size lets me print the same weight of filament in a fraction of the time. For example, a 25-piece run took 49 hours using a standard 0.4mm nozzle. The second time I was able to do it in 17 hours with the 1.0mm nozzle. I have taken advantage of being able to put more filament through the hardware.

Today my prints almost indicated that there was a clog (!!) in the nozzle. They had terrible line width, the perimeter overlap was almost nonexistent, I had all manner of blobs/zits (and this was with retraction, coasting AND extra restart distances set in Simplify3D). My infill was garbage. Rectilinear and Fast Honeycomb looked like someone carelessly laid some filament into the cavity of the print. But how is a 1.0mm nozzle going to get a non-fatal performance-reducing clog? (It does happen with 0.4mm nozzles.)

I noticed a slight grinding sound, like something was catching somewhere. I isolated the sound to the stock PTFE tube. As I still had the better part of a meter of Capricorn XS I cut a section to length and installed. I’ve only heated PLA with this printer and I haven’t exceeded 225C for any print, so I figure the PTFE was simply wearing out from friction. I’ve been running this printer at least 20 hours a week since the end of November 2017 and have emptied not less than 10 rolls of PLA. Probably any replacement PTFE would have done the job. Be that as it may, the Capricorn PTFE made an immediate difference. My initial layer line widths are nice and wide, the infill Wiggle pattern is crisp, and overall there appear to be no underextrusion issues.

I’m hopeful this PTFE has added wear resistance on account of it being a more slippery product; so much so it’s tangible. Simply holding the Capricorn feels more slippery than any of the white tubing I have, even after I’ve wiped the Capricorn to remove any potential oil residue. I will update when I feel I need to replace the tubing again.

Why I Switched to Capricorn XS PTFE Tubing

A Few Words About RPG terrain

Not my usual fare about software, but nerd do nerd things.  I had a misstep with 3D printing last November, but in March I started printing PLA filament in earnest. Dungeon terrain is the reason I started.

Dwarven Forge

If you’re familiar with dungeon terrain these are probably the folks you’re most familiar with. My significant other backed several of their kickstarter campaigns, and for several hundred dollars she’s able to put together a dungeon or cavern of moderate size. Hers are pre-painted, each tile has good weight to it, there is clearly a lot of effort put into making a product that, as others have noted, can be run over by a truck then put on the table for play (don’t run over your gaming equipment).

But when they released their castle expansion I sort of put my foot down. For her to buy the pieces that would look like a castle (crenelations, portcullis, etc) she was looking at over $1000 (for the painted set). That prompted us to look into 3D printing.


From what I’ve found there are two major 3D printable terrain options: Dragonbite (Fat Dragon Games) and Openlock (Printable Scenery and several designers on Thingiverse). They work on the same basic concept – a slot in the base allows you to use a clip to hold the sections together. Despite statements about open source terrain (hence Openlock) the two systems’ clips are not compatible.


Fat Dragon Games (Dragonbite) 

These folks are known for their paper terrain. Print it out on card stock, cut out the shapes, a little Slot-A/Tab-B action and you have quick neat terrain. A couple years ago they started making 3D models and the amazing thing about these was that the bases clipped together. You could make entire dungeon levels and keep them off the table until the PCs had entered the area. When you needed it you just put the entire thing into place. This philosophy carried into the Dragonbite system.

Open Forge and Printable Scenery (Open Lock system)

It looks to me like there are two Open Lock systems, one uses clips and the other looks like it’s designed to have magnets in the bases. I appreciate that there are paid options from Printable Scenery (it looks like really nice stuff) as well as really nice models that are available for free at Thingiverse, thanks to the prolific Open Forge project. I linked specifically to Devon Jones because I’ve downloaded and printed several of his models, but searching for Open Forge at Thingiverse yields a lot of results.

Which do I prefer?

Today it’s the Open Lock style. Functionally it’s more like Dwarven Forge (which we have a fair amount of). Notice in the photos that the Open Lock tile is 2×2 and the wall attaches along the side. This is a huge benefit to me for two reasons. 1) I get the full 2×2 space for my minis, rather than having to worry about whether a party of four can fit in the corridor. 2) It’s so much easier to store! I’m really picky about my storage and have resorted to using a baseball card box to store the “L” shaped Fat Dragon tiles. The open lock tiles come apart. All the walls and floors are 2×2 and that’s a shape that is much easier to store. [edit to add: I can also mix and match the walls and floors as needed, as well as swap out. Maybe in this dungeon there’s a mystery to be had behind the crumbling wall in a dungeon that is otherwise made of carefully carved stone, but the floor doesn’t yield any clues. When the PCs find the mystery spot I can just trade piece for piece.]

Is this a fair comparison with Dwarven Forge? Didn’t you say your costs were based on painted terrain? 

I think it’s fair. The models are the same size and they are attempting to achieve the same end. Dwarven Forge has a lot more overhead, but this is what 3D printing is trying to disrupt. My overhead is the printer ($500-ish), filament ($25 for a kilogram and each model uses 20-50 gram, depending). I can print my terrain as hollow or as solid as I want. At 15% infill the printed models are definitely solid enough for tabletop use and transportation. Add extra shells (outside layers as well as top and bottom layers) and they are solid. There are 3D printing torture test videos on YouTube that demonstrate the toughness of well-printed parts.
As for painted terrain, I also caught the painting bug. The stone wall is printed from the same PLA as the wall sections but I primed it with a dark gray primer, shot it with a dark gray (almost black) “stone texture” paint and used some $1.29 craft paints to add some color to individual stones and the gate.  These are two of six stone walls and it took about 45 minutes to finish them, though when printed in gray PLA there wasn’t any need to – they would have worked just fine without painting.

So there is a quick overview of the major modular terrain options. Game on!

A Few Words About RPG terrain