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

Upgrade to Marlin 1.1.9 UBL + Extras (Work in progress)

Discussion in 'Projects' started by CdRsKuLL, Oct 20, 2018.

  1. CdRsKuLL

    CdRsKuLL Member

    Joined:
    Sep 27, 2018
    Messages:
    81
    Likes Received:
    35
    Bit of a rant and reason behind it all
    So, I really didn't intend or want to go down this route but I've been getting inconsistent auto-bed leveling from the present R2 setup. It might well be that I'm just so used to the G28 command (Home) being XYZ=0.. and the bed sitting under the nozzle at the front left. With the default R2 the Z home is when the bed is at the bottom of the unit. I'm not sure why they did this, or infact why they use the M206 command.. it's all a bit upsidedown really. The most accurate endstop on the whole machine is the infrared sensor, but they seem to be using the bottom endstop to measure the Z height... Anyway they also add a G35 / G36 which I think is an aim to try and tackle the G28 reset autolevel problem..

    More info and background waffle
    Marlin 1.1.9 comes with lots of updated / bug fixes etc and it didn't actually take much to get a working version on to the R2. However, because the bed now homes at the top rather than the bottom you do need to alter quite a few settings to get it to work correctly. Also doing this breaks some of the wizards which I'm halfway through fixings at the moment. One of the good things 1.1.9 brings is it has the option not to lose the autobed readings even after a G28 command (now enabled).

    So, this is a work in progress. Below is a bit of a rough list.

    Done so far..
    Updated to Marlin 1.1.9
    Change the Raise Bed to Lower Bed in the motor graphics and commands on the LCD
    Z-Offset Wizard now working with M851 even saves when canceling out
    Improved Filament unload/load wizard.
    Z-offset fine tune wizard.
    Bed level 4 point wizard.

    Working on at the moment
    All changes completed. Under testing.

    Steve
     
    #1 CdRsKuLL, Oct 20, 2018
    Last edited: Oct 21, 2018
  2. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,962
    Likes Received:
    7,344
    I would kit it ALL up on github with instructions. That way the various bits (firmware, LCD python code and RoboOS image if you rather) are all parts of the kit and can either be downloaded individually or as a bundle. Just make your instructions clear and that would be a fine way to go. :)
     
  3. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Glad to see another variant of 1.1.9 for the R2, I already had a GITHUB with UBL enabled and all the speed settings tweaked, you should look at it and compare what you did to that. I am curious to see just how different or the same they are.

    https://github.com/WheresWaldo/Marlin_for_R2
     
    CdRsKuLL likes this.
  4. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,962
    Likes Received:
    7,344
    P.S. if you are not used to GitHub I will be happy to assist :)
     
  5. CdRsKuLL

    CdRsKuLL Member

    Joined:
    Sep 27, 2018
    Messages:
    81
    Likes Received:
    35
    Hi, sorry I didn't know you had already done 1.1.9 otherwise I would have saved some time and just used it :) O well, yes it will be good to compare. I've not fully tested mine but it seems okay.

    Yes, although I've registered I've not a clue how to use it being honest. so any pointers would be great.

    --

    Good news, I've got the Z-Offset wizard now fully working. This also includes the software endstops enable / disable.. although I've had to fudge the code a little to get there. It also restores the Z-Offset if you back out at any point rather than just leaving it as zero.

    Next I'll look at the fine tune one. :)

    Thanks for the comments and help

    Steve
     
  6. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,962
    Likes Received:
    7,344
    If you are on Windows download: https://desktop.github.com/ (they have a Mac version too) and sign in.
    It makes creating and cloning repositories easy-peasy.

    I guess on Linux folks would be more comfortable with the command-line version of git :)
    I have it and use it on occasion (but mostly I prefer the GUI)
     
  7. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    @CdRsKuLL take a look at the other 1.1.9 thread, I mentioned why you should use M851 vs. M206. They are very different things that can be used to accomplish the same goal, but one is better than the other in many instances. BTW, Both have been in the Marlin code for some time.
     
  8. CdRsKuLL

    CdRsKuLL Member

    Joined:
    Sep 27, 2018
    Messages:
    81
    Likes Received:
    35
    Yep, completely agree and I know they have been in there but couldn't understand why Robo home at the bottom. Also, they don't enable software endstops so you can if you wish drive the bed into the nozzle after you did a G28. Also sorted now :)


    Mark, I've downloaded and installed so will have a play later :) I might need you soon.. lol

    Steve
     
  9. CdRsKuLL

    CdRsKuLL Member

    Joined:
    Sep 27, 2018
    Messages:
    81
    Likes Received:
    35
    So, in the testing stage now, all mod's have been done :)

    The package will contain a replacement HEX, firmware file and a zipped up RoboLCD folder. It would be nice if I could get it to update itself, would have to spoof the robo git page maybe, don't know what are your thoughts? I would like the ability to update or restore via a single button press.

    In case you want to have a play below are some basic instructions

    DOWNLOAD IT FROM
    http://diyrc.co.uk/files/Robo_R2_1.1.9v1_upgrade.zip

    You will need to reflash the firmware
    1. Put the R2_Marlin_1.1.9v1.hex onto a usb and flash via your Files option on your R2 (includes 40mm Fan mod change but will work as standard without a second extruder. I've also included the Marlin source if you want to have a play.

    You will need to update the RoboLCD folder
    1. FTP into your R2 and goto /home/pi/oprint/lib/python2.7/site-packages/
    2. Rename the original RoboLCD to RoboLCD_Old (always better to keep a backup)
    2. Copy the new unzipped RoboLCD over to the same folder

    In Octoprint you will need to change the Start / Cancel / End Gcode to something like

    Start
    Code:
    ; set to millimeters
    G21
    ; set to absolute mode
    G90
    ; zero extruder
    G92 E0
    ; turn off fans
    M107
    ;non blocking heatup of extruder and bed
    M104 S230
    M140 S60
    ; Robo Leveling
    G28
    G29
    ; pause for 2 seconds
    G4 S2
    ; move bed down 15mm
    G1 Z15 F300
    ; move to front left corner
    G1 X10 Y1 F7200
    ; heat to priming line temp
    M109 S230
    M140 S60
    ; move bed to printing position
    G1 Z0.3
    ; print 190mm priming line
    G1 X190 E15.0 F500
    ; move bed down
    G1 Z15 F300
    ; zero extruder
    G92 E0
    ; set movement speed
    G1 F7200
    
    Finish and Cancel (just copy into both boxes)
    Code:
    ; turn off heaters
    M104 S0
    M140 S0
    ; turn off fans
    M107
    ; move bed down 10mm
    G91 
    G1 Z280 F1000
    G90
    ; home XY axis
    G1 X0 Y197 F3600
    
    ; set absolute mode
    G90
    ; zero extruder
    G92 E0
    ; turn off motors
    M84
    
    You may also need to change the feedrates in octoprint on your printer profile.. Invert the Z axis and set a feedrate to 100 should do it.

    Job done.. Please remember this is only the first release and may contain bugs etc..

    Please post comments below :)
     
    supercazzola likes this.
  10. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    All stuff we already know, the other version of 1.1.9 on this forum already homes at the top (rear left corner of the bed) and also increases the number of points probed. One of the biggest issues is the speeds Robo chose (or better didn't change from Marlin defaults), it makes for some rough prints. You didn't say how of if you adjusted any Jerk or Acceleration settings, again all done in the other 1.1.9.

    So my suggestion is, at the very least, if you want people to try your code, tell them what you changed from the Robo defaults for all the parts. Then they can decide whether or not they want to play.
     
  11. CdRsKuLL

    CdRsKuLL Member

    Joined:
    Sep 27, 2018
    Messages:
    81
    Likes Received:
    35
    Hi Whereswaldo,

    To many changes have been made to the RoboLCD files to list. For the Marlin firmware I've just copied the settings from the original Robo Marlin. Again, I didn't know you had already done the 1.19 otherwise I would have just used that and saved myself some time. It might also be stuff 'we' all know but I didn't and I'm sure other R2 users won't. Please don't think I'm stepping on toes.. Also, mine homes at the front left, where 0,0 should be ;-p

    I can think of no reason why the RoboLCD wouldn't work with your 1.1.9 firmware. Might be worth testing.. if it does I would be more than happy to adopt your firmware going forward. It would be good to test all the wizards as I've hopefully fixed them all now, removing all the 206 / probe commands and adding software endstops.

    The files I've uploaded are for those more experienced users for now. If you think something needs changing like the acceleration etc, then please do.. I would welcome any help as in the end everyone ends up with a better, more polished result.

    Also on another note, I noticed in the init in the root it has a GIT url

    update method: pip w/ dependency linkspip="https://github.com/victorevector/RoboLCD/archive/{target_version}.zip"

    Do you know if it would be possible to point this at your's maybe and use it to update releases?

    Thanks,

    Steve
     
    #11 CdRsKuLL, Oct 21, 2018
    Last edited: Oct 21, 2018
  12. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,962
    Likes Received:
    7,344
    Sure, if you need help, ping away.
     
  13. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,962
    Likes Received:
    7,344
    I'll let @WheresWaldo comment since he has done more on that side, but yes... that should be the way to go.

    Certainly: https://github.com/victorevector/RoboLCD
    has not had any recent changes :)
     
  14. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    A few comments:

    1. Not thinking about stepping on toes, just making sure that if someone uses code not from Robo, they know what they are getting, even if they are "Expert Users".
    2. If you want the R2 to perform as well as any of the printers it clones (Ultimaker for instance) then Acceleration and Jerk setting are a must to go through.
    3. Mine is a public GITHUB so anyone can clone it make changes and do pull requests, If you want to link to it, feel free. https://github.com/WheresWaldo/Marlin_for_R2
    4. If you look through my repository you will see Marlin code commented, I used [robo] anywhere that Robo deviated from the Marlin defaults and [BH] where I deviated from wither Marlin developer or Robo defaults. Robo didn't even document the bulk of their own code.
    5. Do not use anything from VictorVector's GITHUB, it is very old and does not work even with the current release of OctoPrint that Robo has settled on. If you really want the current RoboLCD code you either have to pull the .zip file directly from Amazon Web Services or from the repository I made from that same source. I will not guarantee that mine is up to the latest developments because Robo chose to hide that. https://github.com/WheresWaldo/roboLCD_current
    6. Please note that Robo is three versions behind the release of Octoprint (1.3.6 v. 1.3.9) and three releases behind Marlin (1.1.6 v. 1.1.9).
    7. Also note that installation of RoboLCD will force installation of their self maintained versions of OctoPrint, MetaReader, Firmware Updater, and EEPROM Editor unless you dig deeper into the RoboLCD code and rip out those references.
    8. I used the left rear because that is where the bed is most stable and not subject to any real vibrations. I got more consistent readings from the sensor there than in the front. But the front corner is good too.
    9. There is a reason software endstops are not enabled, but I can't remember why that is.
    10. This one is just me, I spent a lot of time testing Acceleration and Jerk settings to include in Marlin_for_R2 and I have to divide my time between other projects, work and family, so really if you want to change those settings in your own code, just take some time to see where I changed them and apply those settings yourself, or not, no big deal. All I ask is that you credit where those settings came from. Honestly I would test them against your printer to see if they are still valid settings.
     
  15. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Just one more thing, If you leave the code intact to look for updates on Amazon's servers, any update will wipe all your changes and revert behavior back to what Robo has divined as proper settings for their printers.
     
  16. CdRsKuLL

    CdRsKuLL Member

    Joined:
    Sep 27, 2018
    Messages:
    81
    Likes Received:
    35
    Hey Waldo,

    I would be more than happy to use your 1.1.9 if you don't mind. Infact, if I could help on a community project it would be a lot better for me. The Github link you mentioned, I know it's out of date but I could point it to your's so it would pull the latest 'community' releases. That's what I was thinking?

    I've also been thinking about looking at writing a little windows app, that ssh's into the PI, backups and transfers the files over, all in a single click. Also, another button that reverts it back to standard. It might take a week or so to write but it would be really easy then for anyone to upgrade to the community release. Just input the IP and click Install or Uninstall. I'm the same with family, kids etc.. hence would defo prefer a community release :)

    Let me know if you find chance to test those wizards :)

    Oh, and good point on the robo update routine, I best try and disable it for now.

    Thanks,

    Steve
     
    mark tomlinson likes this.
  17. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,962
    Likes Received:
    7,344
    Disable it until we can find a way to replace it with a community version as you suggested.

    One thing is for certain -- it is not going to be terribly hard.
    The software they have tweaked is little modified from where it started in most cases.
     
  18. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    One of many things I don't like about RoboOS and the µSD card is the lack of structure on the card. There is too much "junk" in the image. It was as if they experimented with trying to get OctoPrint installed by itself then opted for OctoPi instead. But instead of starting over, they left everything there.

    One more thing, using the network hostname as the serial number while out of the box is not my favorite way of doing things, since I believe Robo Tech Support doesn't actually check for the validity of the serial, just that you say something that resembles two unrelated words. Certainly RoboOS works without any hostname set.

    I am off to do family the rest of the afternoon, but I will post later tonight where exactly to strip references to Robo's source. I also have them stripped from here: https://github.com/WheresWaldo/WaldoLCD/tree/1.11.15. Don't study the rest of the code too much, it was my attempt at removing all references wo Robo in all the code (including variable names).
     
    mark tomlinson likes this.
  19. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    In the root directory of the RoboLCD plugin setup.py has three references to Robo maintained versions of software and forces a reinstall when RoboLCD is installed.
    The plugin URL is bogus and is not used by Robo. Even though the source is listed as AGPLv3 in line 76 they do not abide by the license listed as they will not release source when asked.

    The actual location of the updated files is obfuscated in RoboLCD and not listed anywhere in that code, but it is in the Updater script. In updates\roboos_20.sh you find the location for the updated files. Since RoboLCD is RoboOS and RoboLCD is just source which is compiled by python on it's first run on the rPi inside the printer, you have the entire repository of the current code if you just pull the file directly to your PC. Since RoboOS 2.0 also included C2 gcode files that source location is also included.
     
    #19 WheresWaldo, Oct 22, 2018
    Last edited: Oct 22, 2018
    mark tomlinson likes this.
  20. CdRsKuLL

    CdRsKuLL Member

    Joined:
    Sep 27, 2018
    Messages:
    81
    Likes Received:
    35

Share This Page