Close



Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1

    Max temp limit in marlin

    Hi Guys,

    I'm running a Mendlemax 2 /RAMBo with E3Dv6 /thermocouple successfully at 380C to print PEEK and PEEK composites as part of my research project. Originally in Configuration.h I set the max temp to 400 and all was well.
    #define HEATER_0_MAXTEMP 400

    now I'm looking at other materials that need a higher temperature.
    But when I want to go higher, I changed --
    #define HEATER_0_MAXTEMP 500 but the software still errors out at 400 when I heat up the hotend

    Is there another value in the temperatures pages that is overruling the config value? I can't find a clear table for the thermocouple like the thermistors table so I'm a bit stumped for ideas.

    Has anyone got a working solution they could share or advise?

    Rich

  2. #2
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,143
    Are you sure you rebuilt the firmware and got it uploaded successfully? What exactly is the error it sends?

  3. #3
    Yes it's rebuilt and uploaded, and is working until I hit 400C then -
    Setting hotend temperature to 270.000000 degrees Celsius.
    Setting hotend temperature to 290.000000 degrees Celsius.
    Setting hotend temperature to 310.000000 degrees Celsius.
    Setting hotend temperature to 330.000000 degrees Celsius.
    Setting hotend temperature to 350.000000 degrees Celsius.
    Setting hotend temperature to 370.000000 degrees Celsius.
    Setting hotend temperature to 390.000000 degrees Celsius.
    Setting hotend temperature to 398.000000 degrees Celsius.
    Error:0
    [ERROR] Error:0

    : Extruder switched off. MAXTEMP triggered !
    Error:Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)
    [ERROR] Error:Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)

    Setting hotend temperature to 0.000000 degrees Celsius.


    I'm using a K type thermocouple [ temp sensor -1 ] with success for printing at 380C with the MAX temp set at 400. But the new sketch has been changed to 500C, but still errors at 400C

    I can see lots of thermistor tables, but very little detail on the thermocouple definitions. Is the Thermocouple linked to a thermistor table?

    Sorry for the noob questions, but thanks for any help

    Rich

  4. #4
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,143
    It might be possible that the temperature is being checked multiple places. It would not surprise me if there are multiple sanity checks for this. But I searched the entire code base for 400 and didn't find anything. I also looked at all the places an AD595 is handled. I didn't see any limits at 400 C.

    First question: Are you sure the AD595 reports values bigger than 400 C. ? The reason is, if it doesn't, the temperature being reported will be stuck at 400 even though the software thinks it should be going up. It will eventually trigger the thermal runaway code. Also, a lot of the thermistor tables end at 400 C. I wonder if that is a coincidence.

    But checking the AD595 data sheet at: http://www.analog.com/media/en/techn.../AD594_595.pdf

    It says: The AD594/AD595 is available in two performance grades. TheC and the A versions have calibration accuracies of 1C and
    3C, respectively. Both are designed to be used from 0C to
    +50C, and are available in 14-pin, hermetically sealed, sidebrazed
    ceramic DIPs as well as low cost cerdip packages.

    That doesn't even sound like this part should be used by Marlin ???? I suggest you go to https://github.com/MarlinFirmware/Marlin/issues and ask for some help. There are a number of thermal experts over there and I bet they have seen this before.

  5. #5
    Senior Engineer
    Join Date
    Jun 2014
    Location
    Burnley, UK
    Posts
    1,664
    0 to 50 is the ambient temperature. With K type thermocouple it is good up to 480 IIRC.

  6. #6
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,143
    Quote Originally Posted by Mjolinor View Post
    0 to 50 is the ambient temperature. With K type thermocouple it is good up to 480 IIRC.
    Yeah... I think I found a bug in Marlin. This may be a work around:

    In Temperature.cpp change these lines:

    Code:
    static int minttemp_raw[EXTRUDERS] = ARRAY_BY_EXTRUDERS( HEATER_0_RAW_LO_TEMP , HEATER_1_RAW_LO_TEMP , HEATER_2_RAW_LO_TEMP, HEATER_3_RAW_LO_TEMP);
    static int maxttemp_raw[EXTRUDERS] = ARRAY_BY_EXTRUDERS( HEATER_0_RAW_HI_TEMP , HEATER_1_RAW_HI_TEMP , HEATER_2_RAW_HI_TEMP, HEATER_3_RAW_HI_TEMP);
    static int minttemp[EXTRUDERS] = { 0 };
    static int maxttemp[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(16383)
    to


    Code:
    static int minttemp_raw[EXTRUDERS] = ARRAY_BY_EXTRUDERS( HEATER_0_RAW_LO_TEMP , HEATER_1_RAW_LO_TEMP , HEATER_2_RAW_LO_TEMP, HEATER_3_RAW_LO_TEMP);
    static int maxttemp_raw[EXTRUDERS] = ARRAY_BY_EXTRUDERS( 32000 , 32000  , 32000 , 32000 );
    static int minttemp[EXTRUDERS] = { 0 };
    static int maxttemp[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(32000)
    I don't know that this will work... Be very careful with this modified code.
    Last edited by Roxy; 12-16-2015 at 09:08 AM.

  7. #7
    Senior Engineer
    Join Date
    Jun 2014
    Location
    Burnley, UK
    Posts
    1,664
    If all you need are higher temperatures but can put up with the display being wrong then a resistive potential divider direct on the thermocouple will allow that to happen. The disadvantage would be that it would read 300 at 400 and 400 at 500 etc but it would still be accurate enough if you allowed for the constant temperature error

  8. #8
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,143
    Quote Originally Posted by Mjolinor View Post
    If all you need are higher temperatures but can put up with the display being wrong then a resistive potential divider direct on the thermocouple will allow that to happen. The disadvantage would be that it would read 300 at 400 and 400 at 500 etc but it would still be accurate enough if you allowed for the constant temperature error
    That's an interesting idea... You probably would need to adjust the PID control numbers too because that algorithm would be getting incorrect error numbers. But that would not be too tough to do.

    Also... You want to avoid doing it, but you can turn off the Thermal Protection code if you need to. It is controlled by the

    #define THERMAL_PROTECTION_HOTENDS in the Configuration.h file.

    Also, another thing you can try is this. It may be you are having a hard time getting hotter and hotter. It may take more and more time to get a little bit hotter.
    You can change these numbers in Configuration_adv.h:

    #if ENABLED(THERMAL_PROTECTION_HOTENDS)
    #define THERMAL_PROTECTION_PERIOD 60 // Seconds
    #define THERMAL_PROTECTION_HYSTERESIS 1 // Degrees Celsius
    #endif

    And I just got reprimanded over in this thread: https://github.com/MarlinFirmware/Marlin/issues/2857 There is also a

    #define WATCH_TEMP_PERIOD 16 // Seconds
    #define WATCH_TEMP_INCREASE 4 // Degrees Celsius

    On the heating up side, probably WATCH is more important.
    Last edited by Roxy; 12-16-2015 at 09:52 AM.

  9. #9
    Hi Roxy,

    Thanks for the quick response, really appreciate the help.

    I tried with your modified code in temperature.c but I get an error pointing array extruders1 when compiling. I did remove the reference to Heater 3 as my original only had heaters 0,1,2 and ended up with the code below

    I can't attached the INO file as it's an invalid file for the forum, and I'll try to avoid copy/pasta the whole text file.

    static int minttemp_raw[EXTRUDERS] = ARRAY_BY_EXTRUDERS( HEATER_0_RAW_LO_TEMP , HEATER_1_RAW_LO_TEMP , HEATER_2_RAW_LO_TEMP );
    static int maxttemp_raw[EXTRUDERS] = ARRAY_BY_EXTRUDERS( 32000 , 32000 , 32000 );
    static int minttemp[EXTRUDERS] = ARRAY_BY_EXTRUDERS( 0 , 0 , 0 );
    static int maxttemp[EXTRUDERS] = ARRAY_BY_EXTRUDERS( 32000, 32000, 32000 );

    I just tried the code above, but again at 400C it triggered max temp error. I didn't get chance to try with the thermal protection disabled, and heating up to ~395 is pretty quick


    Mjolinor, interesting idea. I'll have to investigate.

  10. #10
    Staff Engineer printbus's Avatar
    Join Date
    May 2014
    Location
    Highlands Ranch, Colorado USA
    Posts
    1,414
    Add printbus on Thingiverse
    For completeness, when you start talking about errors on temperatures measured by Marlin and RAMPS with a thermocouple, there's another substantial error component to consider. I ran into this compiling the data for thread Comparison of Type 1 thermistor and E3D thermocouple temperature measurements

    That testing used a thermocouple adapter board from E3D that is based on the AD597, a less precise version of the AD595. These and similar amplifiers all output a voltage that changes linearly with temperature. The thermistor and thermocouple measurements all leverage the analog-to-digital (ADC) converter in the processor. Marlin (or perhaps the underlying Arduino libraries) confugures the AVR processor to use the board VCC, nominally 5V, as the analog voltage reference to be considered as "full scale" by the ADC. In converting the ADC sample value to a temperature, Marlin firmware (at least as of the becdac fork in late 2014) assumes an exact 5.0V as the supply voltage. But regulator output voltages aren't all that precise, possibly leading to errors in the voltage being measured by the ADC. For thermistors, it turns out this doesn't cause an error since the VCC being applied to the ADC reference input is also being applied to the resistor divider containing the thermistor. If VCC is high, the ADC reference input will be high but the voltage coming from the resistive divider will also be high by the same percentage. So, no error from the VCC being off from 5V for the normal thermistor approach.

    Thermocouple amplifiers like the AD595 are designed to output a voltage linear with temperature, and are designed for that output voltage to remain fairly stable regardless of the supply voltage, as they should. But this creates an error source between what the thermocouple amplifier is outputting and how RAMPS/Marlin measures it. For a given temperature and thermocouple amplifier output voltage, Marlin will result in a temperature result that changes as the electronics VCC (and the ADC reference input) changes. Options around this include hacking the electronics to provide your own VCC source set exactly to 5.00V like the Marlin conversions assume, or measuring your VCC and modifying the Marlin temperature calculation algorithm to reflect your actual voltage. The latter has another issue, however, in that the electronics VCC might vary over temperature or with different loading. If so, this could result in a varying amount of temperature measurement error.

    None of this explains why Marlin is hitting MAXTEMP in this case, but I thought I'd point out this error source.
    Last edited by printbus; 12-29-2015 at 06:09 PM. Reason: corrected details in using VCC as ADC reference

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •