That is correct. The defines are static values. They don’t change unless you recompile the firmware and upload it to the Taz. THAT is the problem. If you change your tool head, you have to push a different firmware too.
Here is the section:
//===========================================================================
//=============================Thermal Settings ============================
//===========================================================================
//
//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
//
//// Temperature sensor settings:
// -2 is thermocouple with MAX6675 (only for sensor 0)
// -1 is thermocouple with AD595
// 0 is not used
// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
// 3 is mendel-parts thermistor (4.7k pullup)
// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
// 10 is 100k RS thermistor 198-961 (4.7k pullup)
// 60 is 100k Maker's Tool Works Kapton Bed Thermister
//
// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
// (but gives greater accuracy and more stable PID)
// 51 is 100k thermistor - EPCOS (1k pullup)
// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
#define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 5
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_BED 7
Those 4 defines outline the 3 possible extruder temp sensors and the bed sensor.
That, however, is not the damaging data… this is:
#define PIDTEMP
#define BANG_MAX 220 // limits current to nozzle while in bang-bang mode; 255=full current
#define PID_MAX 225 // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#ifdef PIDTEMP
//#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 PID_FUNCTIONAL_RANGE 16 // If the temperature difference between the target temperature and the actual temperature
// is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
#define PID_INTEGRAL_DRIVE_MAX 220 //limit for the integral term
#define K1 0.96 //smoothing factor within the PID
#define PID_dT ((OVERSAMPLENR * 8.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
The BANG_MAX, PID_MAX and PID_INTEGRAL_DRIVE_MAX are what killed dutchhome’s heater.
For the Taz4 (budda):
#define PIDTEMP
#define BANG_MAX 70 // limits current to nozzle while in bang-bang mode; 255=full current
#define PID_MAX 74 // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#ifdef PIDTEMP
//#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 PID_FUNCTIONAL_RANGE 16 // If the temperature difference between the target temperature and the actual temperature
// is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
#define PID_INTEGRAL_DRIVE_MAX 70 //limit for the integral term
#define K1 0.96 //smoothing factor within the PID
#define PID_dT ((OVERSAMPLENR * 8.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
So as you can see the drive for the Budda should be in the 70’s. This limits the current supplied to the resistor in the hot end. For the Hex, its in the 250’s, more than 3x what the Budda can handle.
Note that these are #defines. That means they can not be changed by code.
#define is a useful C component that allows the programmer to give a name to a constant value before the program is compiled. Defined constants in arduino don’t take up any program memory space on the chip. The compiler will replace references to these constants with the defined value at compile time.
The only way to change them is to edit the source, recompile it and then upload it to the Taz. The advantage of this method is there is no memory usage for them. They consume no storage. It also, unfortunately, prevents any change in them through software.
That is what I was referring to as a code rewrite. The code would have to be rewritten to accept stored variables (ie from EPROM) instead of these hard coded values. That change would consume additional code memory, temporary (scratch) storage, as well as Eprom storage. It would involve coding the display functions to allow us to store and reacall them. I don’t know what’s left in any of them, I haven’t really dug into the resources remainig. It wouldn’t surprise me if AO chose the smallest (usually cheapest) possible ATMega chip that would do the job. That, likely, severely limits what can be done here.
Another downfall in Marlin is, the best I can figure, there is only one set of Kp Ki and Kd values stored for extruders. This means the same values are used for both extruders. The result of this is that both extruders would have to be the same class or type. So no mixing budda and hex on a dualie. You might get away with an E3D and Hex as they use similar heater cartridges and thermistors.