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

Marlin for the R2 - UBL Enabled

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

?

Would you like to see U.B.L. enabled for the R2?

  1. Of course!

    31 vote(s)
    93.9%
  2. Not really.

    1 vote(s)
    3.0%
  3. Why are you wasting your time with this?

    1 vote(s)
    3.0%
  1. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    @jim3Dbot knows all about the IR sender / receiver specs, there are some that are better than others. I am not an electronics expert nor can I read spec sheets in depth. He went through this when he designed the IR sensor for the R1.
     
    mark tomlinson likes this.
  2. studiver13

    studiver13 New Member

    Joined:
    Dec 28, 2017
    Messages:
    22
    Likes Received:
    8
    @WheresWaldo I have set up UBL and I have it almost to the point I want it, a few spots are still off. I was wondering however, what do I need to change to make the bed home at the bottom of the machine instead of the top? It is impossible to remove prints when it goes back up top when it is done.
     
    supercazzola likes this.
  3. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    You have choices,

    If you want it to home at the top but not after a print finishes you can edit the script that OctoPrint uses, I don't know why Robo wanted it to home after a print completes, they still home again before it prints again. In OctoPrint>>Settings>>GCODE Scripts>>After print job completes and remove the homing and instead move the bed down from the last point. Mine looks like this:
    Code:
    M104 S0 ; turn off heaters
    M140 S0 ; turn off heaters
    M107 ; turn off fans
    G91 ; set relative mode
    G1 Z50 ; move bed down 50 mm
    G90 ; set absolute mode
    G28 X0 Y0 ; home XY axes only
    G92 E0 ; zero extruder
    M84 ; turn off motors

    Or, you can modify the firmware and reflash. Just edit Configuration.h :
    Code:
    // Direction of endstops when homing; 1=MAX, -1=MIN
    // :[-1,1]
    #define X_HOME_DIR -1
    #define Y_HOME_DIR  1  // [robo]
    #define Z_HOME_DIR -1

    Personally I use the first method.
     
    #63 WheresWaldo, Jan 5, 2018
    Last edited: Jan 5, 2018
    supercazzola likes this.
  4. adikted2astro

    adikted2astro Active Member

    Joined:
    Aug 10, 2017
    Messages:
    290
    Likes Received:
    112
    I put in a G1 Z200 command in the Gcode script "After a print job completes". Bed drops down 200 mm after all print jobs. You could also use G1 Z250. That would drop the bed down all the way to the bottom until it hits the Z limit switch. But, 200 mm is plenty.
     
  5. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    If you leave it in absolute mode you can go down to a specified position. I think I am going to change my script to do that instead. Better safe than sorry lowering the bed. So here is the new scripts

    After print job completes
    Code:
    M104 S0 ; turn off heaters
    M140 S0 ; turn off heaters
    M107 ; turn off fans
    G1 Z250 ; move bed down to bottom
    G28 X0 Y0 ; home XY axes only
    G92 E0 ; zero extruder
    M84 ; turn off motors
    M355 S0 ; turn lights off


    After print job is canceled
    Code:
    M104 S0 ; turn off heaters
    M140 S0
    M107 ; turn off fans
    G1 Z250 ; move bed down to bottom
    G28 X0 Y0 ; home XY axes only
    G92 E0 ; zero extruder
    M84 ; turn off motors
    M355 S0 ; turn lights off

    I have my G-code controlled lights mod installed that is why I have the last line in the scripts.
     
    #65 WheresWaldo, Jan 5, 2018
    Last edited: Jan 5, 2018
    supercazzola likes this.
  6. studiver13

    studiver13 New Member

    Joined:
    Dec 28, 2017
    Messages:
    22
    Likes Received:
    8
    So far every time I set my UBL my Z offset gets messed up and it tries to print way to high. I then set the Z offset and two things happen. I loose my UBL grid and every time i click print it tells me "Z Offset set at 3.25, please set Z offset before print" I can also not do a fine tune of the Z offset as it thinks it is not set. Any suggestions?
     
  7. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    You missed the proviso about using the Z Offset Wizard. It has a bug in it and it erases all values in EEPROM, that includes the UBL mesh values. You have to set the home offset manually and stop using the wizard.
     
  8. adikted2astro

    adikted2astro Active Member

    Joined:
    Aug 10, 2017
    Messages:
    290
    Likes Received:
    112
    I can't do a fine tune either, but I have no need to really. What I do is perform UBL, save the mesh into slot 1 and activate it using G29 A. Then set the Z-offset using M206 Zn.nn (n.nn is the offset), save with M500, then print the mesh using G26 Bxx Hyy F1.75 L0.2 R S0.4. The xx is bed temp, yy is hotend temp, F1.75 is filament diameter, L0.2 is a layer height of 0.2mm, R repeats it, and S0.4 is nozzle diameter. If your nozzle diameter is different, then use type in that diameter instead of 0.4.

    You can't use the Z-offset wizard, so you will have to use the controls in Octoprint to do it. You could set your offset first before UBL, but it's not really necessary. You can do it afterwards. Here's the process:
    1. Home all axes with G28 in the OctoPrint Terminal tab
    2. Either use the OctoPrint Control tab or physically move the head to anywhere toward the middle of the print surface
    3. 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
    4. 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
    5. 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
     
  9. Shailesh

    Shailesh New Member

    Joined:
    Dec 20, 2017
    Messages:
    1
    Likes Received:
    0
    Hi,
    Just wondering if some one can help me how I can flash code and if required how I can downgrade ?
    Thank you,
    Shail
     
  10. supercazzola

    supercazzola Active Member

    Joined:
    Jun 1, 2017
    Messages:
    424
    Likes Received:
    111
    Flashing a hex file is just as easy as putting it on your memory stick, and then selecting the file from the main files section on the R2.

    One thing you should always do is record / write / photography the EEPROM settings before you do any experimenting with changing the firmware. That way, you have the settings when the firmware changes things like the extruder steps
     
  11. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    I am currently in the process of reworking my version of UBL enabled Marlin for the R2 to incorporate all the additions Robo added to their version. Even though every attempt will be made to make it just a drop in replacement, there is no guarantee that all features of RoboOS will work as expected. There is no ETA on when it will be done and posted.

    Only the added functionality from Robo will be included, all the stuff Robo stripped from Marlin will not be stripped from this version.
     
    supercazzola likes this.
  12. supercazzola

    supercazzola Active Member

    Joined:
    Jun 1, 2017
    Messages:
    424
    Likes Received:
    111
    when this is ready, i'll be glad to try it and give you my honest feedback from someone who never compiled their own f/w.
     
  13. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    I am about half way through the additions Robo added, they will be functional and enableable, but the default will be UBL. Don't know why they still insist on using ABL LINEAR instead of BILINEAR.
     
    supercazzola likes this.
  14. Geof

    Geof Volunteer Moderator
    Staff Member

    Joined:
    Nov 9, 2015
    Messages:
    6,757
    Likes Received:
    2,339
    the evil you know? :D
     
    supercazzola likes this.
  15. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Okay, I am giving up on including any functionality that Robo has added to the R2 future firmware releases.
    1. I can't see any increase in user functionality in the added code
    2. There is no increase in print quality produced by their code
    3. The included functionality breaks existing functionality in other portions of Marlin
    Number 3 is the biggest reason not to ever use Robo's firmware. Not enough to add features, you must also do no harm. They broke stuff.

    Opened ticket on their GITHUB. If you plan on using Open Source Software and you need to improve it, then you better make sure that is all your doing and not breaking shit.
     
    #75 WheresWaldo, Feb 9, 2018
    Last edited: Feb 9, 2018
  16. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Made a few small changes in my Marlin source, you can download a new copy from the GITHUB repository. It only consists of a few formatting changes for ease of reading and a few speed tweaks for the Z axis and homing and auto-level probing. Number of probes are increased to three per probe point.

    I also cannot get G26 to work properly, I believe it depends on M851 Z_OFFSET being set and I don't, preferring to use M206 Zm.nnn (HOME_OFFSET) instead. So to test whether or not my mesh is good I created a matching STL file that is 1 mm tall. The way I use it, slice and restrict printing to one layer only. The print and cool, pop each one off and measure what it is noting the difference between the print and your slicer settings, then adjust the necessary points and/or home offset to get the correct size layer 1. Once that is done save with M500 and never level again. I have attached the STL here.

    UBL Dots v6.png
     

    Attached Files:

    nytcrawlr and mark tomlinson like this.
  17. JustinDS89

    JustinDS89 Member

    Joined:
    Feb 20, 2018
    Messages:
    148
    Likes Received:
    21
    Hello,

    I am really interested in this as I think it will solve some of my issues.

    Can anyone kind of walk me through the process of flashing this and setting it up.

    I'm not really understanding quite how you use this once it is flashed onto the printer.

    Thanks in advance!
     
  18. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
  19. JustinDS89

    JustinDS89 Member

    Joined:
    Feb 20, 2018
    Messages:
    148
    Likes Received:
    21
    Ah okay, I will read into that a bit. I noticed for the mesh firmware there was a kind of how-to for it and was hoping for something similar here. I'm not sure how to get the hex file from GitHub.

    Appreciate the quick response.
     
  20. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    @WheresWaldo and the others are more conversant on this :) One of them may well have more to add
     

Share This Page