Automating calibration using first layers

Hi all,

I’m new to 3D printing - had my Mini for less than a week. I get pretty good prints just using the Cura Lulzbot profiles, but I’ve been seeing some artefacts in some kinds of print, and started reading through various guides and posts on this forum.

Something I noticed is that everyone is very slowly calibrating their machines by doing one print after another, adjusting settings between prints. To my (perhaps naive) mind, this could be automated to some extent.

I’m thinking of software that generates a grid of copies of a small test object to cover the whole print bed. Initially it only uses the first layer, and generates gcode using a parameter sweep over all the settings that people usually adjust. It prints all the objects, one object at a time, in a single print run. It displays a map on screen so you can see which objects have which settings. Then you rate the print on various artefacts for each position in the grid. If you’ve got a perfect print, you now know the best settings for the first layer, and the software moves on to do a similar process for increasing numbers of layers. If not, the software generates a new grid of settings for the first layer, and the process repeats until you get something good.

Does something like this exist? I googled quite a bit, but couldn’t find anything. If it doesn’t exist…

  1. Would people find something like this useful?
  2. Am I missing something obvious that would stop this approach from working?

My background is science software development (bioinformatics), including parameter optimisation for experiments. I’m lazy and impatient, so I’ll write the software to make this less painful unless there’s a good reason not to.

Nice idea, but…
The question is, what artefacts do you want to fight with this software? Usualy, you have 3 steps:

  1. Bed leveling: No software needed, only the proper tool and a sheet of paper or a feeler gauge or dial indicator.
  2. E-Steps calibration: Take a ruler and measure filament moved by extruder.
  3. Z-Endstop: Set it that there is a tiny little gap between nozzle and print bed, print a single outline layer. Measure height of line with a caliper, calculate the difference between your wanted 1st layer height and real one and enter as Z-offset in slicer.

Done.

Hello,
I was looking at your post. It would be interesting to see how your code would work for the process you explained. I did notice that Sebastian had good comments on the simplicity of the initial layer and other settings. For you, due to the fact that you have a Mini, you will need to either change initial layer settings in Cura or use this guide to set up the first layer squish.
You can adjust your Printers Z offset through Cura. Go ahead and connect to your printer, and bring up the control box. In the lower corner you will notice a text entry box. Within the box you are going to need to enter some manual commands to update the offset. Make small adjustments when changing, as large ones can cause your printhead to be dug into the bed or print in mid air.

M851 -> Reports current Z offset in mm

M851 ZXXX -> Changes offset to XXX in mm

M500 -> Saves settings

Here is an example:
If your M851 is -1.35 and you want to move the nozzle away from the bed, Then make the number closer to 0.
Make a M851Z-1.25 enter
This will move the the nozzle .1 farther from the bed.
Then do M500 enter to store the change, or it will go back to the previous setting.

When first testing this new offset, keep a careful eye on that first layer. If it appears the nozzle is being dug into the bed, turn off the printer and adjust the offset until it no longer does that.
This is a simple way for you to adjust the bed leveling for a Mini. The Mini uses a 5V feed from the nozzle, which completes a circuit when it touches the metal pad. The software then does a calculation of the average between the 4 bed corners and a preset distance of the bed from the metal contact pads. All you are doing with this procedure is changing the math of the distance of the bed to the metal pad.
I hope this helps with your adjustments.

As far as the concept of automatic setting adjustment during printing, there are a few projects that have attempted this. They used real time sensors like laser scanner or a webcam to determine when certain printing parameters need changing. None are production ready or being used in a printer yet AFIK.

Thanks both for the advice. I take the point that printer-wide settings are fairly simple to set in the way you’ve described. I was thinking more of filament-specific settings.

For example, nozzle temperature, flow %, speed of various print stages, etc.

For these the guides I’ve read all talk about varying them a bit at a time and checking the results, and it’s this process that I want to automate.

David - the software would be pretty simple. It would farm out all the GCode creation work to CuraEngine, but do the grid layout itself. Then it would simply chain together the GCode for the different objects, and wrap the whole lot in the start/finish GCode from the lulzbot profile.

The specific artefacts I’m trying to eliminate are:

  • resolution of holes: e.g. when I print this thing the holes are all too small (after printer calibration)
  • sharpness of corners: the radius of corners is quite large, and I’m pretty confident could be much sharper with the right speed+temp settings

Basically I’m trying to get the highest possible quality print in situations where fine surface detail is important - but I think the same sort of process would apply to other needs.

I’ve only been at this a month or so, and while the beginning can be very time consuming, it’s not too bad.

Interesting idea. I’ve seen a couple prints where the user would print a tower, or a series of blocks, etc., changing the temperature as they go. Some even printed the temperature into the print. That makes it pretty easy to see at a glance what happens when you change the temp.

For flow %, I have found that once you dial that in it seems to be about the same for various materials. I’ve done ABS, HIPS, and now PET. They all use the same flow rate.

One trick with multi part prints like that, if one breaks loose from the bed, you can have some… interesting… results. :slight_smile: If you start with first layer settings, bed temp and nozzle temp for adhesion and inter-layer bonds before moving to taller parts, it could work though.

Smaller holes are pretty normal it seems. Over extrusion is a big cause, so make sure that’s dialed in. And the first layer will always be a bit small as you generally print that over extruded intentionally to ensure good bonding to the bed surface. It seems to be known as “elephant foot”. Adjusting first layer settings can minimize it. Slowing down the perimeters helps with corners, but they will always have a bit of a radius to them, from what I’ve read. That’s not to say there isn’t room to improve them.

Read this, and you know why your small holes are smaller.
Then read this Guide to understand the corner issue, especially the part with the JKN advance factor which is the only method I know that can eleminate the issue. Very sad nobody implemented this into Marlin up to now…

Other things like print temperature is not affecting the quality in such huge ways as acceleration, speed and jerk does. The temperature can be interesting if you need the strongest possible parts (high temperature), but this also increases stringing (low temperature would be better).
As ttabbal said, flow factor is not very important in the most usual cases. If you set your E-steps properly and your filament diameter is right, you will almost never use it.