COMPLETE My guide to Duet mesh auto-leveling

Discussion in 'Guides, Mods, and Upgrades' started by Ephemeris, Jan 18, 2017.

  1. Ephemeris

    Ephemeris Well-Known Member

    Joined:
    Nov 25, 2015
    Messages:
    388
    Likes Received:
    241
    After fighting with it for a while, I am thrilled with the automated mesh leveling on the Duet WiFi. I've set it up as a macro. When I run it, the carriage moves from point to point in a grid pattern across the heated bed. It measures the nozzle to bed distance at each point in the grid and save it to a file. When you print, that matrix of height data is used to compute tiny Z adjustments to keep the nozzle to bed distance constant despite bed curvature and rod sag.

    This will only work if your Z sensor works reliably across your bed. The original Escher3D infrared sensor works great for me in conjunction with the clever3D PEI/aluminum bed. Other combinations may work as well. I would not hold out much hope for beds with tape, hairspray, glue, or other goo on them.

    I'm currently running a 14x9 mesh on 2 cm centers and getting the best layer ones I've ever had!

    I've attached my notes which are a tutorial for how to set it up for my configuration. You should be able to easily adapt it to others since I try to explain why each setting is what it is.

    Happy auto-leveling!

    I'll be glad to make corrections or clarifications to the document if you can explain them to me :)

    Also, my thanks to Rob Heinzonly and Patrick Notton who helped me get the Duet set up and suggested the auto mesh leveling as a possibility.
     

    Attached Files:

    #1 Ephemeris, Jan 18, 2017
    Last edited: Jan 19, 2017
  2. R Design

    R Design Well-Known Member

    Joined:
    Oct 7, 2015
    Messages:
    944
    Likes Received:
    190
    The 1,000,000 dollar question is, if after levelling an Alu/PEI bed as above, one saves the settings, fixes the original BigBox borosilicate glass bed on top and prints with a suitable offset (and some glue!) will the results be appropriately good?

    Why would one want to do such a thing?

    - if the PEI has become damaged over time and is no longer performing;
    - if a filament won't properly to PEI:
    - if the filament sticks too well to PEI and there's damage getting it off each time;
    - if you want to start another print quickly by swapping out sheets of glass rather than waiting for detachment;
     
  3. Alex9779

    Alex9779 Moderator
    Staff Member

    Joined:
    Sep 4, 2015
    Messages:
    2,411
    Likes Received:
    735
    I don't think so.
    But you can save the grids and load them in different files. The gcodes have a standard filename "heightmap.csv" but you can change that when leveling or loading.
    Though changing the bed "will" change something else. So if I would do that I think I will run a leveling sequence again.
    Yeah it takes a while but it is fully automatic. Just start and go away and come back when it is finished.
    I have no experience yet how long a leveling will last until the environment changed the machine too much. But I think the overall machine is stable enough to support one leveling sequence once in a while if not doing hard stuff to the bed when removing parts or such...
     
  4. R Design

    R Design Well-Known Member

    Joined:
    Oct 7, 2015
    Messages:
    944
    Likes Received:
    190
    Thanks @Alex9779 @Ephemeris.

    Due to your collective enthusiasm + insights have just ordered the Duet + Black Clipfix bed.

    Looking forward to discovering that it's possible to share a room with 5 stepper motors without slowly going insane! ;)
     
  5. dc42

    dc42 Well-Known Member

    Joined:
    Aug 16, 2016
    Messages:
    526
    Likes Received:
    221
    It's the fans that may drive you insane!
     
  6. R Design

    R Design Well-Known Member

    Joined:
    Oct 7, 2015
    Messages:
    944
    Likes Received:
    190
    Other people don't seem to do this but I've already wired resistances in series with offending fans which methinks run at full tilt by accident of specification rather than by necessity or design.
     
    eca likes this.
  7. eca

    eca Well-Known Member

    Joined:
    Sep 4, 2015
    Messages:
    229
    Likes Received:
    44
    Definitely want to try this
     
  8. dc42

    dc42 Well-Known Member

    Joined:
    Aug 16, 2016
    Messages:
    526
    Likes Received:
    221
    If you drive the hot end fan from the Duet e.g. the Fan1 connector, you can make it run thermostatically depending on the hot end temperature, and also limit the PWM.
     
  9. R Design

    R Design Well-Known Member

    Joined:
    Oct 7, 2015
    Messages:
    944
    Likes Received:
    190
    That's a nice guide @Ephemeris and have now tweaked my setup quite a bit.

    Neither the Clever3d bed nor the BBq paint have arrived through the post yet so, when it comes to actually printing, I'm sort of winging it a bit because my mesh isn't accurate. Have done what I can by coating the entire glass with a thick layer of gluestick. ;-)

    a) @Ephemeris it would be really great to see your heightmap.csv file to understand what can be achieved in terms of height distribution;

    b) is there a way to adjust z-height on the fly during the first layer with Duet? Since the S3d g-code file is absolute if you use the machine toggles to lift the nozzle 0.1mm it works for the remainder of the first layer but the information is lost when the absolute layer height for layer 2 arrives?
     
  10. dc42

    dc42 Well-Known Member

    Joined:
    Aug 16, 2016
    Messages:
    526
    Likes Received:
    221
    You could use the G10 command to apply a Z offset.
     
  11. Ephemeris

    Ephemeris Well-Known Member

    Joined:
    Nov 25, 2015
    Messages:
    388
    Likes Received:
    241
    Here's my last mesh leveling run for the Clever3D PEI/aluminum bed. I think you can see that 150 points is not overkill. My back edge has a little ripple that might be missed by coarser sampling.

    Eph heightmap 2017.01.28.png
     

    Attached Files:

  12. R Design

    R Design Well-Known Member

    Joined:
    Oct 7, 2015
    Messages:
    944
    Likes Received:
    190
    :D

    insanely good

    thanks for that I'm going to study the attached file carefully

    and to think I always had the impression the rods sagged significantly????!!!!!
     
  13. R Design

    R Design Well-Known Member

    Joined:
    Oct 7, 2015
    Messages:
    944
    Likes Received:
    190
    btw. the reproduceability of the IR sensor is apparently 0.01mm so we should round up the file output
     
  14. R Design

    R Design Well-Known Member

    Joined:
    Oct 7, 2015
    Messages:
    944
    Likes Received:
    190
    Clever3D bed arrived and really excited to try.

    Holding a steel ruler against it in different directions it's apparent from the light that leaks through that there are indeed slight irregularities, perhaps as your ripple above?

    Having spoken to a machinist friend it turns out that aluminium has stresses in it left over from the tempering process. Machining can relieve those processes and after it has been machined (with a fly cutter in this case) the piece can go on to bend.
     
    GrodanB likes this.
  15. Ephemeris

    Ephemeris Well-Known Member

    Joined:
    Nov 25, 2015
    Messages:
    388
    Likes Received:
    241
    Very true! Apparently they didn't think to use MIC6 cast aluminum tool plate. Not a very strong alloy, but it's designed to have virtually no internal stresses so you can cut it to final shape in one pass. If I was building the bed from scratch, that's the best choice I know of.
     
  16. eca

    eca Well-Known Member

    Joined:
    Sep 4, 2015
    Messages:
    229
    Likes Received:
    44
    How would this work on an IDEX setup? If IR sensors were attached to each carriage would it be possible to run the sequence for each side?
     
  17. dc42

    dc42 Well-Known Member

    Joined:
    Aug 16, 2016
    Messages:
    526
    Likes Received:
    221
    That's not currently supported. Mesh bed compensation uses the X carriage only for probing but applies the bed map to both carriages. This should work well if both carriages move on a single set of rails.
     
    eca likes this.
  18. R Design

    R Design Well-Known Member

    Joined:
    Oct 7, 2015
    Messages:
    944
    Likes Received:
    190
    @Ephemeris, great master of the level bed, I have a couple of questions.

    a) Haven't been very successful when printing 0.1mm layers. Resort to doubling the height of the first layer in the slicer.

    How is your first layer at low layer heights?

    b) My bed shows significant height difference around the centre ("higher"). Exactly what I used to observe when doing mesh bed levelling and undoubtedly due to the rods sagging. Still wondering why your height map doesn't show that? Could it be that I damaged the rods in my first week with the Bigbox when I hadn't understood how easy it was to persuade Marlin to crash into the back wall? Or did you do something clever?
     
  19. Ephemeris

    Ephemeris Well-Known Member

    Joined:
    Nov 25, 2015
    Messages:
    388
    Likes Received:
    241
    My default is 0.2 mm for layer 1. I see no goodness making it thinner and there are multiple downsides. If things aren't just right and you're too close to the bed you not only risk scratching the bed but the back pressure can get so high you strip the filament. Generally layer one looks amazingly smooth compared to my past experiences without mesh leveling.

    I think my height map is dominated by the curvature of my PEI bed rather than rod sag.
     
  20. R Design

    R Design Well-Known Member

    Joined:
    Oct 7, 2015
    Messages:
    944
    Likes Received:
    190
    Good to know.

    Then it's not for me to be overambitious.

    So then either I've bent my rods or maybe twisted the supports (still remember those convulsive back wall crashes from the first week: don't know if it was my imagination but the whole X axis seemed to twist quite impressively). Another good reason to switch to an idex system and print everything afresh.

    Thanks, master of the flat bed!
     

Share This Page