Mesh Bed Leveling - No Visual Print Compensation?

  • Hello Everyone,

    We are getting ready to ship our first few BFP-ICARUS units with the Duet 2 Wifi board, and first and foremost, we are very impressed by the Duet 2 Wifi board. Thank you to everyone who helped to make it a reality and such a great board.

    We have an 18"x16" print area that we use 5mm Carbon Fiber plates for, on top of that, is a magnetic sheet and a GECKO flex plate. I grabbed one of our Carbon Fiber plates that wasn't quite in spec to be sure mesh bed leveling is indeed working to ensure everything is good with the system. What I am seeing is, Mesh Bed Leveling is active by checking with the M122 command, and the Z motors are turning for compensation, but we don't see any compensation actually happening when you look at what is being printed. If the bed has a low point, then the filament is too high, is the bed has a high point, then the filament is squished into the bed, per what we can visually see via the height-map. We can feel the Z motors turning and they are turning in the correct direction as G32 works fine for tilt compensation and levels the bed accordingly, but it seems like the mesh compensation values aren't being applied?

    We have one unit here with an NPN sensor that we are testing this on and the readings are consistent.

    Here is some information that may be useful:

    Starting gCode in S3D:
    G32 ; home and check bed tilt
    G29 S1 ; load prior mesh map

    Clear Bed Map data M and G commands have been researched and are not present in bed.g and any home files

    Z probe offsets are correct in the config.g file

    M122 verifies Mesh Bed Leveling is in use

    The systems are generating height maps via the G29 command.

    To sum it up, we can see and feel mesh bed leveling in the Z motors, we just don't see the "compensation" actually happening on the printer. It sounds like there is no height map being applied. but we checked bed.g, all homing files, and the start gcode, and there is nothing to wipe it out. Plus M122 confirms it is working, but there is no "compensation" in the print.

    Any ideas? All help is appreciated. Thanks!


  • Well if the motors are turning, it's applying something. If it's not applying enough that's another issue.

    Can you post a picture of the heightmap being displayed in the DWC?
    What is your grid spacing?
    At what point was G29 probing run, and what has changed with the bed between then and printing?

  • Hi Phaedrux,

    Thanks for the reply. I'll answer best we can.

    Here is a link to the picture of the heightmap. Granted it isn't the most level as this plate didn't meet tolerances, but it is a great example to see how mesh bed level can compensate. From the human eye, the plate looks flat as ever - that is why I like Duet Web Control to be able to get a good visual.

    For grid spacing we are at 60mm with 52 probe points.

    We have ran G29 by both running the command and storing the info in the printer to be recalled at a later time, and both right at the end of the starting gcocde so it is the last thing the printer does before a print, and we get the same results.

    The Duet system is definitely in mesh bed leveling mode and applying the mesh from the probing, but it doesn't seem to be compensating to create a level print, if that makes sense.


  • Can you post your config file?
    Do you have mesh compensation tapering configured?
    What is your Z axis speed settings?
    What is the first layer print speed?
    Have you tried a grid with more points? The max is 441. If you intentionally set a very low grid spacing, the firmware will give an error and suggest a minimum spacing needed to maximize the probe points used.

  • Absolutely. Thank you again for your help.

    ; Configuration file for Duet WiFi (firmware version 1.21)
    ; executed by the firmware on start-up
    ; generated by RepRapFirmware Configuration Tool on Sun Nov 04 2018 16:39:54 GMT-0500 (Eastern Standard Time)

    ; General preferences
    G90 ; Send absolute coordinates...
    M83 ; ...but relative extruder moves

    ; Network
    M550 PBFP-ICARUS-X DEMO UNIT ; Set machine name
    M552 S1 ; Enable network
    ;*** Access point is configured manually via M587
    M586 P0 S1 ; Enable HTTP
    M586 P1 S0 ; Disable FTP
    M586 P2 S0 ; Disable Telnet

    ; Drives
    M569 P0 S1 ; Drive 0 goes forwards
    M569 P1 S1 ; Drive 1 goes forwards
    M569 P2 S0 ; Drive 2 goes backwards
    M569 P3 S1 ; Drive 3 goes forwards
    M569 P4 S0 ; Drive 4 goes backwards (second Z motor)
    M584 X0 Y1 Z2:4 E3 U4 P3 ; Driver 0 For X, 1 for Y, Z=2:4 U=4, Extruder Motor 3
    M671 X-140:710 Y207.5:207.5 S20 ; leadscrews at middle left and right
    M350 X128 Y128 Z128:128 E128 U128 I0 ; Configure microstepping without interpolation
    M92 X355.556 Y355.556 Z6400:6400 U6400 E4624 ; Set steps per mm
    M566 X600 Y600 Z300:300 U300 E600 ; Set maximum instantaneous speed changes (mm/min)
    M203 X12000 Y12000 Z180:180 U180 E2000 ; Set maximum speeds (mm/min)
    M201 X2000 Y2000 Z250:250 U250 E250 ; Set accelerations (mm/s^2)
    M906 X1600 Y1600 Z1600:1600 U1600 E900 I30 ; Set motor currents (mA) and motor idle factor in per cent below
    M84 S30 ; idle timeout in seconds

    ; Axis Limits
    M208 X0 Y0 Z-5 S1 ; Set axis minima
    M208 X475 Y410 Z915 S0 ; Set axis maxima

    ; Endstops
    M574 X2 Y1 S1 ; Set active high endstops
    M591 D0 P1 C3 S1 ; filament sensing for Dyze Sentinel

    ; Z-Probe
    M574 Z1 S2 ; Set endstops controlled by probe
    M558 P5 I1 F120 T12000 ; Set Z probe type NPN and dive height and speeds
    G31 P25 X50 Y50 Z0.9 ; Set Z probe trigger value, offset and trigger height
    M557 X50:475 Y50:410 S60 ; Define mesh grid

    ; Heaters
    M307 H0 B0 S1.00 ; Disable bang-bang mode for the bed heater and set PWM limit
    M305 P0 T100000 B4138 C0 R4700 ; Set thermistor + ADC parameters for heater 0
    M143 H0 S110 ; Set temperature limit for heater 0 to 110C
    M305 P1 T4606017 B5848 C5.548428e-8 R4700 S0.5 H0 L0 ; Set thermistor + ADC parameters for heater 1
    M143 H1 S410 ; Set temperature limit for heater 1 to 410C

    ; Fans
    M106 P0 S1 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
    M106 P1 S1 I0 F500 H-1 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned off
    M106 P2 S1 I0 F500 H-1 ; Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned off

    ; Tools
    M563 P0 D0 H1 ; 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 power saving
    M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; Set voltage thresholds and actions to run on power loss

    ; Custom settings are not configured

    For Z axis speed, max speed is 3mm/s

    First layer print speed is normally about 25mm/s

    Increasing the probing matrix can be done, we can try that. That is one of the few things we haven't tried. From what I can see, everything we have done is reasonable in terms of speed and such, please let us know your opinion.

  • Can you confirm that no mesh taper is being applied by sending M376 in the console? My speculation here is that if the taper were set too low, it could be unable to execute the full compensation amount. I'm not sure exactly how taper is calculated and applied to the first layer, but it's something to check.

    Z speeds seem maybe ok, but...

    M350 X128 Y128 Z128:128 E128 U128 I0 ; Configure microstepping without interpolation
    M92 X355.556 Y355.556 Z6400:6400 U6400 E4624 ; Set steps per mm

    High microstepping like that on all axis can lead to issues as it can potentially exceed the step pulse generation limit, leading to possible missed steps, which could explain insufficient movement of the Z axis. And high steps per mm on the Z axis especially may require the reduction of the jerk and accel values. I would suggest a Z speed of 300, accel of 60, and jerk of 60. A higher top speed than what you have now, with a smoother transition into it.

    After a power cycle of the board, print a first layer and then send M122 in the console to get a diagnostic report. Post the contents here. We're looking for a hiccup count.

    For best results it's generally recommended to run with x16 microsteps with interpolation to 256. This leads to a manageable load on the CPU even at high speeds and accelerations, and allows the stepper driver to drive the motors with a smooth 256 pulse rate for quiet operation.

    It also simplifies things if you set your microstepping and steps per mm for x16 first. Then if you wish to adjust microsteps afterwards you can just add another M350 command after with the new microsteps setting and the firmware will automatically calculate the new steps per mm value.

    Maybe not the problem at all, but that's what I would test next and my reasoning for it.

  • Thanks for the help! We will be trying this either today or tomorrow and will report back what we find. We have some prints for some customers wrapping up and I will test this ASAP.


  • @Phaedrux,

    Wanted to share this with you.

    By making:

    • Zero hardware adjustments
    • Setting the entire system to 16x microstepping with 256 interpolation (from 128 microstepping)
    • Confirming there is no mesh taper being applied via M376
    • Using a Z Speed of 300, Acceleration of 60, and Jerk of 60
    • Going from a 60mm grid spacing for mesh leveling to 30mm

    Look at the heigh map we have now: Link

    This is night and day compared to what we had before, by doing nothing but software adjustments. I will keep you in the loop on how we progress. We truly appreciation your support from all of us here at FI.


  • That definitely looks like a better heightmap. Question now is if the first layer prints well or not.

    Another thing I forgot to mention there are a few options which may help improve probing consistency by adding the A, S, R and B parameters to M558.

    A and S work together to try and eliminate rogue probe results from distorting an otherwise good result. It will probe at least twice, and up to the max you set with A, until it gets two consecutive results that are within the range given by S. It will double the number of probing moves at minimum, so will take more time, but it adds error rejection.

    The A and S parameters control multiple probing. Probing is repeated until two consecutive probe attempts produce results that differ by no more than the S parameter; then the average of those two results is used. However, if the number of attempts specified by the A parameter is reached without getting two consecutive results within tolerance of each other, no further probe attempts are made and the average result of all the attempts is used.

    And R will insert a brief pause after the travel portion of the probing move to allow the printer to settle before starting the dive portion of the probe move. Usually a fraction of a second is enough.

    There's also the B parameter which briefly disabled any active heaters during a probe move to remove the possibility of electrical interference.

Log in to reply