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

Marlin 2.0.X Autolevel

Discussion in 'Mods and Upgrades' started by nol b, May 15, 2020.

  1. nol b

    nol b Member

    Joined:
    Mar 1, 2014
    Messages:
    62
    Likes Received:
    10
    today i upgraded the firmware on my modified R1 to Marlin 2.0.5.3. it seems to be working well so far. i am uncertain on one thing with the autolevel feature. the documentation states:

    https://marlinfw.org/docs/configuration/configuration.html#bed-leveling
    • G28 disables bed leveling, but leaves previous leveling data intact.
    • G29 automatically or manually probes the bed at various points, measures the bed height, calculates a correction grid or matrix, and turns on leveling compensation. Specific behavior depends on configuration and type of bed leveling.
    • M500 saves the bed leveling data to EEPROM. Use M501 to load it, M502 to clear it, and M503 to report it.
    • M420 S<bool> can be used to enable/disable bed leveling. For example, M420 S1 must be used after M501 to enable the loaded mesh or matrix, and to re-enable leveling after G28, which disables leveling compensation.
    i used RESTORE_LEVELING_AFTER_G28 to prevent having to manually re-enable after G28.

    my questions are:
    1. are stored EEPROM configuration settings automatically loaded after powering on? or do you always have to M501 after every power cycle?
    2. if EEPROM settings are automatically restored, do you still have to M420 S1 to restore the autolevel state?
     
    #1 nol b, May 15, 2020
    Last edited: May 15, 2020
  2. nol b

    nol b Member

    Joined:
    Mar 1, 2014
    Messages:
    62
    Likes Received:
    10
    and now, reading the EEPROM page, it says:

    https://marlinfw.org/docs/features/eeprom.html
    Most 3D printer electronics include a little bit of storage (512K, 3K, or more) called EEPROM (Electrically Erasable Programmable Read-Only Memory) that persists when the power is off. Marlin uses the EEPROM to store the printer settings and loads them up the next time the machine powers up. Changing the source code and re-flashing the firmware does not change the contents of EEPROM.

    does this mean that the autolevel state is automatically restored at power up?
     
  3. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    You are probably asking the incorrect group of people :)
    You might get an answer here, but the Marlin folks would best be suited to answer those (and it is not a question about the stock versions either which limits the folks here who have done this).

    You might want to try the Community links here: https://marlinfw.org/docs/development/contributing.html
     
  4. Dcbarry

    Dcbarry New Member

    Joined:
    May 27, 2018
    Messages:
    22
    Likes Received:
    3
    Nol, what customizations have you made to your r1 +? Did you just make changes too config.h, and if so, would you mind posting?


     
    mark tomlinson likes this.
  5. nol b

    nol b Member

    Joined:
    Mar 1, 2014
    Messages:
    62
    Likes Received:
    10
    i asked on the Marlin discord and was told that bed level state is always disabled on boot. so i'll just add M420 S1 to my beginning gcode to enable it. my thoughts are that maybe this is because the bed level info is loaded with from EEPROM but not actually enabled. also, they mentioned that bed leveling has issues in general in 2.0.5 (which is what i'm using). they didn't elaborate on what that meant and i didn't want to ask since i could just go look at the list of bug reports and didn't want to admit that i'm too lazy to do that.

    i've attached my Configuration.h file. i did not make any changes to Configuration_adv.h. i customized the config file to how i want my printer to work and to my specific configuration so i wouldn't treat this as automatically applicable to any other printers.

    some things worth noting:
    • i haven't gone through and tweaked speeds, acceleration or jerk yet
    • my z-axis seems to be a little compressed so i still need to mess with that
    • my R1 printer is from after the Kickstarter but came with threaded rods for z-axis
    • i've upgraded it with
      • i reversed the z-limit switch and added a second one so that i could use bed leveling a while back
      • E3Dv6 (this drives the thermistor that is selected in the config file)
      • just upgraded from the rails to rods on the y-axis (which is why i decided to also update firmware)
      • i replaced the threaded rod with the lead screw upgrade kit from a while back (2016?)
      • i added an extra board that sends power to the heat bed. because of this, i raised my max bed temp from 110 to 130. not sure if that matters.
      • using the RepRap Discount LCD
      • i enabled Bilinear Bed Leveling and enabled the LCD menu
    • there are settings to raise the nozzle before moving at certain times. i still need to fix those as the behavior is a little weird. it doesn't cause any issues but it looks wonky when it's doing it so that makes me unhappy.
     

    Attached Files:

    mark tomlinson likes this.
  6. nol b

    nol b Member

    Joined:
    Mar 1, 2014
    Messages:
    62
    Likes Received:
    10
    i changed from this:
    #define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 800, 723.38 }
    to this:
    #define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 836.7, 723.38 }

    and that seems to give me a proper Z print although that's only testing on one object. i'm still going to print some calibration objects to make sure that value holds at different heights.
     
    mark tomlinson likes this.
  7. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    While you are in there calibrate the extruder as well (the 723.38) if you have not already :)
     
  8. nol b

    nol b Member

    Joined:
    Mar 1, 2014
    Messages:
    62
    Likes Received:
    10
    is this still considered the proper way to do it? i guess i don't see how there could be any other way.
    https://www.matterhackers.com/articles/how-to-calibrate-your-extruder

    basically put the filament through a straw and then mark off where it starts and ends?
     
  9. nol b

    nol b Member

    Joined:
    Mar 1, 2014
    Messages:
    62
    Likes Received:
    10
    oh wow. it's surprisingly off by quite a bit. when i tell it to extrude 10mm i'm getting about 8.7mm. thank you for the heads up! i wasn't even thinking about the extruder for some reason.

    after doing the test 3 times, my new extruder value is 826.32. that gives me:

    #define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 836.7, 826.32 }

    also, i don't know if this is new to Marlin 2 or not but i can adjust the step values from my LCD now so that i don't have to reflash the firmware every time i change the value.
     
    mark tomlinson likes this.
  10. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    Good, although once you have the numbers dialed in you might as well do them in the firmware
     

Share This Page