1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

Can someone help me understand MESH LEVELING?

Discussion in 'General Questions' started by WheresWaldo, Mar 10, 2016.

  1. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    So I have it enabled and have gone through the procedure and it is less than complicated. All of that I understand. What I am confused about is the display. Why do I have this line set as is:
    Code:
    #define MESH_HOME_SEARCH_Z 4  //Z after Home, bed somewhere below but above 0.0.
    Shouldn't it be set like this:
    Code:
    #define MESH_HOME_SEARCH_Z 0
    When the process is complete and you then save the settings, if you issue a G28 command to home all the axes you end up at X=10, Y=10, Z=4. Now physically the head is at X=10, Y=10 but the nozzle is actually barely touching the bed so technically Z=0 and not 4 like is says. Do I just ignore that or do I need to do something else in firmware?

    I should also mention that I only made three edits in the leveling section. One to enable MESH, second to change from 3 x 3 to 4 x 4 grid, third to make sure that Auto Bed Leveling is turned off.
     
  2. Mike Kelly

    Mike Kelly Volunteer

    Joined:
    Mar 11, 2013
    Messages:
    6,967
    Likes Received:
    2,276
    The 4 is the value it goes to before the mesh leveling and for each step.
     
  3. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    No Mike, it doesn't. I played with it all afternoon trying different parameters the head never moves up until you actually turn the encoder. So the 4 is an arbitrary number. I also tried 0 and it works exactly the same way.

    I believe the 4 is there so they don't have to do math on negative values, it appears to have no other function.

    I am revising my first sentence. The number 4 is what the LCD says the Z height is before each point, but it doesn't actually move the hot end in the Z axis at all, just in the Y or X depending on which spot is next.
     
  4. daniel871

    daniel871 Well-Known Member

    Joined:
    Apr 18, 2015
    Messages:
    1,322
    Likes Received:
    510
    I think having it at 0 has little effect on the Robo since we typically have to set an offset to make it back up ~1mm off of the endstop trigger anyway.

    I wish that Z4 really did act as a locating point off of the endstop trigger though, when I ran my mesh leveling it would drag on the glass on every point after the first one and it was a little nerve-wracking watching the glass flex until I raised the nozzle off and brought it back down.
     
  5. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Yeah, @daniel871 I left it at 0 and it made no difference to the math. My first print came out perfect, except for the first layer offset. It was just a few hundredths too low. I am going to play with M851 to see what effect it really has.

    I really think the 4 is there because most probes are above the level of the nozzle and may need to go less than 4 if the bed is warped. I'm going to go with 0, since on the Robo R1 series it can never be negative.
     
  6. Mike Kelly

    Mike Kelly Volunteer

    Joined:
    Mar 11, 2013
    Messages:
    6,967
    Likes Received:
    2,276
    Wasn't this caused by the wrong steps per mm? Mine does not do this at all
     
  7. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    @Mike Kelly Here is the behaviour of Mesh leveling based on Marlin's implementation and specific to the Robo's mechanics.
    1. It homes all Axis.
    2. It moves to X10, Y10 at Z Home and reports whatever number you have entered in firmware.
      Apparently any arbitrary number will work as long as when you are done with setting the current touch point your result isn't negative.
    3. You turn the encoder, in the case of the Robo lifting the nozzle from the bed to slip your gauge between the bed and the nozzle.
    4. You press the encoder knob to set that location and the hot end moves to the next location. At the same time, again Robo specific, lowers the nozzle back to Z home and displays the same firmware provided number again.
    5. It repeats this for all touch points
    As you know Z home is actually below the surface of the glass bed. It will exhibit precisely the behaviour that @daniel871 describes.
     
  8. Mike Kelly

    Mike Kelly Volunteer

    Joined:
    Mar 11, 2013
    Messages:
    6,967
    Likes Received:
    2,276
    Ah ok yeah that makes sense. I'm forgetting most of you are using the stock autoleveling switches.

    If it was me I'd remove those switches and install an optical endstop instead and just a screw or something to trigger it. Though I'm not sure you'd gain significant repeatibility from it, but at least then you can home it in the air instead of touching the bed.

    My printers home about 2mm above the bed, then when I do the leveling it raised it to "4" and then I lower it back down to about 2, so I see what you're saying now because 4 seems arbitrary as you say.
     
    Geof likes this.
  9. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    We might as well redesign the entire R1. I am sure we here can come up with a much more robust design and probably come in with a BOM that is about the same.
     
    Geof likes this.
  10. Geof

    Geof Volunteer Moderator
    Staff Member

    Joined:
    Nov 9, 2015
    Messages:
    6,757
    Likes Received:
    2,339
    now that would be a hell of a printer!
     
  11. epatel

    epatel New Member

    Joined:
    Mar 23, 2016
    Messages:
    2
    Likes Received:
    0
    Hi, happy to see the interest in mesh leveling.

    The MESH_HOME_SEARCH_Z is actually the "start level" so to speak, when probing for the bed height. The Z endstop should be slightly above the bed (less than this value), this height (Z endstop) will have this value while probing and searching for the bed downwards (toward 0). If you have software endstops enabled (like I have) it will stop moving at 0 if the bed is below that...going further than that might be a problem with a mechanical Z endstop, so the bed should be slightly below Z endstop.

    I can't post links...yet, does this work?

    Sorry if its hard to understad. I did write some about how to use it but during the last year the Marlin repo has thrown away the docs and other stuff...

    Here is what I think is the last version and should cover current version (I think)
    https : //github.com/epatel/Marlin/blob/75f9fb50c4002f6d4ba0345f5594cbac1fab1fa6/Documentation/MeshBedLeveling.md

    Here is a little rational/story behind it all
    https : //github.com/MarlinFirmware/Marlin/pull/1619

    Cheers,


    UPDATE: Sorry, I was wrong. I see now that the last updated thing, i.e. a global/overall fine tune with "S4" is not in the RC release.
     
    #11 epatel, Mar 23, 2016
    Last edited by a moderator: Mar 23, 2016

Share This Page