// 1 = Single pin control - LOW when off, HIGH when on, PWM to adjust intensity
// 1 = Single pin control - LOW when off, HIGH when on, PWM to adjust intensity
// 2 = Two pin control - A firing pin for which LOW = off, HIGH = on, and a seperate intensity pin which carries a constant PWM signal and adjusts duty cycle to control intensity
// 2 = Two pin control - A firing pin for which LOW = off, HIGH = on, and a seperate intensity pin which carries a constant PWM signal and adjusts duty cycle to control intensity
#define LASER_CONTROL 1
#define LASER_CONTROL 2
// The following define to use the new HakanBasted laser_pulse method to fire laser. It should be more efficient, but it's less tested.
// The following define to use the new HakanBasted laser_pulse method to fire laser. It should be more efficient, but it's less tested.
// Thanks for it to HakanBastedt that has implemented it for Marlin at https://github.com/HakanBastedt/Marlin
// Thanks for it to HakanBastedt that has implemented it for Marlin at https://github.com/HakanBastedt/Marlin
#define TEMP_SENSOR_CHAMBER 0 // NOT USED FOR NOW!!!
#define TEMP_SENSOR_CHAMBER 0 // NOT USED FOR NOW!!!
#define TEMP_SENSOR_COOLER 0
#define TEMP_SENSOR_COOLER 40
//These 2 defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
//These 2 defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
...
@@ -358,10 +358,10 @@
...
@@ -358,10 +358,10 @@
// If your configuration is significantly different than this and you don't understand the issues involved, you probably
// If your configuration is significantly different than this and you don't understand the issues involved, you probably
// shouldn't use cooler PID until someone else verifies your hardware works.
// shouldn't use cooler PID until someone else verifies your hardware works.
// If this is enabled, find your own PID constants below.
// If this is enabled, find your own PID constants below.
//#define PIDTEMPCOOLER
#define PIDTEMPCOOLER
// Enable fast PWM for cooler
// Enable fast PWM for cooler
//#define FAST_PWM_COOLER
#define FAST_PWM_COOLER
//#define COOLER_LIMIT_SWITCHING
//#define COOLER_LIMIT_SWITCHING
#define COOLER_HYSTERESIS 2 //only disable heating if T<target-COOLER_HYSTERESIS and enable heating if T<target+COOLER_HYSTERESIS (works only if COOLER_LIMIT_SWITCHING is enabled)
#define COOLER_HYSTERESIS 2 //only disable heating if T<target-COOLER_HYSTERESIS and enable heating if T<target+COOLER_HYSTERESIS (works only if COOLER_LIMIT_SWITCHING is enabled)
...
@@ -371,14 +371,14 @@
...
@@ -371,14 +371,14 @@
// all forms of cooler control obey this (PID, bang-bang, bang-bang with hysteresis)
// all forms of cooler control obey this (PID, bang-bang, bang-bang with hysteresis)
// setting this to anything other than 255 enables a form of PWM to the cooler,
// setting this to anything other than 255 enables a form of PWM to the cooler,
// so you shouldn't use it unless you are OK with PWM on your cooler. (see the comment on enabling PIDTEMPCOOLER)
// so you shouldn't use it unless you are OK with PWM on your cooler. (see the comment on enabling PIDTEMPCOOLER)
#define MAX_COOLER_POWER 255 // limits duty cycle to cooler; 255=full current
#define MAX_COOLER_POWER 200 // limits duty cycle to cooler; 255=full current
#define PID_COOLER_INTEGRAL_DRIVE_MAX MAX_COOLER_POWER // limit for the integral term
#define PID_COOLER_INTEGRAL_DRIVE_MAX MAX_COOLER_POWER // limit for the integral term
// 120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
// 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)
// from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
#define DEFAULT_coolerKp 10.00
#define DEFAULT_coolerKp 40.00
#define DEFAULT_coolerKi .023
#define DEFAULT_coolerKi .3
#define DEFAULT_coolerKd 305.4
#define DEFAULT_coolerKd 50.4
// FIND YOUR OWN: "M303 E-3 C8 S90" to run autotune on the cooler at 90 degreesC for 8 cycles.
// FIND YOUR OWN: "M303 E-3 C8 S90" to run autotune on the cooler at 90 degreesC for 8 cycles.