Mesh bed levelling oddities



  • I've just finished rebuilding an old i3 style cartesian printer with a new aluminium extrusion frame, Bondtech extruder bowden setup and a Duet Wifi controller running version 1.20 of the firmware and web control.

    I'm having issues getting mesh bed levelling to work repeatably which may just be a mis understanding on my part.

    I'm using an inductive z-probe onto a 3mm aluminium bed levelled with 4 screws. I've levelled it manually as best I can.

    I've calculated the z-offset using the paper method and get an 1.54mm which I've put in my config.g file.

    [[language]]
    G31 P500 X35 Y0 Z1.54 
    
    

    When I home all axes Z is set to 1.54 as expected.
    Running a single layer print with this setting allows me to use microstepping to finely tune the offset to get a good layer (-0.03mm). I update config.g with this new offset of 1.57.

    [[language]]
    G31 P500 X35 Y0 Z1.57
    
    ```Printing larger single layer test show that the bed is not flat across the whole area so I tried mesh levelling using the following procedure.
    

    [[language]]
    G31 P500 X35 Y0 Z1.57
    M557 X15:195 Y15:195 S20

    
    Home all (Z = 1.57)
    Run Mesh Grid Compensation.
    
    Visulaization shows a slightly lumpy bed but nothing too far out.
    
    I tried printing the single layer test again and it ground the head into the bed.
    
    Checking the homing again it shows a Z offset of 1.80 rather than 1.57 so as expected the head drops 1.6 mm before extruding the test layer (1.80 - 0.2 layer height) and hits the bed which is at 1.57.
    
    Turning off mesh compensation and it homes again at 1.57
    
    The home position and the first probe point are at the same location so I would have expected the heightmap.csv to show 0 for the first point.
    

    [[language]]
    RepRapFirmware height map file v2 generated at 2018-02-19 12:33, mean error -0.303, deviation 0.108
    xmin,xmax,ymin,ymax,radius,xspacing,yspacing,xnum,ynum
    15.00,195.00,15.00,195.00,-1.00,20.00,20.00,10,10
    -0.065, -0.083, -0.095, -0.110, -0.115, -0.113, -0.090, -0.075, -0.055, -0.013
    -0.093, -0.120, -0.158, -0.175, -0.200, -0.213, -0.203, -0.198, -0.180, -0.150
    -0.133, -0.178, -0.223, -0.248, -0.268, -0.283, -0.285, -0.280, -0.265, -0.243
    -0.225, -0.255, -0.298, -0.310, -0.323, -0.345, -0.333, -0.323, -0.300, -0.270
    -0.253, -0.288, -0.317, -0.345, -0.368, -0.380, -0.378, -0.373, -0.360, -0.325
    -0.305, -0.340, -0.378, -0.393, -0.415, -0.410, -0.405, -0.405, -0.375, -0.343
    -0.315, -0.353, -0.383, -0.405, -0.425, -0.433, -0.420, -0.423, -0.383, -0.370
    -0.333, -0.368, -0.393, -0.415, -0.438, -0.442, -0.433, -0.425, -0.403, -0.375
    -0.315, -0.348, -0.385, -0.398, -0.420, -0.428, -0.420, -0.413, -0.398, -0.375
    -0.270, -0.303, -0.335, -0.355, -0.368, -0.370, -0.370, -0.368, -0.348, -0.325

    Could anybody give me some pointers to what's going on.
    For the moment I've abandoned using mesh levelling and just live with the imperfect first layer but I'd like to get it working.
    
    Thanks
    
    Richard

  • administrators

    From your description, I think you are probably homing Z using the Z probe to probe with the head at point (15, 15). it that right?

    Your height map shows a difference of about 0.3mm between points close to that corner and the rest of the bed. So I think either that corner of the bed is bent, or something else is affecting the reading of your inductive sensor in that region.

    When you say "The home position and the first probe point are at the same location so I would have expected the heightmap.csv to show 0 for the first point.", have you allowed for the fact that when probing, the firmware allows for the declared X and Y offsets of the probe? The first G29 probe point will put the inductive sensor at (15, 15) which means putting the head at (-20, 15). Whereas if your homeall.g files puts the head at (15, 15) and then executes G30, it will probe where it is, which would have the inductive sensor at (15, 50).

    When using an inductive sensor to do Z homing, I recommend you probe near the centre of the bed. If the main problem is that the bed isn't flat, probe with the sensor at bed centre. If the main problem is that the gantry sags when the head is near the middle, probe with the nozzle at bed centre.



  • Richard,

    I thank you for this post. I too am having similar trials with my cartesian [ Prusa Mk2 upgraded to Zaribo frame ] ….

    Like you Ive been babysitting and babystepping into a good 1st layer using a wide skirt and a magnifying glass on - each and every print ... else my mesh bed compensation has me ranging from a first layer of Z at babystep adjustments of -.10 or at + .24 - what a mean is first layer after babystep adjust ment for a .20 1st layer is actually with Z / nozzle at .10 or like yesterday morning ... the nozzle was printing a first layer of height .20 @ .44 of the bed or what the machine thought was zero.

    If im honest its doing my head in. Bed is NOT that far out ... its random and its different every day and every print ... Im at a loss.

    One thing I did not do on this round of tweaking on it, but is different than you, is - I did NOT adjust the Z Trigger height offset after having to adjust with Babystepping. Ive probed the bed in the center literally 100 times and decided upon the mathematical average of all probes.

    Hoping to glean a solution from your similar trial here ... not sure I can help - Id love to, but dont want to confuse you. Will await dc42's replies.



  • @dc42:

    From your description, I think you are probably homing Z using the Z probe to probe with the head at point (15, 15). it that right?

    Yes that is correct

    @dc42:

    When you say "The home position and the first probe point are at the same location so I would have expected the heightmap.csv to show 0 for the first point.", have you allowed for the fact that when probing, the firmware allows for the declared X and Y offsets of the probe? The first G29 probe point will put the inductive sensor at (15, 15) which means putting the head at (-20, 15). Whereas if your homeall.g files puts the head at (15, 15) and then executes G30, it will probe where it is, which would have the inductive sensor at (15, 50).

    My homez.g and homeall.g have the following for the position

    [[language]]
    G1 X-20 Y15 F6000      ; go to first bed probe point and home Z
    G30 
    ```From my understanding this should, allowing for the probe offset from the nozzle have the probe using 15,15 the same as the start position for the mesh.
    
    My reasoning for homing at the corner was that then I could compare the z position from homing with the position at the start of mesh generation. I had thought that they would be the same.
    
    @dc42:
    
    > When using an inductive sensor to do Z homing, I recommend you probe near the centre of the bed. If the main problem is that the bed isn't flat, probe with the sensor at bed centre. If the main problem is that the gantry sags when the head is near the middle, probe with the nozzle at bed centre.
    
    I'll try using the centre of the bed tomorrow. I think it's the bed that's off as the x gantry is 2020 profile with a 12mm linear rail bolted to the top.
    
    Anyway thanks for your help.


  • I do have a Cartesian printer and mesh works fine for me. I am homing to Z-max and using a capacitive probe for bed leveling. I would suggest you to perform a repeatability test wit a Macro:

    [[language]]
    G1 X86.5 Y105 Z20  ; Move probe to bed center, not nozzle tip.
    G30                            ; Find the bed
    G1 Z10                      ; Raise the X-carriage 
    G30 S-1                     ; Probe and report the value
    G1 Z10                     ; Raise the X¡-Carriage
    G30 S-1                     ; Probe and report the value
    ....                              ; Repeat G1 Z10 G30 S-1 as many times as samples required 
    
    

    I copied the output of the G-Code console onto an spreadsheet and calculated average and standard deviation. My standard deviation is 0.016 for a capacitive sensor. On the config file I used "average+standard deviation" as Z offset.

    For the mesh leveling, I am using a Macro which works beatifully and because I probed in the center, the view if very representative of the tunings that I need to do for a better leveling:

    [[language]]
    G28 Z0			 ; lets move to the ceiling to avoid crashes
    G28			 ; homeall.g 
    G1 X86.5 Y105 F6000	 ; move to center of the bed
    G1 Z40 F1000		 ; Fast move to lower Z
    G1 Z10 F500		 ; Medium move to lower Z
    
    G30			 ; Probe the bed at the current XY position. When the probe is triggered, set the Z coordinate to the probe trigger height.
    G29 S0 			 ; Run probing sequence defined by M557 on the config.g
    M374 			 ; Save calibration data. Default is sys/heightmap.csv
    G1 X-5 Y-2 Z10 F4000 	 ; Go outside the bed
    
    

Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.