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

Anyone modified Marlin sw on a C2 to get a Heated Bed?

Discussion in 'Mods and Upgrades' started by Bogiewon, Dec 14, 2018.

  1. Bogiewon

    Bogiewon New Member

    Joined:
    Dec 6, 2017
    Messages:
    10
    Likes Received:
    0
    • Can someone post (or link) the source code files if you've done this already?
    • If not - Should the mainboard be redefined as RBV(R2) single extruder motherboard instead of RBV(C2) with the necessary size changes? How best to make this swap in boards.h? Any other changes?
    • I've assembled the rest of this project and now looking at the configuration.h, pins_ROBOMB.h, and boards.h files from GitHub as well as the OctoPrint settings/gcode updates and LCD control panel changes and found many places in the Marlin files where changes are or may be needed. I'm not sure I've identified or if I fully understand all the implications of making these changes as this is my first foray into Robo/Marlin territory with everything to learn including revisiting my C++ skills.
    • The "Connecting a heated bed" thread and others answered a lot of the hardware/build questions - thanks to all contributors! Care to post the results? This may include the files I need. I may tackle the internal MOSFET to external MOSFET interface issue once I get the basic mainboard configured, loaded and heating the bed using the onboard MOSFET with external 24Vdc 15A PS.
     
  2. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    I imagine if you downloaded the R2 firmware and redefined the print area size to match the C2 you would be fine.
    I still use a standard bed on mine so someone with a modified one can chime in, but if you post your configuration.h I can take a look and see if I notice anything odd. I imagine PINS.H (which is what tells the arduino how to control the board) would be the same for both C2/R2 version of Marlin, just that the C2 has the configuration altered to not use the bed.
     
  3. Bogiewon

    Bogiewon New Member

    Joined:
    Dec 6, 2017
    Messages:
    10
    Likes Received:
    0
    I'll proceed with this guidance and compare the requisite sections of configuration.h files, change the xyz bed sizes, select the appropriate thermistor (B=3950) associated with my bed, determine the Z probe offset differences and which bed leveling technique to use and upload my results for your review (appreciate this). Are the LCD displays the same? I can live with it saying it's an R2 as long there aren't any significant differences in function/capabilities. Does Octoprint need to be redefined to connect to an R2 now instead of a C2 or can I just change the startup and end codes to add the new heated bed M commands?
     
  4. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    The print area size will be quite different, but the steps/axis and other settings will be the same.
     
  5. Bogiewon

    Bogiewon New Member

    Joined:
    Dec 6, 2017
    Messages:
    10
    Likes Received:
    0
    This brings up a general configuration question regarding Marlin and the different "configuration.h" files on GitHub. Something I should have started asking about...There are many...I started working with the Marlin 1.1.6_RoboVersion_1.2.4_C2.hex as it was marked as the latest release and then downloaded the Marlin_for_R2/Marlin/Configuration.h version from "WheresWaldo Marlin release of 1.1.9 (#11) version 010109" which was a recommendation from a different thread as it had many improvements. I hope these are appropriate versions.

    I'm using the C2 version as a reference to gleen the relevant C2 values for input into the R2 version. From this comparison I found serval "performance tweaks" in the steepers jerk, and acceleration, probe speeds, PID values for extruder and bed, bed size, etc as well as changing the extruder type back to stock C2 values. I've annotated these areas and other relevant configuration changes in the R2 file and have almost finished my analysis. This should provide a new version tailored specifically to a stock C2 with a heated bed. I'll upload the annotated config.h file soon and you can see if I'm on track or not.
     
  6. Bogiewon

    Bogiewon New Member

    Joined:
    Dec 6, 2017
    Messages:
    10
    Likes Received:
    0
    Uploaded Excel file contains full R2 code shown in the right column and related C2 code shown on the left only where changes are needed in order to make the R2 code work properly on a C2. Explanations and some questions are in green.
     

    Attached Files:

  7. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    You simply cannot take a newer version of the Configuration.h file and "apply" it to an older version of the firmware. A lot has been done to Marlin in between and there are a lot of renamed variables. If you want ot use 1.1.9, there is a version specific to the C2 or use the entire repository from mine then just change the absolute minimum values like printer name and bed size.
     
  8. Bogiewon

    Bogiewon New Member

    Joined:
    Dec 6, 2017
    Messages:
    10
    Likes Received:
    0
    Sure appreciate these quick replies! AND from the author too!
    Sorry for the confusion, I think I'm explaining it poorly and documenting it worse.

    Let's see if this helps.

    I do plan on using your entire repository to build a new version. Any other modules needing attention? I'm using the C2 Configuration.h values as "reference only" as a way to understand the derivation/justification to change the respective values in your R2 Configuration.h. I've learned so much working with just this one file and don't yet understand how they all fit together. If the same variable name (#Define) is used differently between versions - this guidance may have issues, however the values appear to be used to perform the same function. But as they say - it depends…

    The Excel file shows the places I believe your R2 Configuration.h file may need values changed to make it operate as a C2. I've highlighted these in green font on the left.

    The minimum changes I found, besides the printer name (which sounds trivial, but not sure about the specifics on this, I only see CUSTOM_MACHINE_NAME and that's optional, where else is printer name defined and how is it used?) and bed size, are changes associated with redefining the extruder, bed thermistor, PID values, and perhaps some probe values, homing points, preheat temps, bed leveling etc as shown in the Excel file. You've made performance improvements too, are these applicable to the C2 environment as well? If this makes sense now, can you comment on the validity of these changes shown in the Excel file?
     
  9. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    The hardware of the C2 is almost exactly the same as the R2 just on a smaller frame. So all the settings should work as is. Really you should only have to change Custom Name and the bed size and everything should just work.
     
    mark tomlinson likes this.
  10. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    Maybe make sure the bed heater is enabled, but yea that was my thought exactly.
     
  11. Bogiewon

    Bogiewon New Member

    Joined:
    Dec 6, 2017
    Messages:
    10
    Likes Received:
    0
    Please bear with me one more time:

    Not sure how to reconcile such a broad sweeping comment given what I find in Waldo's R2 Configuration.h file.

    Specifically,
    • A new E3Dv6 extruder is being implemented which uses a different temperature sensor, PID K values, feedrate, probe x and y offsets then the one used in the C2.
    • Likewise a different heated bed needs a different temperature sensor and PID K values.
    • Boundaries for where probing can reach are also set different.
    Are you saying I should ignore all these differences? If so, I would like to increase my knowledge and know why, as I don't understand how this could then work properly on my C2.

    I would also like to understand where the Custom Name you both referred to is defined and how it is used as I only find an optionally defined CUSTOM_MACHINE_NAME. Is this something assigned during compile ?
     
  12. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Even the current Hexagon will work with the PID settings, you can set them afterwards. Pleaser note also that I am using a Titan extruder not the one that came with the R2/C2. Without knowing your heater choice there is no way to tell you how to change anything but again, it can be changed after the fact. It doesn't home at a specific place but one derived by mathematical calculation based on the bed size.

    You are thinking too much.

    If you want something that is closer to a real unmodified Robo printer, except version 1.1.9, then maybe use this version http://community.robo3d.com/index.p...rlin-1-1-9-ubl-extras-work-in-progress.22457/. My version was specifically made for my printer is modified in key areas where I thought Robo could have done better.
     
    #12 WheresWaldo, Dec 17, 2018
    Last edited: Dec 17, 2018
  13. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    The PID tuning is all fine-tuning. You can (and many have) run for a long time fine with never doing the PID tuning or using the incorrect values so ... that is what @WheresWaldo is saying. Not critical to fix up-front. There is very little that must be changed to get it minimally working and then you can go in a tune away.
     
  14. Bogiewon

    Bogiewon New Member

    Joined:
    Dec 6, 2017
    Messages:
    10
    Likes Received:
    0
    OK - I get the tuning and mentioned this in the file I sent as well as the specific temp sensor I'm using for the bed. I certainly understand how busy everyone is, especially this time of year, and apologize for my verbosness and realize this detailed analysis is not the best way to go about asking for help. Short and sweet is always best.

    There are 3 areas besides Bed Size and Name that needed attention and I have modified.
    1. The sensors for the extruder and bed are unique to this implementation.
    2. The "Points to probe for all 3-point Leveling procedures" (lines 1080-1085) are defined as absolute and are outside (180 and 170) the C2 bed dimensions (127 x 127).
    3. The Z Safe home definition appears to be incorrect (line 1138) for the Y point or it could be simplified to 0.
    Can I get an answer regarding the Custom Name question?
    Is it by chance the unique hostname of the image file which is set to the serial number/identification code name?​

    Moving on to the next step. Downloading Waldo's R2 repository for this version and backing up my existing 16GB C2 microSD card (using ApplePi-Baker) in prep for Arduino loading.

    Thanks for the link to the UBL thread, most interesting. Does your code get replaced on the next Robo auto-update.

    ...and Waldo is right :cool: - I'm over thinking it, trying to understand everything, not just copy/paste.

    thanks
     

    Attached Files:

  15. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    3 point leveling is generally not used, but just change the numbers, as long as any other leveling scheme is enabled Marlin firmware will use that one.. It really doesn't matter what you change the 3 points to.

    I wanted my printer to home in the rear left corner the SAFE_HOMING formula is correct for that outcome. If you want it back in the middle of the bed then change it back to Robo's defaults.

    If a line does not have a //[robo] at the end then Robo didn't bother to change it from the Marlin developer defaults. If it doesn't have a //[BH] at the end of it I didn't bother to change it from the Marlin or Robo defaults, simple as that.

    In general, disabling features does not require removing code. The Arduino compiler is perfectly capable of not including code that is not enabled into the resulting .hex file from compilation.

    Marlin uses Custom name to display a name of the printer on an LCD controller screen, it is not used for any other purpose, but I always change it to be more complete and so I know what printer the firmware is for, it is a holdover from modifying firmware for the R1, which had several hardware revisions identically named.

    Anytime you do an update from Robo's servers it does overwrite everything, but the good/bad news is that they seem to not care about updating very often. There hasn't been an update for quite a while, one piece of evidence is they are still using Marlin version 1.1.6, which is still very buggy and has been superseded by 1.1.9 by the Marlin developers quite some time ago.
     
  16. Bogiewon

    Bogiewon New Member

    Joined:
    Dec 6, 2017
    Messages:
    10
    Likes Received:
    0
    Thanks - I'm comfortable now going forward with putting the pieces together to starting testing.
    I've enabled the heated bed in Octoprint and got the LCD display to show heated bed menus (anything else here?).
     
  17. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    Sounds pretty much complete :)
     
  18. Bogiewon

    Bogiewon New Member

    Joined:
    Dec 6, 2017
    Messages:
    10
    Likes Received:
    0
    A quick check of pins_ROBOMB.h may have found a LED and fan difference between the C2 and R2 implementations. Comparing pins_ROBOMB.h to pins_ROBOC2.h from Waldo's same repository.

    C2 source R2 source
    #define LED_PIN 13 #define LED_PIN -1
    is pin 13 turning on the string of LED lights behind the C2 bezel? No comments in these fields.

    (no equivalent) #define CASE_LIGHT_PIN 5. // Override the default pin if needed
    would changing this R2 value from 5 to 13 leave the wiring as is in the C2?


    C2 source R2 source
    #define CONTROLLER_FAN_PIN 5 #define FAN1_PIN 6 //both have same comment, fan to cool controller
    would changing this R2 value from 6 to 5 leave the wiring as is in the C2?
     
  19. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    I have not tried tracing the LED array on the C2 to check which pin it lands on, but there is one that does get powered by the I/O board. You could experiment with simply removing it and see if the LED array goes dark.
     
  20. WheresWaldo

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

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

Share This Page