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
    I think in my own personal version of this firmware I will be homing at Z_MIN, seems to make more sense to me. Besides I have moved back to MESH leveling with a 25 point grid.
     
    supercazzola likes this.
  2. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    After playing with Robo's GITHUB all weekend long, I have come to the personal decision that I can no longer recommend that anyone use the source code located there for upgrading the R2/C2. There are just too many self-inflicted errors within the source code that will render your printer inoperable. Robo Official version 1.1.7 (Marlin 1.1.0 RC8) appears to be the last version that actually works. I have tried numerous revisions from the 'OFFICIAL' GITHUB repository and all do not compile correctly, nor are usable once uploaded to the printer.

    I will continue to work on this version to make it a reliable alternative firmware.
     
  3. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    New from the Marlin devs, release 1.1.6.
    I do not currently use UBL so I have not tested this on my personal R2, use at your own risk.
    Source files for those that want to poke around.
    Flashable .hex file can be installed directly from the OctoPrint Settings screen using the Firmware Flasher plugin. 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
    Please note, all files are archived and must be extracted before use.
     
    #23 WheresWaldo, Oct 15, 2017
    Last edited: Oct 15, 2017
  4. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Slight modification to these files to return homing to the top left rear of the build platform.
    Edited versioning numbers and machine names.
    UBL is a far superior leveling scheme to the default Robo firmware leveling.
    UBL only needs to be done once, each subsequent G29 (leveling g-code) only displays the current status of the leveling mesh created by UBL.
     
  5. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Okay, I finally broke down and decided I would give UBL a fair shake. I made a few little tweaks to Configuration.h and compiled and exported the binary file. After flashing the firmware in OctoPrint, I moved on to initializing the mesh. Here are the steps I followed.

    Done in the RoboLCD:
    1. From the LCD go to Utilities >> Wizards >> Z Offset to change the offset
    All done within OctoPrint:
    1. In settings flashed firmware .hex file with the Firmware Flasher Plug-in
    2. Verified that I reconnected to the printer at 250000 baud
    3. In the terminal tab issued M502 to reset all of memory to firmware defaults
    4. Issued M500 to store those defaults in EEPROM
    5. Optional you can preheat the nozzle and/or bed, I did not do that
    6. Issue G28 to home all axes
    7. Issue G29 P1 to start mesh probing (optionally you can issue G29 P1 T if you want a bunch of numbers scrolling in the terminal window)
    8. Issue G29 S1 to save your values to mesh slot number one
    9. Issue G29 A to activate the UBL leveling system
    10. Issue an M500 to store everything in EEPROM
    11. Print and Profit
    Presented are two zip files, one containing the source files and the other the actual .hex file I used to update the printer. Original post updated with correct link.

    I immediately test printed the deprime model and the results were nearly perfect. It is a bit stringy because I did not reslice the model and I had PETG in the printer originally. As a result this was printed a bit too hot in PLA.

    [​IMG]

    You must do the Offset first because the Wizard in RoboOS resets all functions to firmware defaults thus invalidating the UBL mesh.
     

    Attached Files:

    #25 WheresWaldo, Oct 28, 2017
    Last edited: Nov 15, 2017
  6. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    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.
     
  7. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Found a bug in RoboOS, every time you start up the printer it resets all of your EEPROM settings to firmware defaults. This is stupid and should not be there. It dumps you valid mesh and any other EEPROM setting, such as PID tuning.
     
    supercazzola likes this.
  8. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Something really funky is going on with RoboOS. I haven't pinned it down but it seems that some EEPROM settings are being ignored or overwritten when you turn on the printer. In order to make sure that UBL is on and active I added the following script to the OctoPrint "After connection to printer is established" section of GCODE Scripts in Settings.
    Code:
    M400 ; clear commands in command buffer
    G28 : home all axes
    G29 L1 ; load UBL mesh from slot 1 (the number is the slot you save the mesh in)
    G29 A ; activate UBL
    
    This will force UBL back on right after RoboOS initializes and just before you see the default RoboOS settings screen on the LCD.
     
    supercazzola likes this.
  9. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    oooh. Off their Christmas list :)

    Good job.
     
  10. adikted2astro

    adikted2astro Active Member

    Joined:
    Aug 10, 2017
    Messages:
    290
    Likes Received:
    112
    @WheresWaldo, or anyone else who knows the answer, I've got a problem. I finally have time to start trying out unified bed leveling instead of MESH. I have been able to auto probe and save all the UBL points. I'm at the step where I need to run a test print. I can't seem to get G26 to work at all. I've tried everything, specifying bed and hotend temps, prime length, all kinds of variations. I even tried just running G26 without specifying anything. The printer will not run a test print no matter what I do. I even looked through the configuration.h file and UBL_G26_MESH_VALIDATION is enabled. My printer is just sitting here like an idiot. But I assure you, I've done all the steps exactly as they are specified. Any suggestions?
     
  11. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Remember G26 is not immediate, it must wait until the bed and hotend heats, and if I remember correctly it does not tell the LCD that it is working. Its as if Roxy3D ignores everything Marlin does to do the validation print.
     
  12. adikted2astro

    adikted2astro Active Member

    Joined:
    Aug 10, 2017
    Messages:
    290
    Likes Received:
    112
    That's the problem, no matter what I specify, the bed and hotend don't actually heat up whatsoever. I don't understand it. I even tried setting the bed and hotend temp using M190 and M104, then once it was up to temperature, I issued the G26 command..................nothing happened. It's been sitting here for the past 20 minutes (at temperature) and still nothing.

    I am currently redoing the UBL with the .hex file Waldo presented above. Maybe after it's done I can run a test print utility.
     
    #32 adikted2astro, Dec 11, 2017
    Last edited: Dec 11, 2017
  13. adikted2astro

    adikted2astro Active Member

    Joined:
    Aug 10, 2017
    Messages:
    290
    Likes Received:
    112
    This is why my PID settings kept going back to default every time I started up the printer. This was a while ago though, maybe 2.5 months or so.
     
  14. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    @adikted2astro I found a work-around, save you mesh to slot 0 then in the OctoPrint scripts add the following to Settings >> GCODE Scripts >> After connection to printer is established >>
    Code:
    M400 ; clear commands in command buffer
    G28 ; home all axes
    G29 L0 ; load UBL mesh from slot 0
    G29 A ; activate UBL
    It should be self explanatory from the comments.

    You could do a similar thing with PID settings, but maybe put it in the start up G-code.
     
    supercazzola likes this.
  15. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    One more note about G26, You can't just do a G26 all by itself, if you are using the terminal screen or G-code in a file, you must include the R parameter so it repeats, example at the very minimum:
    Code:
    G26 R
     
  16. adikted2astro

    adikted2astro Active Member

    Joined:
    Aug 10, 2017
    Messages:
    290
    Likes Received:
    112
    Ah ok, that makes sense.I have already loaded those commands into the script. But, now I'm having another issue (of course). My z-offset seems to be way too low. I've done the z-offset wizard, I've even entered the information in gcode, and the offset is still not working properly. I'm at least 10 mm too low.
     
  17. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    @adikted2astro
    I gave up using the Wizard. It does not seem to work with UBL properly. What I did was set M206 z offset to zero using
    M206 Z0
    Then built the UBL mesh
    Then issued a G1 Z0
    Then moved fractions of mm at a time closer to the bed to figure out just what it would take to get to the actual Z0 keeping track of the moves. Then you can issue a M206 Zn.nnn where n.nnn is the number you figured out by the moves.
    G28 to home all axes, then another G1 Z0 to see if it is correct, adjust accordingly.
     
    supercazzola likes this.
  18. adikted2astro

    adikted2astro Active Member

    Joined:
    Aug 10, 2017
    Messages:
    290
    Likes Received:
    112
    Ok, I realized that even though I did the z-offset before the UBL process, once I issued the M502 command, the z-offset was erased. Once I performed the z-offset wizard again, it worked.
     
    WheresWaldo likes this.
  19. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    After you are all done do a M503 to verify all your settings.
     
  20. adikted2astro

    adikted2astro Active Member

    Joined:
    Aug 10, 2017
    Messages:
    290
    Likes Received:
    112
    The R was what was causing G26 to fail. On the webpage http://marlinfw.org/docs/features/unified_bed_leveling.html, it specifies the code as G26 BXX HYYY F1.75 L0.2 S0.4. That's what I used at first and it didn't work. However, if you add an R into that code, it does work. I'm making a test print now.
     
    supercazzola likes this.

Share This Page