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

Problem with Permanent PID Settings

Discussion in 'Troubleshooting' started by adikted2astro, Sep 4, 2017.

  1. adikted2astro

    adikted2astro Active Member

    Joined:
    Aug 10, 2017
    Messages:
    290
    Likes Received:
    112
    So I've been having this problem for a while, but I haven't addressed it yet because I was concerned about a far worse problem involving my z-axis lead screw. I was able to perform a PID autotune and received new values for the printer. I went into Octoprint and brought up the EEPROM Marlin Editor Plugin and changed the values. I thought this would be a permanent solution to my temperature fluctuations but I was wrong. I have to input and load the values in Octoprint every single time I print something. Or, I can go into the EEPROM on the machine itself. Does anyone know how to permanently change these values? Without them I have some significant temperature variations (+- 5.00 C).

    Thanks in advance for any help you can provide.
     
  2. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Depending on how Robo configured the firmware you have two options. Assuming EEPROM is enabled.

    Option 1 (easier to do and reversible):
    1. Perform the AutoPID procedure and collect your three PID parameters
    2. Use the EEPROM setting page in OctoPrint or add the settings with g-code M301 (http://reprap.org/wiki/G-code#M301:_Set_PID_parameters)
    3. Make sure you store those settings in EEPROM permanently using M500 to store the values

    Option 2 (editing firmware):
    1. Perform the AutoPID procedure and write down you PID parameters
    2. Using the Arduino IDE edit Configuration.h and change the current PID parameters with the one you got from AutoPID
    3. Disconnect the Raspberry Pi from the Rono Controller board and connect your PC directly to the USB port
    4. Compile and upload the new values to the RAMPS board
    5. Reconnect your Raspberry Pi and reboot your printer.
    Obviously these instructions are as simplified as possible. There may be other steps you want to perform (i.e. downloading current firmware source or installing current Arduino IDE, etc.) but this will get you the general idea.
     
  3. adikted2astro

    adikted2astro Active Member

    Joined:
    Aug 10, 2017
    Messages:
    290
    Likes Received:
    112
    Thank you for the information. I will try option one first. I did not know about using M500 to store permanent settings.
     
  4. Kilrah

    Kilrah Well-Known Member

    Joined:
    Apr 18, 2017
    Messages:
    498
    Likes Received:
    332
    The settings done on the editor on the LCD interface should stick (as long as you actually click "apply" after changing something...)

    But just the fact you get such variation with stock suggests something's awry on the hardware side. Bad connection, loose thermistor...
     
  5. adikted2astro

    adikted2astro Active Member

    Joined:
    Aug 10, 2017
    Messages:
    290
    Likes Received:
    112
    No, nothing's wrong. It's just a bad stock PID setting. The stock PID settings were P = 37.93, I = 3.33, D = 108.12. My current settings after PID Autotune are P = 19.43, I = 1.18, D = 80.20. That's quite a difference in my opinion. After applying these values, the variation on my extruder temp never goes above (or below) 0.2 C from nominal.

    I have also pressed "Apply" a few dozen times on the touch screen. I've also pressed the "Load to EEPROM" and "Save" buttons in octoprint at least as many times. Never seems to stick print-to-print. As long as it doesn't revert back to old settings in the middle of a print, then I'm happy. It's just irritating to have to do it every time.
     
  6. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    You can edit this in the firmware, but ... if you later update the firmware from RoboOS you will need to go back and do it again
     
  7. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Looking at the source code for this plugin (https://github.com/amsbr/OctoPrint-...rint_eeprom_marlin/static/js/eeprom_marlin.js) you will see that there was a bug fixed 15 days ago that corrected the location of some of the data. Not sure and don't have time to check if this was the direct cause of the issue.

    Of course I am pointing you to the original code by the original author, not the code appropriated by Robo and added to RoboOS.
     
  8. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    The only problem is that once you go there you need to never update RoboOS :)
     
  9. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Or update it in pieces.

    Sent from my SAMSUNG-SM-N910A using Tapatalk
     
  10. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    Just want to make clear that doing this means you need to do things differently going forward :)
    If you think all you need is the one change you will get surprised.

    Divorcing yourself from the RoboOS path has advantages, but is a more advanced way to go.
     
  11. Kilrah

    Kilrah Well-Known Member

    Joined:
    Apr 18, 2017
    Messages:
    498
    Likes Received:
    332
    What firmware are you running? Current one has 32.8, 1.7, 85. Going back in the commits I never see the values you have used in previous versions.
     

Share This Page