Automatic Bed Leveling combined with Mesh Compensation



  • Hello,

    I'm currently setting up the 3 motor bed leveling and additional mesh compensation using a BLTouch on my printer.
    So far things seem to do at least something, however I'm running into an issue.
    When I'm doing a mesh compensation (G29) right after bed leveling (G32), the resulting mesh plane sits at a very obvious tilt.
    However, it's not a tilt between the two side Z steppers, but tilted along the axis where only one stepper is.
    alt text
    alt text

    (I've marked the locations of the Z leadscrews with pink circles)

    Here's my relevant config.g parts:

    M584 X0 Y1 Z7:8:9 E3                           ; set drive mapping
    M671 X-40:144:328 Y93:373:93 S5
    
    ; Z-Probe
    M950 S0 C"duex.e6heat"                         ; create servo pin 0 for BLTouch
    M558 P9 C"^zprobe.in" H5 F1000 T10000		   ; set Z probe type to bltouch and the dive height + speeds
    G31 X-32 Y25 Z1.87 P25                         ; set Z probe trigger value, offset and trigger height
    M557 X0:270 Y25:285 P8                         ; define mesh grid
    

    And here my bed.g (which I've set up to also do the mesh compensation at the end)

    M561 ; clear any bed transform
    G28 ; home
    G30 P0 X-10 Y93 Z-99999 ; probe near a leadscrew
    G30 P1 X144 Y290 Z-99999  ; probe near a leadscrew and calibrate 3 motors
    G30 P2 X265 Y93 Z-99999 S3; probe near a leadscrew
    G28 Z
    G29
    

    Any idea why I my bed ends up at such a large tilt after applying both true bed leveling and mesh compensation?

    Here's a bunch of stats:
    Duet Wifi with Duex5 running 3.01 RC12
    24V system
    All steppers 0.9Ā° ones, Z are e3d compact but powerful steppers
    Actual printer is a RatRig V-Core Pro

    I hope someone can help me, thanks! šŸ™‚



  • @Diamondback Morning, I think your Z probe config is wrong. M950 and M558 need swapping.

    This is mine

    ; Z probe and compensation definition
    M558 P9 C"^zprobe.in" H5 R1 F120 T6000 A5 S0.02  ;BLTouch connected to Z probe IN pin
    M950 S0 C"duex.pwm1"				             ;BLTouch Servo (S0) on duet pwm1
    

    Try that first and see if that helps

    Regards,
    Paul.



  • Morning, might also be worth rechecking your mounts to the linear guides for any play as your picture shows the build plate is attached via 2x t-slot nuts each side? id also check for any binding on that rear Lead screw as it looks like from the pictures the bed plate is pivoting on the guide mounts for some reason, of course Iā€™m also assuming the lead screws are matched along with the motors, anyway just my take on the issue šŸ™‚

    Regards Jim



  • Thanks for your answers! šŸ™‚

    @PaulHew said in Automatic Bed Leveling combined with Mesh Compensation:

    Try that first and see if that helps

    That didn't make a difference I'm afraid...

    @jumpedwithbothfeet said in Automatic Bed Leveling combined with Mesh Compensation:

    might also be worth rechecking your mounts to the linear guides for any play as your picture shows the build plate is attached via 2x t-slot nuts each side

    Yes, that's correct. The linear rails are bolted to a 2020 extrusion along the entire length, then there's a aluminium plate bolted to the carriage, which is fastened to the actual bed frame via 2 drop-in M5 nuts on each side.
    I checked all of these screws, no play anywhere.

    @jumpedwithbothfeet said in Automatic Bed Leveling combined with Mesh Compensation:

    id also check for any binding on that rear Lead screw

    I can easily turn the rear screw by hand and have the bed move up and down in that direction. However, I'll take out the rear screw again, redo the anti-backlash nut and see if there's any debris or something there.

    @jumpedwithbothfeet said in Automatic Bed Leveling combined with Mesh Compensation:

    lead screws are matched along with the motors

    Yes, they are. The printer does also print fine and dimensionally accurate (in all axis), so it's not like something is completely wrong it seems.

    Further hints: I'm currently using sensorless homing, which I guess means that the accuracy of the screw locations is not perfect.
    I did the following to get the screw coordinates:

    • Home
    • Move nozzle as close as possible to the screw
    • Measure the rest of the way with a ruler.

    What kind of inaccuracies do I need to expect with this? Are there better ideas for measuring the screw locations?
    (I'm talking about the screws because obviously a wrong screw location for that rear one would cause exactly the effect I'm seeing, right?



  • What happens if you run G32 multiple times, do the corrections converge? It is usual to have to run more than one iteration to get a good result.



  • @gloomyandy said in Automatic Bed Leveling combined with Mesh Compensation:

    What happens if you run G32 multiple times, do the corrections converge? It is usual to have to run more than one iteration to get a good result.

    Call it multiple times after each other before doing the mesh compensation (still using just 3 points)? Or call the 3 points I have multiple times inside bed.g?



  • For now I'd just run it multiple times and look at the output to see if it is converging (you should see the corrections getting smaller each time). If it isn't converging then there is probably something wrong (either with the configuration or some sort of mechanical issue).



  • Hm, it seems that running G32 multiple times and then doing a G29 seems to improve the situation. I also tried adding more points within bed.g (just took my existing points x3 and adjusted the point index), that also seemed to help a little.
    However, even after running G32 3x with 9 points each time, there is still a noticeable slant in the original direction.
    alt text

    And yes, things are converging, how often am I supposed to call G32 for usable results?
    Why is this the case in the first place? Movement of the bed frame not 1:1 relating to actual bed surface movement?


  • administrators

    @Diamondback said in Automatic Bed Leveling combined with Mesh Compensation:

    Why is this the case in the first place? Movement of the bed frame not 1:1 relating to actual bed surface movement?

    Yes. To get an exact correlation, you would need to use a kinematic mount. The F parameter in the M671 command allows you to apply a deliberate over-correction, which may help it to converge faster.

    G32 will try to minimise the errors at the G32 probe points. Where are the probe points? You may find it better to probe as close to the 4 corners of the bed as you can.



  • @dc42 said in Automatic Bed Leveling combined with Mesh Compensation:

    The F parameter in the M671 command allows you to apply a deliberate over-correction, which may help it to converge faster.

    Alright, I'll try that.

    @dc42 said in Automatic Bed Leveling combined with Mesh Compensation:

    Where are the probe points? You may find it better to probe as close to the 4 corners of the bed as you can.

    They are currently as close as possible to the screws, 3 screws -> 3 points, that seemed to be the normal thing to do looking at the documentation. I'll try with 4 points in the corners instead.


Log in to reply