Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Z-Homing via endstops vs. Mesh Bed Compensation

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    5
    15
    640
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Laskoundefined
      Lasko
      last edited by Lasko

      Hello everyone,

      i can't find the settings for auto levelling the bed as I want it:

      I have a CoreXY-Printer with 3 independent Z-Leadscrews. Every Z-Axis has an endstop at its top position (z=0). What I am trying to do:

      1. Step: Home all axes with the use of the endstops:
        This works, and even a manually heavy tilted bed is levelled by individually moving all 3 Z-
        Axes until all endstops are active.

      2. Step: After the "rough" bed levelling via the endstops (Step 1), I want to use a BL-Touch-Sensor
        to create a .csv Map. This works as well. Right now, in the heightmap I can see that the
        Bed is tilted in one direction. This should be caused by small height differences of the
        endstop parts.

      3. Step: If i activate Mesh Bed compensation, i can see that the bed moves up and down if i move
        the Hotend along the y-axis. It does what it should do, but I want the bed to detect that it
        is still tilted after endstop homing and correct its 3 z-axes accordingly after heightmap
        creation. Instead of the z-correction while moving in the xy-plane, i want the bed to level
        itself before printing.

      So is this only possible, if i just use homing via z-Probe( BL-Touch) instead of endstop homing?
      Of course i can adapt the endstop positions, but this would be the more elegant way to go in my eyes.

      1 Reply Last reply Reply Quote 0
      • aidarundefined
        aidar
        last edited by

        https://duet3d.dozuki.com/Wiki/Bed_levelling_using_multiple_independent_Z_motors

        1 Reply Last reply Reply Quote 2
        • Phaedruxundefined
          Phaedrux Moderator
          last edited by

          In case it's not already clear from reading the linked doc, you will need to add some gcode to the config.g to tell the firmware where your leadscrews are physically, and then you will need to add some gcode to a macro, probably bed.g (G32), to probe near those lead screws and effect the tilt correction. You can then carry on with a G29 to map the bed surface.

          Z-Bot CoreXY Build | Thingiverse Profile

          1 Reply Last reply Reply Quote 1
          • Laskoundefined
            Lasko
            last edited by

            Ok, thank you for your answers.

            So, it seems that I have to use the G30 command to auto-level the bed.
            I hoped there is a way to use the Mesh Bed Compensation Data to level the bed in the 2 directions (e.g. with a least square algorithm). By that I mean not to use the Mesh Bed Compensation only while moving the Hotend by adapting the bed-height but to level the bed as good as possible by turning the 3 z-motors individually before printing.

            droftartsundefined 1 Reply Last reply Reply Quote 0
            • droftartsundefined
              droftarts administrators @Lasko
              last edited by

              @Lasko said in Z-Homing via endstops vs. Mesh Bed Compensation:

              By that I mean not to use the Mesh Bed Compensation only while moving the Hotend by adapting the bed-height but to level the bed as good as possible by turning the 3 z-motors individually before printing.

              Mesh Bed Levelling doesn’t work that way. It’s role is to compensate for any unevenness in the bed, once it is already on a level plane. It doesn’t automatically level the bed plane; the three point bed levelling does that. You can certainly use the information from the mesh levelling to level the bed plane manually, but you have a probe that can do that!

              Why put the endstops at the top of the Z axes? You have the probe to provide setting Z endstop and datum, as well as bed plane levelling and mesh compensation (if it’s even necessary). Better to put the Z endstops at the bottom of the axis, then if you lose power mid-print, you can home to them on restart, when you can’t home to the top of the axis or with the probe, because the print would be in the way. You can even use the probe to set the Z endstops offsets very accurately, so you don’t even need to probe.

              Ian

              Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

              1 Reply Last reply Reply Quote 1
              • Laskoundefined
                Lasko
                last edited by

                Thank you for those informations Ian!

                I joined the "development" of this 3D-Printer as part of a student thesis. It might really be the best option to revisit the positioning of the endstops that was done before. I never thought about the power-off-mid-print situation. Thank you for your reply!

                Maybe i even find a way to use the Mesh Data. This way I would already have something i could write into my thesis 😄

                Lasko

                1 Reply Last reply Reply Quote 0
                • Laskoundefined
                  Lasko
                  last edited by

                  So,
                  I tried to Auto-Bed-Level with the G30 command and the BL-Touch:

                  G30 P0 X10 Y10 Z-9999 ; probe at point 1
                  G30 P1 X20 Y20 Z-9999 ; probe at point 2
                  G30 P2 X30 Y10 Z-9999 S3 ; probe at point 3 and auto bed level

                  It doesn't work as I want it to. It does the same as Mesh bed levelling, only compensating the tilted bed during moving the CoreXY-Extruder. I hoped that this Three-Point-Levelling might work (like @droftarts said). But there is no visible bed levelling when running this code...

                  Laskoundefined 1 Reply Last reply Reply Quote 0
                  • Laskoundefined
                    Lasko @Lasko
                    last edited by

                    M98 P"0:/macros/homezBLT.g"
                    Warning: 3/4-point bed compensation is deprecated and will be removed in a future firmware release. Please use G29 mesh bed compensation instead.
                    Bed equation fits points [20.0, 60.0, -4.238] [40.0, 100.0, -6.059] [60.0, 60.0, -5.284]

                    This is what the console responds. It finds the points and seems to calculate the plane correction, but the motors aren't moving afterwards... Is the S-parameter wrong?

                    Lasko

                    fcwiltundefined 1 Reply Last reply Reply Quote 0
                    • fcwiltundefined
                      fcwilt @Lasko
                      last edited by

                      @Lasko

                      Did you follow all the steps in the information provided in the link?

                      There are a number of things that need to be in "sync" but when the configuration settings are all correct it does work.

                      Frederick

                      Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                      1 Reply Last reply Reply Quote 1
                      • Laskoundefined
                        Lasko
                        last edited by

                        Hello Frederick,

                        yes, I tried everything relevant that is in "Bed levelling using multiple independent Z motors". May there be a problem if i first define 3z endstops via the M574 command and reconfiguring the board later (in another macro) to use a BL-Touch as an z-Probe?

                        Lasko

                        1 Reply Last reply Reply Quote 0
                        • fcwiltundefined
                          fcwilt
                          last edited by

                          Hi,

                          I have both Z end stop sensors using IR "beam break" devices and a BLTouch Z probe.

                          I use the end stop sensors for Z homing and use the probe for setting the Z=0 datum and creating the height map.

                          So I don't think you need to have code to change from one to another.

                          In the meantime can you post your M671 command and your bed.g file?

                          Thanks.

                          Frederick

                          Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                          1 Reply Last reply Reply Quote 0
                          • Phaedruxundefined
                            Phaedrux Moderator
                            last edited by

                            Post your config files. We can't help unless we see what your gcode is trying to do.

                            The error message makes it sound like you do not have an M671 command in your config.g, so it's not trying to do leveling, it's just trying to do a 3 point compensation.

                            Z-Bot CoreXY Build | Thingiverse Profile

                            1 Reply Last reply Reply Quote 0
                            • Laskoundefined
                              Lasko
                              last edited by

                              @Phaedrux I could solve the problem in another thread, you should have seen it 😌

                              For all that are interested:

                              M671 X--xxx,xx:xx,xx:xxx,xx ... is invalid
                              M671 X-xxx.xx:xx.xx:xxx.xx ... is valid
                              

                              So no commata or "-" between X/Y and the values!

                              Thank you all for your help,
                              Lasko

                              droftartsundefined fcwiltundefined 2 Replies Last reply Reply Quote 0
                              • droftartsundefined
                                droftarts administrators @Lasko
                                last edited by

                                @Lasko See https://duet3d.dozuki.com/Wiki/Gcode#Section_M671_Define_positions_of_Z_leadscrews_or_bed_levelling_screws for code examples of correct notation. Use the Gcode dictionary to check your syntax when writing gcode commands. There's also a description of correct syntax here: https://duet3d.dozuki.com/Wiki/Gcode#Section_G_Code_Structure

                                Ian

                                Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                                1 Reply Last reply Reply Quote 0
                                • fcwiltundefined
                                  fcwilt @Lasko
                                  last edited by

                                  @Lasko said in Z-Homing via endstops vs. Mesh Bed Compensation:

                                  M671 X--xxx,xx:xx,xx:xxx,xx ... is invalid
                                  M671 X-xxx.xx:xx.xx:xxx.xx ... is valid
                                  

                                  So no commata or "-" between X/Y and the values!

                                  Just to be sure you understand a hyphen indicates a negative value.

                                  So the "valid" example has the first location as negative.

                                  Frederick

                                  Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                                  1 Reply Last reply Reply Quote 0
                                  • First post
                                    Last post
                                  Unless otherwise noted, all forum content is licensed under CC-BY-SA