Mesh Bed Compensation NOT compensating enough



  • I use a 6mm Plain milled aluminium sheet as a hotbed.
    I expected this to be good, but I have deviations of -0.389 up to 0.362 mm. (Why so? are there any better options?)

    Anyway. Using mesh bed compensation this should be little of a problem.
    So I got myself a cheap duet clone and made my first heightmap. I fastly realized my sensor is crap, like 1 in 3 measures is completely off.

    So I wrote some fancy code which takes 12 heightmaps as input, pointwise kicks the 4 highest and 4 lowest measures out and averages over the middle 4. The result was a nice, even heightmap.

    I used the heightmap and realized, the compensation was not working as intended.
    I checked my code multiple times and did not spot an issue. I gave up and got myself the original BLTouch.

    Recorded the first heightmap and those measure errors were completely gone. The heightmap looked just like the one that came out of my code.
    AND ALSO BEHAVED LIKE THIS ONE.

    I still have insufficient bed compensation.

    When I print a level test (X with multiple O using the complete buildplate) at the temp the heightmap was recorded, I see the compensation working.
    It is working in the right direction, but still where my buildplate is at the highest point my nozzle is crashing the bed and at the lowest point the layers do not stick. It is compensating 1/3 of what it actually should.

    I already Set the Z-Axis Minimum to -.8 which should be easily enough to support the Uppermost deviation of 0.362. But it does not.
    I really do not know what to do. My last option would be to scale the heightmap Values all by a factor of 3, but this would be a dirty solution.

    Here my config:

    ; Configuration file for Duet WiFi (firmware version 3)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v2.1.8 on Wed May 06 2020 00:49:52 GMT+0200 (Mitteleuropäische Sommerzeit)
    
    ; General preferences
    G90                                                ; send absolute coordinates...
    M83                                                ; ...but relative extruder moves
    M550 P"Hypercube"                                  ; set printer name
    
    M667 S1                                            ; select CoreXY mode
    
    ; Network
    M551 P"Dreierpack1!"                               ; set password
    M552 S1                                            ; enable network
    M586 P0 S1                                         ; enable HTTP
    M586 P1 S0                                         ; disable FTP
    M586 P2 S0                                         ; disable Telnet
    
    ; Drives
    M569 P0 S1                                         ; physical drive 0 goes forwards
    M569 P1 S1                                         ; physical drive 1 goes forwards
    M569 P2 S1                                         ; physical drive 2 goes forwards
    M569 P3 S0                                         ; physical drive 3 goes backwards
    M584 X0 Y1 Z2:4 E3                                   ; set drive mapping
    M350 X16 Y16 Z16 E16 I1                            ; configure microstepping with interpolation
    M92 X80.00 Y80.00 Z800.00 E410.00                  ; set steps per mm
    M566 X600.00 Y600.00 Z12.00 E4000.00              ; set maximum instantaneous speed changes (mm/min)
    M203 X36000.00 Y36000.00 Z6000.00 E18000.00        ; set maximum speeds (mm/min)
    M201 X2000.00 Y2000.00 Z100.00 E6000.00           ; set accelerations (mm/s^2)
    M906 X950 Y950 Z950 E950 I30                       ; set motor currents (mA) and motor idle factor in per cent
    M84 S30                                            ; Set idle timeout
    
    ; Axis Limits
    M208 X0 Y0 Z-.8 S1                                   ; set axis minima
    M208 X342 Y308 Z275 S0                             ; set axis maxima
    
    ; Endstops
    M574 X1 S1 P"xstop"                                ; configure active-high endstop for low end on X via pin xstop
    M574 Y1 S1 P"ystop"                                ; configure active-high endstop for low end on Y via pin ystop
    M574 Z1 S1 P"zstop"                                ; configure active-high endstop for low end on Z via pin zstop
    
    ; Z-Probe
    M950 S0 C"exp.heater3"                             ; create servo pin 0 for BLTouch
    M558 P9 C"^zprobe.in" H1.5 F60 T18000               ; set Z probe type to bltouch and the dive height + speeds
    G31 P10 X27 Y11 Z0.86                               ; set Z probe trigger value, offset and trigger height
    M557 X30:330 Y11:308 S30                           ; define mesh grid
    
    ; Heaters
    M308 S2 P"e1temp" Y"thermistor" T105526 B4138     ; configure sensor 0 as thermistor on pin bedtemp
    M950 H0 C"bedheat" T2                              ; create bed heater output on bedheat and map it to sensor 0
    M143 H0 S120                                       ; set temperature limit for heater 0 to 120C
    M301 H0 P131.9 I1.423 D566.0                       ; disable bang-bang mode for the bed heater and set PWM limit
    M140 H0                                            ; map heated bed to heater 0
    M308 S1 P"e0temp" Y"thermistor" T103901 B4138      ; configure sensor 1 as thermistor on pin e0temp
    M950 H1 C"e0heat" T1                               ; create nozzle heater output on e0heat and map it to sensor 1
    M143 H1 S280                                       ; set temperature limit for heater 1 to 280C
    M307 H1 A1123.6 C133.0 D3.5 S0.60 V23.9 B0         ; disable bang-bang mode for heater  and set PWM limit
    
    ; Fans
    M950 F0 C"fan0" Q500                               ; create fan 0 on pin fan0 and set its frequency
    M106 P0 S0 H-1                                     ; set fan 0 value. Thermostatic control is turned off
    M950 F1 C"fan1" Q500                               ; create fan 1 on pin fan1 and set its frequency
    M106 P1 S1 H1 T120                                 ; set fan 1 value. Thermostatic control is turned on
    
    ; Tools
    M563 P0 S"Hotend" D0 H1 F0                         ; define tool 0
    G10 P0 X0 Y0 Z0                                    ; set tool 0 axis offsets
    G10 P0 R0 S0                                       ; set initial tool 0 active and standby temperatures to 0C
    
    ; Custom settings
    ;M572 D0 S0.3                                       ; PRESSURE ADVANCE
    M593 F44.3                                         ; Dynamic Acceleration Adjustment (13mm, 9 Vibrationen)
    ;M592 D0 A0.0536 B0.0036                            ; Nonlinear Extrusion
    
    
    
    
    ; Miscellaneous
    M501                                               ; load saved parameters from non-volatile memory
    M911 S22 R23 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss
    T0                                                 ; select first tool
    
    G29 S1 "heightmap.csv"
    
    
    

    Here your help:
    (Many thanks in advance)



  • how does your initial Gcode look like? Are you telling the printer to use the compensation? also, are you homing Z before you start the print?. The printer needs to know where your bed is and it does so with a G30 command. Depending of the printer's kinematics a G28 Z also suffices, I believe.


  • Moderator

    @Tryptamine said in Mesh Bed Compensation NOT compensating enough:

    G29 S1 "heightmap.csv"

    Do not load the heightmap in config.g, you must only load it after Z0 has been established with the probe.

    Please post your homing files and your slicer start gcode.

    An image of your heightmap may also help.



  • @FelixH said in Mesh Bed Compensation NOT compensating enough:

    Are you telling the printer to use the compensation?

    @Tryptamine said in Mesh Bed Compensation NOT compensating enough:

    I see the compensation working.

    The comp is working. The Z-Spindles are turning when I move in x-y- direction.

    @Phaedrux said in Mesh Bed Compensation NOT compensating enough:

    @Tryptamine said in Mesh Bed Compensation NOT compensating enough:

    G29 S1 "heightmap.csv"

    Do not load the heightmap in config.g, you must only load it after Z0 has been established with the probe.

    Please post your homing files and your slicer start gcode.

    An image of your heightmap may also help.

    Really? I added that line later, the comp does also work just as bad when I uncomment this.

    The reason I already load it in the config is to prevent the nozzle from moving into the bed.
    I could otherwise move it into the bed, because My z axis minimum is -1 (which is necessary to allow height correction in negative z direction)

    Unbenannt.PNG

    homeall.g:

    ; homeall.g
    ; called to home all axes
    ;
    ; generated by RepRapFirmware Configuration Tool v2.1.8 on Wed May 06 2020 00:49:52 GMT+0200 (Mitteleuropäische Sommerzeit)
    G91                     ; relative positioning
    
    G1 H2 Z3 F18000
    
    G1 H1 X-350 F12000
    G1 X5 F12000
    G1 H1 X-350 F360            ; home X axis
    G1 X5 F12000
    
    G1 H1 Y-330 F12000
    G1 Y5 F18000
    G1 H1 Y-330 F360
    
    
    G90 
    
    G1 X145 Y139 F18000
    
    G30
    G1 X342 F18000
    
    
    

    Slicer Start GCode:

    M561
    G28 ;Home
    G29 S1 P"heightmap.csv"
    
    
    G1 X350 Y20 F18000
    G1 Z0
    
    G1 X332 Y20 F18000
    G1 Z0.2
    G1 X330
    
    G1 X315 Z0.25 F120 E50
    ;G91
    ;G1 E-5 F1000
    ;G90
    G1 X330 Z0.2 F400
    G4 P3000
    G1 Z0.1 F9000
    G1 X300 Z0.35 F18000
    
    G1 X150 Y150 F18000
    ;G91
    ;G1 E5 F1000
    ;G90
    


  • https://forum.duet3d.com/topic/16185/mesh-bed-leveling-not-moving-bed/2

    Is from where I got the idea of changing the Z-Minimum to a negative value and adding the heightmap in the config to prevent bed crashes.

    I thought this would solve the issue, which it did not.



  • I can gladly share my config and initial gcodes, but I'm still running RRF2


  • Moderator

    @Tryptamine said in Mesh Bed Compensation NOT compensating enough:

    Z-Minimum to a negative value

    This will help allow you to move down lower with baby stepping, but the mesh compensation should be able to adjust to follow the bed regardless because it's not going down below 0, it's adjusting to keep 0 at the surface of the bed. Provided of course that the probe has provided an accurate map of the surface of the bed.

    Your homing files look alright. Loading the heightmap at startup without first establishing the bed surface can cause an offset in height. Loading it in the slier start gcode like you are doing is the correct way to do it.

    Usually if the compensation isn't accurate to the bed surface it's because the probe offsets are incorrect, or the points measured aren't accurate either due to the probe itself not being consistent or due to effector tilt or other geometry problems twisting the probe/nozzle relation depending on XY position.


Log in to reply