I think I found a solution for failed Qidi auto bed-leveling

Basic Information:

Printer Model: Qidi X-Max 3
MCU / Printerboard: STM32F407 MCU/ MKS SKIPR motherboard
Host / SBC: MKS SKIPR motherboard
klippy.log
klippy.log (2.6 MB)

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

This relates to the Qidi X-Max 3, but probably others as well.

I think I may have found the bug in Qidi’s software that prevents proper auto-leveling. Tell me if you agree.
Let’s start at the beginning. The intro g-code relies on G29 to do the auto-leveling.

This is actually a marlin command and is meaningless to Klipper. So, to resolve that, they created a fluidd macro called G29 and defined it as follows:

Screenshot 2024-10-11 182208

So, it does all the work of gathering the mesh levelilng data and stores it in the temporary file kamp. But as near as I can tell, it totally fails at ever using it! That’s because it appears to be missing the crucial command afterward of “BED_MESH_PROFILE LOAD=kamp” For further explanation of that, seethis screen clipping:

which I got by consulting chatgpt. For that reason, it is not 100% authoritative, which is why I’m posting this here as a possible solution, so that it can be vetted by others also and not just me. What I can say for sure is that as a hypothesis, it is 100% consistent with what I see when printing a 325x325mm first layer test print, which increases my confidence even further that it is probably correct.

Apologies in advance if I got this wrong, but it sure seems to me like it has a high probability of being correct. Not only is Qidi completely new to me, but I’ve never before attempted to scratch below the surface of Klipper before. I therefore welcome any feedback and/or corrections.

Sorry I had to break this post in pieces. For some reason Discord would only allow me to upload a single “media” image per post.

I don’t know where that screenshot is from (it’s not the KAMP documentation and Google could not find it), but it’s completely wrong. When BED_MESH_CALIBRATE runs the profile it generates is applied immediately. It also gives it a name that can be loaded later with BED_MESH_PROFILE.

I did subsequently scour the Klipper documentation directly, but it is silent on the issue. So, what you claim may well be the case. My question is: how can you be sure it’s actually doing it?

The documentation is not silent on the issue, it says that the way to calibrate the bed mesh is to run BED_MESH_CALIBRATE.

I can be sure it’s actually doing it because A) I read the code, B) it’s trivially easy to verify with BED_MESH_OUTPUT, and C) Mainsail, the frontend I use, displays the current bed mesh as a pretty graph.

1 Like

@flowerysong
Just to be clear: are you experiencing no problems on your X-Max 3 when printing a “perfect first layer” test of 320x320mm x 0.2mm? i.e. a single layer that covers your entire printable area (like what Aurora Tech prints when comparing different printers)? Or did you in the past but resolved it some other way? Or you still are experiencing problems but see now way to resolve?

Please do let me know if you’re using some other machine. For instance, I observe no problems at all when printing a “perfect first layer” test on my CR-10 SE.

My first attempt at doing the test print on my Qidi X-Max 3 using just the standard settings resulted in this:

which happens to exactly correspond to the lowspots shown in the mesh bed picture. Subsequent attempts with stock settings and stock filament were basically the same.

It’s as though it detected the problem, but then did nothing about it.

What I do know is that I’m not the only one experiencing a problem with automatic bed leveling on the Qidi X-Max 3. On the Qidi facebook forum, a number of users gave up entirely and resorted to manual bed leveling using dial gauges. IMHO, if automatic bed leveling were working correctly, that shouldn’t be necessary.

Of course, none of this proves anything other than there’s evidence a problem exists for at least some users of Qidi X-Max 3. I don’t know whether it extends to other Qidi machines or not.

In support of @flowersong 's point, it does indeed appear to be “active” during the printing. So, I am at a loss to explain why it doesn’t seem to be helping.

I have no idea what an X-Max 3 is. I was responding to your statement about Klipper functionality that is not specific to any particular printer.

You likely have location bias which effects your results. Try using axis twist compensation. You might have a small twist in your X axis which skews your probe results.

https://www.klipper3d.org/Axis_Twist_Compensation.html

1 Like

Thanks for the suggestion. I’ll look into that.

I have a hunch now as to what the problem is. The Qidi X-Max 3 uses an inductive probe to measure distance to the bed. The inductive probe is offset to the right of the nozzle, and I suspect the inductive probe is giving inaccurate information on the right hand side, and especially near the corners. I believe that’s the case because on the rest of the build plate the inductive probe senses more or less a “plane” beneath it, whereas on the right hand edge I hypothesize it is also sensing the edge. That error “spreads” because of the bicubic algorithm and the fairly grainy 9,9 default probing. Also, the default is to take two measurements per measuring point and average them together. However, the first measurement is usually wrong.

So, to minimize these problems I did this as an experiment:

which collected 900 measurement points, measuring each one 5 times and then taking the median (to throw out the faulty first probe). Yes, that’s 4,500 measurements, plus whatever retries. I also increased the bicubic “tension” setting to 1. It can go as high as 2, but I’ve read that above 1 there’s increased risk of crashing the nozzle into the build plate, so I haven’t tried that yet. 4,500+ points is too time consuming to do every print, so I saved it and now it just loads that one mesh bed. I reduced the acceptable tolerance parameter to 0.01.

Anyway, long story short, it made the biggest improvement thus far. To push this a bit further, I’m going to increase the mesh points to 40x40 and try increasing the tension to 1.5, after which I’ll try printing another “perfect first layer.” So, yes, 8000 measurements plus re-tries, so this is something to run while you’re asleep at night and then save and re-use over and over rather than something to do before every print.

I’m thinking that an alternative would be to keep the grid at 9x9, but possibly manually edit the mesh in the problem areas to correct for measurement errors. If it turns out that the corrections are more or less the same each time, it might go quickly enough to be practical. I don’t know, though, as I haven’t yet tried it.

I’m posting this as a marker and to point out promising directions in case others are interested in this topic.

Reporting back: I just now became aware of eddy current bed leveling probes such as Beacon and Cartographer. Beacon even has submicron accuracy, and apparently either one can collect thousands of measurements in a matter of seconds. Therefore, they seem practically made-to-order for doing what I describe in my post immediately above by quickly collecting those thousands of measurements before each and every print. IIRC, either one integrates with Klipper. I’m not sure about Cartographer, but I read that Beacon runs on its own SBC like a raspberry pi and so, presumably, communicates with Klipper rather than reside on the Klipper motherboard per se.

Anyone here have experience with either one or have an informed opinion as to which of the two is the better one? Does there exist anything else of a similar nature that I should also consider, or is the choice basically one or the other? At the present moment I’m collecting opinions, so if you have an opinion, please post! I welcome it, either in support of the idea or contrarian to it. Especially valuable would be any direct experience or observations that you can share.

There is also the “BTT Eddy”, which has essentially the same functionality. While the Beacon and the Cartographer are not natively supported by Klipper (in some cases even considered licence incompatible) and require installation of 3rd party modifications, the Eddy is currently the only product that is natively supported.

In terms of performance, I cannot judge the differences or advantages / disadvantages of the individual products.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.