QGL behaviour on a Voron350

Can someone explain the behaviour of the QGL on my Voron 350mm?

The graphic shows the correction values prompted on the command line during QGL. Any colored line represents a correction value for one Z-motor (is this really what is prompted? I am not sure, if the Z-Numbers are correct. It is according to prompted lines) over 5 measurement steps. I just copied it by hand on a piece of paper, so there might be lost digits at the end of each number, but the behavior of the system is good to see: extremely bad convergence.

Is this my klicky probe? Or is this the algorithm? Or did I entered the wrong values for the QGL (see printer.cfg snippet below)?

The printer was heated approx 2h (!) before the measurement.

Here are the values itself
Z0;0,07;-0,01;0,04;-0,02;0,013
Z1;0,02;-0,008;-0,035;-0,003;-0,016
Z2;0,04;-0,09;0,06;-0,062;0,018
Z3;-0,14;0,117;-0,07;0,025;-0,015

Here my printer.cfg:

[quad_gantry_level]

gantry_corners:
   -60,-10
   410,420
#  Probe points
points:
   50,25
   50,275
   300,275
   300,25

speed: 100
horizontal_move_z: 20
retries: 5
#retry_tolerance: 0.0075
retry_tolerance: 0.02
max_adjust: 10

It looks like you are using the “stock” configuration for the 350mm spec. Measure the exact geometry of your printer and adjust the gantry_corners positions accordingly. These numbers will vary depending on how you built your printer and how you configured your print volume geometry (X and Y travel ranges & stop positions). It will only be off by a few millimeters but these errors are enough to cause undershoot or overshoot when the algorithm is calculating the corrections that are on the order of 0.01 mm or less.

The other factor affecting this could be mechanical build issues causing lack of repeatability on sequential measurements. Also keep in mind that your Z axis microstepping determines the minimum Z axis measurement resolution - Klipper cannot measure any differences in distance that are smaller than the distance of a single microstep.

Thanks for the reply, but I need some help here: That’s all I found for documentation so far:

#gantry_corners:
#   A newline separated list of X, Y coordinates describing the two
#   opposing corners of the gantry. The first entry corresponds to Z,
#   the second to Z2. This parameter must be provided.

If is goes to mm: what is the “corner” of the gantry?

1,2,3 or 4?

Middle point of the rail?

Outside the frame because it is a virtual point in space?

Mathematically, it should be that point (wherever it may be, maybe this pictures is completely wrong)? Is this right?

I am confused…

Honestly, when I look at your convergence graph(s), they don’t look that bad to me. Actually, they look like what I would expect with overage and underages converging to a point.

Since our last conversation, I’ve thought about the issue a bit and I think the algorithm is reasonably optimized when you consider that there are four corners to consider. I don’t think that the algorithm takes them fully into consideration when choosing the next point for each Z Axis driver - which means it has to be conservative because the movement in a corner will directly affect the other three. The first corner change doesn’t affect any of the others but when you move the next corner, it affects the first one, the third corner affects the previous two and the fourth corner affects the other three.

Now, I’m sure that somebody could do the math (as you have) for how the other three corners factor in to get a more accurate position - and I suspect that they have done the math and maybe discovered that there isn’t a huge advantage in terms of retries by calculating what each movement does to affect the other corners and then recalculating them again which results in everything having to be recalculated again and so on.

It’s an interesting problem and, as I said previously, it’s fascinating to watch the leveling operation for about two rounds and then it gets boring. It also takes a fair amount of time. I think that there is the opportunity to improve it but it will require a lot of work to come up with the right algorithm and then verify it that it doesn’t go out of control (and the axis adjustments get bigger) or, even worse, not improve the out of alignment measurements and the process goes on indefinitely.

As for where the “corner” is? I would say the centre of the Z adjustment bearing:

Quick calculation: 1 degr on the Z-Motor causes the Belt to move 0,037mm (38,4mm what is the perimeter of the last trolley *1 deg/(360 * 5,2) the 5.2 is the gear ratio of the Z-gear). My 350 has a x-beam length of 475mm, let’s assume 6cm to be the distance from the belt to the corner of the heatbed. So the elevation at the edge is 415,5mm * 0,037mm/475,5mm = 0,032mm. If your motor really moves to a single microstep (it will maybe not), in my case (32 micro steps) this would be 0,032/36 = 0,0009mm :wink: that should do anyway. Even if the positioning work only for 10 microsteps, it should be plenty of accuracy from that side…

You are 100% right! I am a big fan of iterating solvers!! You will not get a direct result I think. But the convergence ist “Mist!” (=crab). I would be very curious what would be, if anybody would add the proposed damping factor to the four lines, where the correction value is applied… I don’t know if it help (since I don’t know the reason of this overswinging) but sometimes a test will show…

But for the “Here” in the graphic, I am still a little skeptic (Sorry!). For my feeling, the point should describe the position of a “virtual” axis, where the gantry is turning upon??? This could be the middle or the outer corner of the y-rail. This is because if you have a difference in Z-Height between the left and the right Y-beam of the gantry, the “axis” of the shift should be somewhere in the vicinity of the bearings… But as always, I could be completely wrong of course, it is just my gut-feeling as an engineer.

Just to be exact, the final pulley on the V2.4 Z axes has a 40mm circumference (20 teeth at 2mm belt pitch) and the gearing ratio is 1:5 (or 16:80 to be precise). This results in 8mm Z movement per full stepper rotation, which is 0.04mm per step when using the spec 1.8° steppers. With your setting of 32 microsteps the Z resolution is therefore 0.00125mm. As you said, totally adequate.

I was merely highlighting that the Z position measurement resolution is quantized by the microstep resolution which adds additional scatter to the measurements.

It is the physical location on the gantry that the respective stepper moves - effectively when the stepper is commanding the gantry up by 0.1mm, it is the point in space that will move up 0.1mm (ignoring the small effect of the actual gantry assembly pivot point location in 3D space). So practically speaking, it would be the center-line of the Z belt on the inner-edge of the gantry extrusion, with the distance measured from your X=0, Y=0 point of the bed:

1 Like

Interestingly this has not been my experience at all. Since I fully tuned my printer mechanically and optimized the QGL configuration, the QGL typically completes in two iterations to achieve my configured 0.005mm tolerance. Occasionally the QGL requires three iterations, typically after I either move the complete printer or after I disturb the print head with motors disabled. Sometimes parking the head in a corner will cause sufficient droop asymmetry to also require three iterations.

For kicks, I manually disturbed the gantry on my printer to emulate the initial condition noted by @Berggipfel in his graph, but with the printer at room temperature. This is the result:

When you say you “optimized” QGL, what did you do?

What’s interesting to me is that in both your examples, you’re starting at a much smaller range than what I typically do. For my Voron, it’s usually around 0.2mm and for my custom CoreXY (which uses lead screws, which the gantry frame sometimes moves down) it’s typically 0.5mm to 1.0mm when I’ve left it with the motors off for eight hours or so.

From these respective ranges, it takes me 3 retries for the Voron and 5-6 for the CoreXY.

I was primarily referring to measuring and entering the exact positions for gantry_corners on my printer. But of course this also involves other important aspects such as: characterizing the probe accuracy and repeatability in order to select the optimum probing speed; using high microstep count, because I can and because it’s “free” using high speed MCU; mechanically locking in the gantry assembly after it has been levelled very well against the bed following a long and stable hoat soak; etc.

When I run the QGL test that I plotted I tried to force the gantry significantly out of alignment by manually rotating the 80T Z pulleys. Because the gantry has been locked-in when levelled and at temperature, it literally keeps springing back into alignment and I would have a really hard time pushing it out of alignment by more than 0.1mm. Although I am sure that if I tried to move both rear steppers in the same direction or two same side steppers in the same direction it would likely skew/slant much more easily.

Related, I see many people authoritatively overstating the importance of having lots of flexibility in the Voron 2.4 gantry and advising against use of CNC parts. My current opinion is that the gantry assembly can be very stiff, as long as it has been assembled and locked-in correctly. I will be validating this theory at some point by using CF infused ASA gantry printed parts.

Related, I see many people authoritatively overstating the importance of having lots of flexibility in the Voron 2.4 gantry and advising against use of CNC parts. My current opinion is that the gantry assembly can be very stiff, as long as it has been assembled and locked-in correctly. I will be validating this theory at some point by using CF infused ASA gantry printed parts.

I have aluminum CNC parts on my Voron. I bought them when I had problems with the printed four corner Z joints not providing what I thought was acceptable movement (is “sliding” the correct term for the 3D printed parts not moving well against each other?). I also used them for the gantry frame pieces because I wasn’t happy with how finicky the ABS printed parts went together (I had problems with the keyed parts fitting together).

If I ever go back and disassemble my Voron again, I’ll reprint the gantry frame pieces and ditch the machined ones as it’s clear you can have too much rigidity in the frame - especially with each corner being adjusted. I find situations where the belts above some joints are quite loose while below they are tight and visa versa. In my custom CoreXY, I use ABS 3D printed joints that are quite rigid, but not at the same level as I see on the Voron frame with machined joints and leveling works quite a bit better and I don’t seem to see mismatched tension/compression on the leadscrews.

I think the reason for people say that you need lots of flexibility is due to the extremes that the RatRig can work with:

Based on my experience with the Voron and my printer I would say that you want a minimal amount of flexibility but not be locked in completely.

I agree. I would highly recommend, in case you have not done that already, that you follow the steps outlined by Ellis to square your gantry in-situ AFTER you level it against the bed: Voron V2 Gantry Squaring | Ellis’ Print Tuning Guide (ellis3dp.com). This should remove most or even all of the preload that you are seeing with the CNC parts. It basically “locks” the gantry geometry by assembling it in the correct location and with the correct amount of “distortion” to be level. Of course this can somewhat change as the gantry traverses up and down.

Gone through Ellis’ guide (three times now). I wouldn’t call it “preloading”, I’d call it “loading” as I’m only looking at the belts after I’ve done a QGL.

If I start out with everything measured to the bottom side rails as accurately as possible, there is no apparent loading on the gantry frame. It seems to come about after I do a QGL even though the initial difference is quite low. As I was typing this, I started a QGL on the Voron with the initial results being:

Retries: 0/7 Probed points range: 0.102500 tolerance: 0.034000

It took 2 Retries (3 iterations of the sensing in all) to get to:

Retries: 2/7 Probed points range: 0.032500 tolerance: 0.034000

Of course, when I do it now, the belts all seem equally tight on either side of the bearings. I’ll have to look if the belt tension changes through the course of a print (which to me, would indicate that something is binding).

OK, I will try this tomorrow and see, what will be the difference. in the 3d model, this is -53,3mm in X-dir and 6mm in Y-dir (!). So I messed up plus and minus in my printer config. X=0;Y=0 is the front left corner is this right? X+ is to the right and y+ to the back?

@mykepredko and @ReXT3D could you copy your gantry values from printer.cfg? What size do you got? 350mm? Just to have an comparison.

And what kind of probe do you use?

Yes, that’s correct.

[stepper_x]
position_min: 0.0
position_max: 300.0
position_endstop: 300.0

[stepper_y]
position_min: 0.0
position_max: 309.0
position_endstop: 309.0

[quad_gantry_level]
gantry_corners:
   -60.0,4.0                               # measured
   360.0,376.0                             # measured
points:
   50.0,25.0
   50.0,225.0
   250.0,225.0
   250.0,25.0
speed: 300.0
horizontal_move_z: 15.0
retries: 10
retry_tolerance: 0.005
max_adjust: 5.0

damned, you got balls :wink:
I was working with probes, around 1000€ each and we finally got to an (repeatable) accuracy under room condition (no climate control) of 0,003mm. My probe for the Voron is about 0,10€…

LOL - I picked that value after quite a bit of work characterizing the homing and probing accuracy of the printer. Of course it is not a measure of absolute accuracy like your 1000€ probe undoubtedly was, but rather of repeatability based on the assumption that in the amount of time it takes to complete QGL the absolute accuracy does not significantly change. I am using a genuine OMRON inductive probe (not B-stock or a knock-off).

All my previous comments relating to QGL typically completing in two passes / iterations and my earlier plot are based on these settings. But my Voron is somewhat OCD, including high accuracy extrusion cuts, genuine HiWin linear motion system, “precision” assembly etc.

I have a 300mm 2.4. Using the same format as @ReXT3D (and copying from my printer.cfg):

[stepper_x]
position_min: -5
position_max: 310
position_endstop: 307

[stepper_y]
position_min: -5
position_max: 310
position_endstop: 308

[quad_gantry_level]
gantry_corners:
    -50,  -5
    350, 380
points:
     25,  25
     25, 275
    275, 275
    275,  25
speed: 300
horizontal_move_z: 10
retries: 5
retry_tolerance: 0.05
max_adjust: 4.0

My QGL Gantry Corners are set at the centre of the Z belts (which is why the first point’s “y” is negative).

EDIT: I just looked at my printer again to confirm the values. I wasn’t sure about the “-5” for the first point’s “y” after I saved this and it should probably be “5” but it works fine so I probably won’t change it.