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

Marlin for the R2 - MESH Enabled

Discussion in 'Mods and Upgrades' started by WheresWaldo, Sep 10, 2017.

?

Would you like to see MESH enabled for the R2/C2?

  1. Of course!

    14 vote(s)
    100.0%
  2. Not really

    0 vote(s)
    0.0%
  3. Why are you wasting your time with this? Meh.

    0 vote(s)
    0.0%
  1. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,837
    Likes Received:
    3,548
    The R2 doesn't use the nozzle as the probe so the probe is offset, home is actually higher than the nozzle by 4 - 6 mm that is why you need to tell the machine than home is not where it thinks it is with M206.
     
    supercazzola and Geof like this.
  2. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,837
    Likes Received:
    3,548
    New stuff, Marlin release version 1.1.6.
    Source files for those that want to poke around.
    .hex file flashable directly from the OctoPrint Settings screen. The compiled binary was created with the Arduino IDE version 1.8.5, no other version was tested.
    Release notes are located here: https://github.com/MarlinFirmware/Marlin/releases
     
    #22 WheresWaldo, Oct 15, 2017
    Last edited: Oct 15, 2017
  3. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,837
    Likes Received:
    3,548
    Okay after a bunch of testing and hating the way the default firmware works, I reworked this version. It again homes at the top of the build volume. It uses a 5 x 5 MESH that only needs to be done one time. All subsequent G29 (leveling) commands only display the MESH status, greatly speeding up the printing process. This leveling and the UBL found in the other thread are far superior to the leveling used in the default Robo firmware.
     

    Attached Files:

  4. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,837
    Likes Received:
    3,548
    I wrote this up for one of the Robo guys and I knew it would be useful here. This is a step by step on how I do the MESH initialization.

    1. Compile source and export binary file
    2. Go to OctoPrint settings and use Firmware Flasher Plugin to update the firmware
    3. Almost everything else is done in either the OctoPrint Control or Terminal tabs
    4. Reconnect to your printer making sure you change baud rates to 250000 (the original firmware defaults to 115200)
    5. Home all axes with G28 in the OctoPrint Terminal tab
    6. Either use the OctoPrint Control tab or physically move the head to anywhere toward the middle of the print surface
    7. In The OctoPrint Terminal tab issue a G1 Z0 command so that the head stops when the IR is triggered, your LED may flash or be solid on. We are going to set the home offset first
    8. In the OctoPrint Control tab using the 1 mm and 0.1 mm buttons move the head toward the bed keeping track of the overall dimension. You just want to barely touch the bed or the little paper gauge included with the R2
    9. Once you know that number go back to the OctoPrint Terminal tab and issue an M206 Zn.nn, where n.nn is the number you just determined
    10. Now you are ready to initialize the MESH
    11. In the OctoPrint Terminal tab issue a G29 S1, that will home again and place the nozzle in the front left corner of the build platform
    12. In the OctoPrint Control tab either move up or down in 0.1 mm steps until the paper gauge slides in easily under the nozzle
    13. Once satisfied with the feel of the gauge go back to OctoPrint Terminal tab and issue a G29 S2, which will store that point and move to the next measurement location
    14. You will repeat steps 11 & 12 a total of 25 times, I set the grid default to 5 x 5
    15. Once complete activate the MESH with M420 S1 then use M500 to store the everything
    16. That is it, Now you just need to home before each print. Even if you leave G29 in your start up script all it will now do is give you the current status of the MESH within the terminal tab
    At this point I usually run a test print, something really small to test the Home Offset. If you squeeze the paper gauge too much you can end up with something too close. I will print something like a 10 mm cube with very low infill and a skirt then measure the skirt to see if it matches my layer height. If it is smaller a decrease the Home Offset, larger and I increase the Home Offset directly on the RoboOS LCD in the Utilities >> Options >> EEPROM screen. I never touch it again unless I either bang the machine around or have to remove the gantry for some reason.

    I know it is a bit more setup than using the default firmware but it will increase your print start up by not having to level for each and every print. I also suggest doing this while both the nozzle and bed are warm to eliminate that as a factor in building your MESH. Also of note, I do not have a computer near my R2, but I own a Samsung tablet and I have an Android smartphone. I have used both, but prefer the tablet, to attach to the web interface (OctoPrint) of the R2. It couldn't be easier.
     
    #24 WheresWaldo, Oct 25, 2017
    Last edited: Oct 25, 2017
  5. adikted2astro

    adikted2astro Active Member

    Joined:
    Aug 10, 2017
    Messages:
    233
    Likes Received:
    68
    This is REALLY helpful, thanks Waldo! I've been studying the MESH bed leveling routine and you just made my day a lot easier.
     
  6. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,837
    Likes Received:
    3,548
    @adikted2astro Just so you know, I switched from MESH (which I love) to UBL and it works! Think of it as automated MESH.
     
  7. adikted2astro

    adikted2astro Active Member

    Joined:
    Aug 10, 2017
    Messages:
    233
    Likes Received:
    68
    I have looked at both and yes, I believe UBL to be superior, but it seems a lot more complicated to me. I've never really messed with Arduino code before, so it is still a bit difficult for me to understand, especially when I can't seem to find the AUTO_BED_LEVELING_UBL line in the config.h file
     
  8. adikted2astro

    adikted2astro Active Member

    Joined:
    Aug 10, 2017
    Messages:
    233
    Likes Received:
    68
    OK, I downloaded the files above and extracted them. I now have the Arduino program open, along with the config.h file. I also found the AUTO_BED_LEVELING_UBL option. Here's where I get confused. How do I compile the source and create a binary file? Just run it via ctrl+R, then export the binary? There are so many tabs in the Arduino program that it really confuses me. Like I said, I have very little experience doing this.
     
  9. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,837
    Likes Received:
    3,548
    I already have pre-configured files for UBL so you need not change anything in Configuration.h. There are also a few other differences so not just the one line.

    Once the source is loaded in the Arduino IDE, if you want a .hex file to update the firmware it is as simple as choosing Sketch >> Export compiled Binary
     
    nytcrawlr likes this.
  10. adikted2astro

    adikted2astro Active Member

    Joined:
    Aug 10, 2017
    Messages:
    233
    Likes Received:
    68
    Waldo, I decided to take it one step at a time. I completed MESH bed leveling and I'm about to start my first test print. But, I ran into something curious. Before, when I homed all axes, the bed would go all the way down until it hit the limit switch. The fact that it goes up until the IR is triggered is fine except for one thing. When the print is complete, will the bed drop to the bottom, or go back to where the IR is triggered? It would be a bad thing if it were the latter because on large prints, the extruder might hit the part.
     
  11. adikted2astro

    adikted2astro Active Member

    Joined:
    Aug 10, 2017
    Messages:
    233
    Likes Received:
    68
    i just answered my question. The bed did not drop down to the z-stop. What is the correct code to get it to do so? I can change the Gcode script in Octoprint for "after a print job completes"
     
  12. adikted2astro

    adikted2astro Active Member

    Joined:
    Aug 10, 2017
    Messages:
    233
    Likes Received:
    68
    I couldn't find out how to drop the bed all the way down to the limit switch. But, I did find that I can add "G1 X0 Y0 Z200" and it will drop the bed down 200mm (and put X and Y at 0).

    EDIT: I just started my first real print and the first layer is spectacular, especially compared with my previous prints. As far as I can tell, MESH bed leveling really helped out. But, this also brings me to another question that hopefully someone can answer.

    In the instructions above, when performing the bed leveling at each grid point, we are supposed to increase or decrease Z height by 0.1 or 1 mm in the Octoprint Terminal. Is it possible to use the LCD to do this? I only ask because there it''s possible to increase or decrease in 0.05 mm steps.
     
    #32 adikted2astro, Nov 2, 2017
    Last edited: Nov 2, 2017
  13. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,837
    Likes Received:
    3,548
    @adikted2astro I have been out of sorts for the past few days and just saw all your posts. I am glad that 1. you are figuring things out on your own and 2. you are liking MESH. As soon as MESH was introduced on the R1 I started using it and never looked back. It was like a whole different printer. Unified Bed Leveling has come a long way since it was introduced and That is what I am using now on the R2.

    I was tired of waiting on the printer to do all it's gyrations before it started a print that is why I changed the homing to the top. It also doesn't home in the middle of the bed either.

    I don't know if you can use the LCD, I never tried it.
     
  14. adikted2astro

    adikted2astro Active Member

    Joined:
    Aug 10, 2017
    Messages:
    233
    Likes Received:
    68
    I understand. I hate having to wait for the bed to go up, then down, then back up again. It's ridiculous. As far as the printer goes though, I am having a problem, but I don't know what to make of it. It's a small cylinder, 100% infill (because it needs to hold pressure), but I have these huge bands on it. I've seen banding before, but it was usually consistent and the cause was my lead screw. This I can't understand. This is the first print after using MESH bed leveling. Any thoughts?
    IMG_0567.JPG
     
  15. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    21,373
    Likes Received:
    7,045
    If the bands are recessed on one side and protruding on the other then it is a slip in the axis drive, if they are protruded the same all the way around that is something else entirely and could be a model issue.
     
  16. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,837
    Likes Received:
    3,548
    @adikted2astro Please start a troubleshooting thread on this as it is unrelated to the MESH firmware.
     
  17. adikted2astro

    adikted2astro Active Member

    Joined:
    Aug 10, 2017
    Messages:
    233
    Likes Received:
    68
    BTW, thanks Waldo for the second decimal place on temperature readings. I didn't even know that was something you could change.
     
  18. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,837
    Likes Received:
    3,548
    That wasn't me, That is part of RoboOS.
     
  19. adikted2astro

    adikted2astro Active Member

    Joined:
    Aug 10, 2017
    Messages:
    233
    Likes Received:
    68
    Really? My printer didn't give me two decimal places until I flashed the firmware using your code.
     
  20. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,837
    Likes Received:
    3,548
    I have been monitoring the Marlin developers GITHUB the past couple of days and it looks like there may be a 1.1.7 coming. It does actually have a few fixes that we might need. I will continue to watch it and have a version for the R2 ready within a few days of release.
     

Share This Page