Welcome! Log In Create A New Profile

Advanced

Marlin 1.1.8 and Heater failures.

Posted by dlc60 
Marlin 1.1.8 and Heater failures.
January 31, 2019 02:11PM
I have a weird problem. I have moved my printer from an ancient Marlin that didn't support the Full Graphic Smart Controller to Marlin 1.1.8.
I have everything set up as it was in the old version, and it all works except for an odd heater issue.
I have left my bed heater as "bang bang" because it is so massive that it takes quite a while to come up to temp.
I tried to use PWM, but that really took a long time, I'll need to PID tune that, but anyway, Marlin defaults to bang-bang for the bed, so I left it there.
What I see happening is that the bed heats up to temp, then the hot end heats up to temp, then and the firmware throws a "heater failure" screen and turns it all off. I have it on Octoprint so I have a graph of what happens.


Does anyone have a clue what is going on here? I sure don't. Here is my current configuration_adv.c for this setup.
I do not have PIDTEMPBED enabled. I do have BED_LIMIT_SWITCHING enabled.

I would love to hear ideas...

//===========================================================================
//=============================Thermal Settings  ============================
//===========================================================================

#if DISABLED(PIDTEMPBED)
  #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
  #if ENABLED(BED_LIMIT_SWITCHING)
    #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
  #endif
#endif

/**
 * Thermal Protection provides additional protection to your printer from damage
 * and fire. Marlin always includes safe min and max temperature ranges which
 * protect against a broken or disconnected thermistor wire.
 *
 * The issue: If a thermistor falls out, it will report the much lower
 * temperature of the air in the room, and the the firmware will keep
 * the heater on.
 *
 * The solution: Once the temperature reaches the target, start observing.
 * If the temperature stays too far below the target (hysteresis) for too
 * long (period), the firmware will halt the machine as a safety precaution.
 *
 * If you get false positives for "Thermal Runaway", increase
 * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
 */
#if ENABLED(THERMAL_PROTECTION_HOTENDS)
  #define THERMAL_PROTECTION_PERIOD 40        // Seconds
  #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius

  /**
   * Whenever an M104, M109, or M303 increases the target temperature, the
   * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
   * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
   * requires a hard reset. This test restarts with any M104/M109/M303, but only
   * if the current temperature is far enough below the target for a reliable
   * test.
   *
   * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
   * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
   * below 2.
   */
  #define WATCH_TEMP_PERIOD 20                // Seconds
  #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
#endif

/**
 * Thermal Protection parameters for the bed are just as above for hotends.
 */
#if ENABLED(THERMAL_PROTECTION_BED)
  #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
  #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius

  /**
   * As described above, except for the bed (M140/M190/M303).
   */
  #define WATCH_BED_TEMP_PERIOD 180                // Seconds
  #define WATCH_BED_TEMP_INCREASE 1               // Degrees Celsius
#endif

#if ENABLED(PIDTEMP)
  // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
  // if Kc is chosen well, the additional required power due to increased melting should be compensated.
  //#define PID_EXTRUSION_SCALING
  #if ENABLED(PID_EXTRUSION_SCALING)
    #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
    #define LPQ_MAX_LEN 50
  #endif
#endif

/**
 * Automatic Temperature:
 * The hotend target temperature is calculated by all the buffered lines of gcode.
 * The maximum buffered steps/sec of the extruder motor is called "se".
 * Start autotemp mode with M109 S B F
 * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
 * mintemp and maxtemp. Turn this off by executing M109 without F*
 * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
 * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
 */
#define AUTOTEMP
#if ENABLED(AUTOTEMP)
  #define AUTOTEMP_OLDWEIGHT 0.98
#endif


thanks,
DLC


Kits: He3D K200 Kossel, Folgertech Kossel 2020 upgraded E3Dv6, Anet A8 upgraded E3Dv6, Tevo Tarantula enhanced parts and dual-head
Scratch: Large bed Cartesian, Linear slide Delta, Maker-Beam XL Micro Delta
Re: Marlin 1.1.8 and Heater failures.
January 31, 2019 02:36PM
You might also want to show your Configuration.h file


Electronics Technician / Computer Programmer
Re: Marlin 1.1.8 and Heater failures.
January 31, 2019 08:20PM
Quote
Roberts_Clif
You might also want to show your Configuration.h file
Not much of anything to show from configuration.h for the heater values, but here they are:
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_3 0
#define TEMP_SENSOR_4 0
#define TEMP_SENSOR_BED 1

// Dummy thermistor constant temperature readings, for use with 998 and 999
#define DUMMY_THERMISTOR_998_VALUE 25
#define DUMMY_THERMISTOR_999_VALUE 100

// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings
// from the two sensors differ too much the print will be aborted.
//#define TEMP_SENSOR_1_AS_REDUNDANT
#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10

// Extruder temperature must be close to target for this long before M109 returns success
#define TEMP_RESIDENCY_TIME 10  // (seconds)
#define TEMP_HYSTERESIS 3       // (degC) range of +/- temperatures considered "close" to the target one
#define TEMP_WINDOW     1       // (degC) Window around target to start the residency timer x degC early.

// Bed temperature must be close to target for this long before M190 returns success
#define TEMP_BED_RESIDENCY_TIME 10  // (seconds)
#define TEMP_BED_HYSTERESIS 3       // (degC) range of +/- temperatures considered "close" to the target one
#define TEMP_BED_WINDOW     1       // (degC) Window around target to start the residency timer x degC early.

// The minimal temperature defines the temperature below which the heater will not be enabled It is used
// to check that the wiring to the thermistor is not broken.
// Otherwise this would lead to the heater being powered on all the time.
#define HEATER_0_MINTEMP 5
#define HEATER_1_MINTEMP 5
#define HEATER_2_MINTEMP 5
#define HEATER_3_MINTEMP 5
#define HEATER_4_MINTEMP 5
#define BED_MINTEMP 5

// When temperature exceeds max temp, your heater will be switched off.
// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
// You should use MINTEMP for thermistor short/failure protection.
#define HEATER_0_MAXTEMP 275
#define HEATER_1_MAXTEMP 275
#define HEATER_2_MAXTEMP 275
#define HEATER_3_MAXTEMP 275
#define HEATER_4_MAXTEMP 275
#define BED_MAXTEMP 150

//===========================================================================
//============================= PID Settings ================================
//===========================================================================
// PID Tuning Guide here: [reprap.org]

// Comment the following line to disable PID and enable bang-bang.
#define PIDTEMP
#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95      // Smoothing factor within the PID
#if ENABLED(PIDTEMP)
  //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
  //#define PID_DEBUG // Sends debug data to the serial port.
  //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
  //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
  //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
                                  // Set/get with gcode: M301 E[extruder number, 0-2]
  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.

  // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it

  // Ultimaker
  #define  DEFAULT_Kp 22.2
  #define  DEFAULT_Ki 1.08
  #define  DEFAULT_Kd 114

  // MakerGear
  //#define  DEFAULT_Kp 7.0
  //#define  DEFAULT_Ki 0.1
  //#define  DEFAULT_Kd 12

  // Mendel Parts V9 on 12V
  //#define  DEFAULT_Kp 63.0
  //#define  DEFAULT_Ki 2.25
  //#define  DEFAULT_Kd 440

#endif // PIDTEMP

//===========================================================================
//============================= PID > Bed Temperature Control ===============
//===========================================================================
// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
//
// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
// If your configuration is significantly different than this and you don't understand the issues involved, you probably
// shouldn't use bed PID until someone else verifies your hardware works.
// If this is enabled, find your own PID constants below.
//#define PIDTEMPBED

#define BED_LIMIT_SWITCHING

// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
// so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current

#if ENABLED(PIDTEMPBED)

  //#define PID_BED_DEBUG // Sends debug data to the serial port.

  //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
  //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
  #define  DEFAULT_bedKp 10.00
  #define  DEFAULT_bedKi .023
  #define  DEFAULT_bedKd 305.4

  //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
  //from pidautotune
  //#define  DEFAULT_bedKp 97.1
  //#define  DEFAULT_bedKi 1.41
  //#define  DEFAULT_bedKd 1675.16

  // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED

// @section extruder

// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
// It also enables the M302 command to set the minimum extrusion temperature
// or to allow moving the extruder regardless of the hotend temperature.
// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170

// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
// Note that for Bowden Extruders a too-small value here may prevent loading.
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200

//===========================================================================
//======================== Thermal Runaway Protection =======================
//===========================================================================

/**
 * Thermal Protection provides additional protection to your printer from damage
 * and fire. Marlin always includes safe min and max temperature ranges which
 * protect against a broken or disconnected thermistor wire.
 *
 * The issue: If a thermistor falls out, it will report the much lower
 * temperature of the air in the room, and the the firmware will keep
 * the heater on.
 *
 * If you get "Thermal Runaway" or "Heating failed" errors the
 * details can be tuned in Configuration_adv.h
 */

#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
#define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed

again thanks,
DLC


Kits: He3D K200 Kossel, Folgertech Kossel 2020 upgraded E3Dv6, Anet A8 upgraded E3Dv6, Tevo Tarantula enhanced parts and dual-head
Scratch: Large bed Cartesian, Linear slide Delta, Maker-Beam XL Micro Delta
Re: Marlin 1.1.8 and Heater failures.
January 31, 2019 09:22PM
I would not use Bed Limit Switching unless your Bed will work with a form a PWM

//#define BED_LIMIT_SWITCHING


* As described above, except for the bed (M140/M190/M303).
WATCH_TEMP_INCREASE should not be set below 2
#define WATCH_BED_TEMP_INCREASE 1 // Degrees Celsius

Edited 1 time(s). Last edit at 01/31/2019 09:25PM by Roberts_Clif.


Electronics Technician / Computer Programmer
Re: Marlin 1.1.8 and Heater failures.
January 31, 2019 11:56PM
Quote
Roberts_Clif
I would not use Bed Limit Switching unless your Bed will work with a form a PWM

//#define BED_LIMIT_SWITCHING


* As described above, except for the bed (M140/M190/M303).
WATCH_TEMP_INCREASE should not be set below 2
#define WATCH_BED_TEMP_INCREASE 1 // Degrees Celsius

I think so. Many of these features don't have a bunch of explanation wrapped around them...
Anyway, I did a PID tune on the hot end and the bed. When doing the bed, I got an instant failure and kill().
Doing a Google search I discovered that there was a bug in the 1.1.8 firmware that when using PID, if you have the WATCH_BED_TEMP_PERIOD set higher than 127 (not uncommon I guess) than it set that macro to 0. Insta-fail. In more than one way apparently. After I corrected that, and set up to PID the bed, and did the PID tune on the bed, things are much happier now! Thanks for everyone's suggestions, they gently prodded me to the correct place I had to find!

Thanks,
DLC


Kits: He3D K200 Kossel, Folgertech Kossel 2020 upgraded E3Dv6, Anet A8 upgraded E3Dv6, Tevo Tarantula enhanced parts and dual-head
Scratch: Large bed Cartesian, Linear slide Delta, Maker-Beam XL Micro Delta
Re: Marlin 1.1.8 and Heater failures.
February 01, 2019 01:47AM
There is a Marlin dedicated thread !
BTW, the explanation and answer are in the configuration file you posted !

Edited 2 time(s). Last edit at 02/01/2019 01:58AM by MKSA.


"A comical prototype doesn't mean a dumb idea is possible" (Thunderf00t)
Re: Marlin 1.1.8 and Heater failures.
February 01, 2019 10:22AM
Spoke too soon. The problem has been reduced, but not eliminated. I continue to search for the answer that will give me reliable heaters in Marlin 1.1.8.
I can always revert to the older 1.x firmware and live without the front panel display if I get too frustrated with it.
I will post when I find the final solution.

thanks,
DLC


Kits: He3D K200 Kossel, Folgertech Kossel 2020 upgraded E3Dv6, Anet A8 upgraded E3Dv6, Tevo Tarantula enhanced parts and dual-head
Scratch: Large bed Cartesian, Linear slide Delta, Maker-Beam XL Micro Delta
Re: Marlin 1.1.8 and Heater failures.
February 05, 2019 05:02AM
I had a similar if not the same issue with an old marlin 1.0 installation that I upgraded to 1.1.9. Bed PID would heat up to the set temperature and when the hotend kicked in, the heater for the bed turned off and got a failure.

I asked about this in the marlin github issue tracker. The solution is to reset the eeprom:
Use M502 (reset firmware to factory default) followed by M500 (store eeprom). This fixed the bed pid for me!

Before you do this, make sure you dump the settings to the console using M503 and copy it to a file so you can easily put these settings back.


--
Kind regards
Imqqmi

NFAN CoreXY printer:
[reprap.org]
Re: Marlin 1.1.8 and Heater failures.
February 05, 2019 04:08PM
Quote
imqqmi
I had a similar if not the same issue with an old marlin 1.0 installation that I upgraded to 1.1.9. Bed PID would heat up to the set temperature and when the hotend kicked in, the heater for the bed turned off and got a failure.

I asked about this in the marlin github issue tracker. The solution is to reset the eeprom:
Use M502 (reset firmware to factory default) followed by M500 (store eeprom). This fixed the bed pid for me!

Before you do this, make sure you dump the settings to the console using M503 and copy it to a file so you can easily put these settings back.
I think that I read the same thread. My solution was very similar. Cursed EEPROM! smiling smiley

Thanks,
DLC
Re: Marlin 1.1.8 and Heater failures.
February 06, 2019 07:41AM
Good to hear it's resolved! Yeah it should've been documented somewhere where you'd expect it.


--
Kind regards
Imqqmi

NFAN CoreXY printer:
[reprap.org]
Re: Marlin 1.1.8 and Heater failures.
February 07, 2019 07:58AM
With Marlin it is always a good Idea if you add or remove a feature to reset EEPROM - save-places seem to change when different features are enabled.
If you change Version it is absolutely neccesary to always reset EEPROM.
Re: Marlin 1.1.8 and Heater failures.
February 07, 2019 11:35PM
Quote
Dancer
With Marlin it is always a good Idea if you add or remove a feature to reset EEPROM - save-places seem to change when different features are enabled.
If you change Version it is absolutely neccesary to always reset EEPROM.

That is a really good point. I have never used the EEPROM specifically. That doesn't mean that nothing is in there...

DLC
Re: Marlin 1.1.8 and Heater failures.
February 08, 2019 07:55AM
There is defenitly something in EEPROM if you did not initalize.

With MEGA2560 I know that EEPROM contains "FF" when fresh - so usually maximum (depending on data type)
Re: Marlin 1.1.8 and Heater failures.
February 11, 2019 04:40PM
Quote
Dancer
There is defenitly something in EEPROM if you did not initalize.

With MEGA2560 I know that EEPROM contains "FF" when fresh - so usually maximum (depending on data type)

Well, the problem appears to be resolved. No more heater failures.
I am not happy with the PID tune on the hot end though, it is REALLY slow to heat up, about 1 degree C per second, which is way slower than my others PID tuned to. I wonder what is with that? I'll do another one and see if there was just a glitch in this one.

Thanks,
DLC


Kits: He3D K200 Kossel, Folgertech Kossel 2020 upgraded E3Dv6, Anet A8 upgraded E3Dv6, Tevo Tarantula enhanced parts and dual-head
Scratch: Large bed Cartesian, Linear slide Delta, Maker-Beam XL Micro Delta
Re: Marlin 1.1.8 and Heater failures.
February 11, 2019 04:57PM
Yeah it should heat quicker than that. Is the hot end heater led turned on or blinking when it's more than 10 degrees from the set point? If it's blinking, it's not using the full power of the power supply to heat up to within 10 degrees of the set point.

Did you save the pid settings after autotuning?


--
Kind regards
Imqqmi

NFAN CoreXY printer:
[reprap.org]
Re: Marlin 1.1.8 and Heater failures.
February 11, 2019 06:04PM
Quote
imqqmi
Yeah it should heat quicker than that. Is the hot end heater led turned on or blinking when it's more than 10 degrees from the set point? If it's blinking, it's not using the full power of the power supply to heat up to within 10 degrees of the set point.

Did you save the pid settings after autotuning?

I coded them into the configuration.h file.
But, after what I have been reading lately, that might not be what got pulled from the EEPROM after boot up. I should erase the EEPROM and store the defaults there to make sure that is what get pulled in.

DLC


Kits: He3D K200 Kossel, Folgertech Kossel 2020 upgraded E3Dv6, Anet A8 upgraded E3Dv6, Tevo Tarantula enhanced parts and dual-head
Scratch: Large bed Cartesian, Linear slide Delta, Maker-Beam XL Micro Delta
Re: Marlin 1.1.8 and Heater failures.
February 12, 2019 08:41AM
That's correct. If the eeprom is enabled, the configuration.h settings that are also stored in the eeprom are ignored until you reset the eeprom.


--
Kind regards
Imqqmi

NFAN CoreXY printer:
[reprap.org]
Sorry, only registered users may post in this forum.

Click here to login