Mesh Bed Compensation not compensating?



  • Hi Forum,

    I have a Prusa Bear Mk3s running a Duet 2 Wifi with RepRap FW 3.1.1.

    Config:

    ; Configuration file for Duet WiFi (firmware version 1.21)
    ; executed by the firmware on start-up
    ;
    
    ; General preferences
    G90                                         ; Send absolute coordinates...
    M83                                         ; ...but relative extruder moves
    
    ; Network
    M550 P"Pruset II MK3s"                        ; Set machine name
    M552 S1                                     ; Enable network
    ;M552 S2                                     ; Enable AP
    ;*** Access point is configured manually via M587
    M586 P0 S1                                  ; Enable HTTP
    M586 P1 S0                                  ; Disable FTP
    M586 P2 S0                                  ; Disable Telnet
    M575 P1 S1 B57600							; Panel Due
    
    ; Drive Mappings
    M569 P0 S1                                 ; Drive 0 goes forwards: X Axis
    M569 P1 S0                                 ; Drive 1 goes backwards: Y Axis
    M569 P2 S1                                  ; Drive 2 goes backwards: Z Axis
    M569 P3 S1                                  ; Drive 3 goes forwards: E Axis
    M569 P4 S1                                  ; Drive 4 goes backwards: Z Axis (at E1)
    
    ; Micrpstepping and Speed
    M350 X16 Y16 E16 Z16 I1                      ; Configure microstepping with interpolation
    M92 X200.00 Y200.00 Z400.00 E415.00         ; Set steps per mm
    M566 X480.00 Y480.00 Z24.00 E300.00 P1         ; Set maximum instantaneous speed changes (mm/min)
    M203 X12000.00 Y12000.00 Z720.00 E1500.00   ; Set maximum speeds (mm/min)
    M201 X2500.00 Y2500.00 Z1000.00 E2000.00     ; Set accelerations (mm/s^2)
    M906 X650.00 Y650.00 Z450.00 E500.00 I10    ; Set motor currents (mA) and motor idle factor in percent
    M84 S30                                     ; Set idle timeout
    
    
    ; Motor remapping for dual Z
    M584 X0 Y1 Z2:4 E3				; two Z motors connected to driver outputs Z and E1
    M671 X-37:287 Y0:0 S10			; leadscrews at left (connected to Z) and right (connected to E1) of X axis
    M208 X0:250 Y0:210 Z0:205  ; 			X carriage moves from 0 to 250, Y bed goes from 0 to 210
    
    ; Endstops for each Axis
    M574 X1 S3								; Set endstops controlled by motor load detection
    M574 Y1 S3                               ; Set endstops controlled by motor load detection
    
    ; Stallgaurd Sensitivy
    M915 X S3 F0 H400 R1		                ; Set X axis Sensitivity
    M915 Y S3 F0 H400 R1		                ; Set y axis Sensitivity
    
    ; Z-Probe
    ;M574 Z1 S2                                  ; Define Z to use Probe. Home to Min
    M558 P9 C"^zprobe.in" H5 F500 T12000                      ; Set Z probe type/mode 9. H=Dive Height. F=Speed the bed moves
    M950 H3 C"nil" ; Disable heaters h7 to free up pins
    M950 S0 C"exp.heater3" ; create servo pin 0 for BLTouch
    G31 P500 X30.6 Y-12.0 Z2.315                ; Set Z probe trigger value, offset X Y and trigger height offset Z  PEI PLA 
    M557 X32:240 Y20:190 P7                     ; Define mesh grid
    
    ; Heatbed Heaters and Thermistor Bed 
    M308 S0 P"bed_temp" Y"thermistor" T100000 B4138 R4700 ; Set thermistor + ADC parameters for heater 0 Bed
    M950 H0 C"bedheat" T0						; Creates Bed Heater
    M307 H0 A128.0 C498.9 D4.5 V24.0 B0         ; Bed PID Calibration and PWM
    M140 H0
    M143 H0 S120                                ; Set temperature limit for heater 0 to 120C Bed
    
    ; Filament Sensor Port and Loading Feature ON
    M950 J1 C"e0stop" ; Input 1 e0 Filament Sensor 
    M581 P1 T2 S0 R0 ; Filament Sensor P1 triggers Trigger2.g always (R0)
    
    ; HotEnd Heaters and Thermistor HotEnd           
    M308 S1 P"e0_temp" Y"thermistor" T100000 B4725 R4700  ; Set thermistor + ADC parameters for heater 1 HotEnd
    M950 H1 C"e0heat" T1					; Create HotEnd Heater 
    M307 H1 A566.8 C170.6 D5.7 V23.9 B0			; HotEnd PID Calibration and PWM
    M143 H1 S300                            ; Set temperature limit for heater 1 to 280C HotEnd
    M302 S195 R195
    
    ; Fans
    M950 F1 C"Fan1" Q250				; Creates HOTEND Fan
    M106 P1 T45 S255 H1                 ; HOTEND Fan Settings
    M950 F0 C"Fan0" Q250				; Creates PARTS COOLING FAN
    M106 P0 H-1                         ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned off PARTS COOLING FAN
    
    
    ; Tools
    M563 P0 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
    
    
    ; Automatic saving after power loss is not enabled
    
    ; Custom settings are not configured
    
    

    Issue:

    Bed Compensation does not compensate the right side of my bed.
    Perimeters look separated on the far right side of the bad. Left side loos fine though.

    Height Map:
    heightmap.png

    Start GCode in Prusa Slicer:

    ; Prime Filament Sensor for Runout
    M581 P1 T2 S-1 R0 ; Filament Sensor P1 triggers Trigger2.g always (R0)  TRIGGER OFF
    M950 J1 C"nil" ; Input 1 e0 Filament Sensor 
    M591 D0 P2 C"e0stop" S1 ; Filament Runout Sensor
    
    M83  ; extruder relative mode
    
    M140 S[first_layer_bed_temperature] ; set bed temp
    M109 S165 ; Set extruder temp 165C before bed level
    M190 S[first_layer_bed_temperature] ; wait for bed temp
    
    G32 ; Levels Z Tilt
    G29 S0 ; mesh bed leveling
    G1 X0 Y0 Z2 F2000
    M109 S[first_layer_temperature] ; wait for extruder temp
    
    G1 X10 Y-3.0 Z0.3 F1000.0 ; go outside print area
    G92 E0.0
    G1 Z0.2 E8 ; Purge Bubble
    G1 X60.0 E9.0  F1000.0 ; intro line
    G1 X100.0 E12.5  F1000.0 ; intro line
    G92 E0.0
    

    Any ideas? Thanks.



  • Hi,

    Why do you think compensation is not working?

    Frederick



  • @fcwilt

    At least it is not working as it should.
    Except for the far right side the 1st layer looks quite perfect.

    Could it be that the mesh compensation does not work for negative values?

    The result in pictures:
    (upper left side)
    left_side.JPG

    (upper right side)
    right_side.JPG

    Height Map CSV:

    RepRapFirmware height map file v2 generated at 2020-05-20 09:51, min error -0.102, max error 0.060, mean -0.006, deviation 0.044
    xmin,xmax,ymin,ymax,radius,xspacing,yspacing,xnum,ynum
    32.00,240.00,20.00,190.00,-1.00,34.67,28.33,7,7
      0.013,  0.035,  0.043,  0.037,  0.057,  0.025, -0.058
      0.007,  0.050,  0.040,  0.033,  0.053,  0.023, -0.082
      0.010,  0.045,  0.037,  0.027,  0.060,  0.033, -0.072
     -0.018,  0.013,  0.017,  0.010,  0.010,  0.005, -0.072
     -0.013,  0.015,  0.007, -0.010, -0.018, -0.028, -0.100
      0.005,  0.023, -0.013, -0.028, -0.003, -0.025, -0.102
     -0.040, -0.043, -0.058, -0.068, -0.048, -0.048, -0.098
    
    


  • Hi,

    Negative values should not be a problem.

    Perhaps someone who is using v3 firmware will chime in. I am not so there may be issues that I am not aware of.

    Frederick



  • @Argo I believe that your Z axis minimum limit needs to be a negative value.

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



  • @cemejean said in Mesh Bed Compensation not compensating?:

    @Argo I believe that your Z axis minimum limit needs to be a negative value.

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

    +1



  • I think those limits are only for gcode commands and not for the firmware itself.
    But I'll test it anyway.



  • I just tested it with "M208 X0:250 Y0:210 Z-2:205"

    The effect is the same. After G29 I can travel to the right and see a 0.1-0.2mm gap when there should be Z=0.


  • Moderator

    Is there anything mechanically pulling at the print head when in that position?

    Does your BLtouch mount have some tilt to it?

    What do you have in bed.g for your tilt correction?

    Also please post your homeall.g

    Are you doing a G29 before each print?

    You can increase the accuracy of the BLtouch with some slight changes to your M558 and G31

    M558 P9 C"^zprobe.in" H5 F120 T12000 A10 S0.005
    G31 P25 X30.6 Y-12.0 Z2.315
    

    Note this will make your initial dive speed much slower. You can modify your homeall to set a faster speed for the first probe and then do a slower detailed probe

    M558 F500 A1 ; probe once quickly
    G30
    M558 F120 A10 ; detailed probe
    G30
    

  • Moderator

    @Argo said in Mesh Bed Compensation not compensating?:

    I think those limits are only for gcode commands and not for the firmware itself.
    But I'll test it anyway.

    That's correct. The firmware will be able to compensate below the 0 point provided it is physically able to do so. For baby stepping purposes it can be useful to have a slightly negative value for the Z minima because by default you're only able to move down an amount equal to the thickness of the first layer height.



  • I find the same thing on my E5Plus. Even thought I do a fairly long and detailed bed process, I still find that I am having to babystep my way out of a disaster with most prints. Or worse, have to adjust the bed knobs. My regular ender5 and the CR10S (all running duets) don't seem to have this problem on such a consistent basis.

    I even switched the setup to independant z motors and perform a G32, and still find I have to watch the first layer and make sure the filament goes down properly.

    I perform a G28 to start, then a G32 to level the separate z axis, then do a G29 for the mesh. Still have issues. So either the G32 undoes itself, or it needs to be done after the G29...which does not make any sense.


  • Moderator

    @RyanP said in Mesh Bed Compensation not compensating?:

    I perform a G28 to start, then a G32 to level the separate z axis, then do a G29 for the mesh. Still have issues. So either the G32 undoes itself, or it needs to be done after the G29...which does not make any sense.

    You may need to do the G32 a few times over, and you should do a single G30 at the center of the bed afterwards to redefine the Z0. Then the G29.



  • @Phaedrux

    I don't think the BLTouch mount has tilt but the pin looks slightly bend to the right.
    I temporarily disabled G32 in my start gcode and calibrated my axis by running against the Z endstops.
    Afterwards I did G29 mesh leveling and the result was a severe tilted bed (right side was higher).
    I suspect now that is has something to do with the BLTouch. Next thing I'll do is to replace the PIN and also print another more stable mount.

    For completion:

    homeall.g

    ; homeall.g
    ; called to home all axes
    ;
    ; generated by RepRapFirmware Configuration Tool v2 on Tue Aug 06 2019 23:15:45 GMT+0200 (Central European Summer Time)
    G91                     ; relative positioning
    M915 X S-6 F0 H400 R0		                ; Set X axis Sensitivity
    M915 Y S-1 F0 H400 R0		                ; Set y axis Sensitivity
    G1 Z6 F6000 H2          ; lift Z relative to current position
    G1 H1 X-255 F2600 ; move quickly to X and Y axis endstops and stop there (first pass)
    G1 H1 Y-215 F2600 ; move quickly to X and Y axis endstops and stop there (first pass)
    G1 X5 Y5 F6000          ; go back a few mm
    G1 H1 X-255 F2600  ; move slowly to X and Y axis endstops once more (second pass)
    G1 H1 Y-215 F2600  ; move slowly to X and Y axis endstops once more (second pass)
    G90                     ; absolute positioning
    G1 X15 Y15 F6000        ; go to first bed probe point and home Z
    G30                     ; home Z by probing the bed
    
    M915 X S3 F0 H400 R1		                ; Set X axis Sensitivity
    M915 Y S3 F0 H400 R1		                ; Set y axis Sensitivity
    

    bed.g

    ; bed.g
    ; called to perform automatic bed compensation via G32
    
    
    M561 ; clear any bed transform
    G28 W ; home
    G30 P0 X35 Y100 Z-99999 ; probe near a leadscrew, half way along Y axis
    G30 P1 X240 Y100 Z-99999 S2 ; probe near a leadscrew and calibrate 2 motors
    
    


  • I just replaced the X axis rods (one was slightly bend) and printed another BL Touch mount and replaced the pin.
    Just as before the nozzle is too far away on the right side of the bed which results in the line not sticking together.

    Height Map:
    BED.png

    Print result (middle and right tile):
    results.jpg


  • Moderator

    Is there some skew in the bed rail?

    G1 X15 Y15 F6000 ; go to first bed probe point and home Z
    G30 ; home Z by probing the bed

    Also may want to move the probe point to the center of the bed.



  • @Argo

    You and I are experiencing the same thing, with the same brand (and model) of printer. Have you printed anything else? Like a simple box. Something with a flat surface. I print a lot of simple boxes for board games. The tend to have a number of flat solid layers. Picture a box with a open top, and solid bottom.

    My layers tend to have this double line, gap, double line, gap. Just like your right hand square. I am starting to think it is a mechanical problem with Creality printers. I have three of them and this patters happens on them all. It isnt on every part, or in every area. I think a lot of it is based on the BL Touch in conjunction with a backlash or mechanical shifting of things in the X-Axis or Y-Axis.

    I am currently printing a fairly intricate player box for the board game Scythe. When it is done, I will post a picture of its flat surfaces.

    Keep me in the loop as to your findings as I am working through various solutions myself.



  • @Phaedrux

    Sorry for not mentioning that I‘m already using your advice to probe with 0.005 accuracy and after G32 I probe the center to determine Z=0.

    New observation: after leveling the bed with a crazy 12x12 grid I can see that there is something wrong with the bad. It is very bumpy and when I print with the 12x12 mesh my Z axis can’t keep up and I have small hiccups during fast travel moves.

    Next thing I do is to disassemble the Y axis, check the rods and the Y carriage for their flatness.
    Hopefully I don’t have to order both.

    Crazy that so many thing all at once tend to break 😞



  • @RyanP

    I’m having a MK3s Prusa printer.
    The lines got better but only with crazy accurate 12x12 mesh bed compensation. I suspect there is something terrible wrong with my y axis rods, bed or carriage or worst case: all at once.



  • Update:

    Y-Axis rods and the bed look fine.
    I just leveld my x axis (tilt) by slowly driving the x-axis against the Z endstops.

    New height map (7x7 mesh leveling, with center Z probe and 0.005 accuracy):
    Screenshot 2020-05-22 at 14.47.32 .png

    Print picture is the same. Left side is too close, right side too far away.


  • Moderator

    @Argo said in Mesh Bed Compensation not compensating?:

    t is very bumpy and when I print with the 12x12 mesh my Z axis can’t keep up and I have small hiccups during fast travel moves.

    Increase your Z jerk. M566 Z24.00 is very low. Try at least 60. That should solve the stutters.



  • I recently had a similar issue and the problem was that the z screw was turning but the nozzle was not moving accordingly.

    1. Check if your Z leadscrews are turning when moving the nozzle from left to right (using gcode. Not by hand)

    2. if the screws are turning check if there is any slop in the system. If possible measure how much the nozzle moves up and down

    If the z screws are not turning it I would suspect a problem with the probing itself



  • I did a complete frame rebuild today which improved things but it’s still not perfect level. There are parts on the bed which are good and parts which aren’t.
    I’d say the inaccuracy between perfect layer and what the BLTouch measures at some spots is around 0.020mm to 0.025mm.

    I suspect the BLTouch measuring error comes from the fact that it is mounted too far away from the nozzle. The Y offset is -12mm from nozzle and the mount I’m using atm has even higher offset from Y.
    Thereby every small inconsistency in printed parts gets magnified by the position from the BLTouch, it’s like a lever.

    My extruder has a slot for the Prusa PINDA Mount which merely has an offset of 2mm on the y axis.
    I’ll try to configure it today and see if that helps.
    I never did so because only RRF 3 supports the probe’s thermistor.



  • Do give you guys an update and also for someone who might have the same issue:

    Installing the probe (in my case PINDA 2) with almost no Y offset solved my probing problem.
    My guess ist that any small difference (parts, rods, frame) gets amplified by the probe when the location has a big Y offset to the nozzle.

    I also do not recommend using "True Bed Leveling" with a cartesian printer. This could tilt the X axis which does also add an angle to the nozzle and probe. I level my X axis (tilt) by running into the Z endstops.

    New working height map (almost perfect first layer)

    940fd036-216c-468b-a433-e59edf074eed-image.png

    Z = 0 reference point is X10 / Y10.

    And if anyone is interested in how in configured my PINDA:

    ; Z-Probe PINDA
    M574 Z1 S2 ; Set endstops controlled by probe
    M558 P5 C"^zprobe.in" I1 H0.9 F1000 T6000 A20 S0.005 ; PINDA
    G31 P1000 X23 Y5 Z1.025 ; PEI Sheet Offset
    ;G31 P1000 X23 Y5 Z1.325 ; Textured Sheet Offset
    M557 X24:221 Y10:195 P12 ; Define mesh grid

    The probing is quite fast but the accuracy is quite good as the probe rarely needs more than 2 probes per point.
    Next I need to figure out how to use the temperature compensation with the G31 command.



  • @Argo

    If you run the probing multiple times are the results fairly consistent?

    Thanks.

    Frederick



  • @fcwilt

    Yes they are but not the overall Z offest because of the rising temperature of the probe.


Log in to reply