From 42423d53fa83f3aacaf157045ac8e4390831c799 Mon Sep 17 00:00:00 2001 From: jeanmarc Date: Sat, 2 Jun 2012 21:28:49 +0100 Subject: [PATCH] need to test FULL_PID_BAND --- Marlin/Configuration.h | 5 +++-- Marlin/pins.h | 4 ++-- Marlin/temperature.cpp | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index edd6947ab2..67091c7172 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -8,7 +8,7 @@ //User specified version info of THIS file to display in [Pronterface, etc] terminal window during startup. //Implementation of an idea by Prof Braino to inform user that any changes made //to THIS file by the user have been successfully uploaded into firmware. -#define STRING_VERSION_CONFIG_H "2012-04-12-2" //Personal revision number for changes to THIS file. +#define STRING_VERSION_CONFIG_H "2012-05-22-1" //Personal revision number for changes to THIS file. #define STRING_CONFIG_H_AUTHOR "eMAKER" //Who made the changes. // This determines the communication speed of the printer @@ -84,10 +84,11 @@ // Comment the following line to disable PID and enable bang-bang. #define PIDTEMP #define PID_MAX 255 // limits current to nozzle; 255=full current +#define FULL_PID_BAND 150 // Full power is applied when pid_error[e] > FULL_PID_BAND #ifdef PIDTEMP //#define PID_DEBUG // Sends debug data to the serial port. //#define PID_OPENLOOP 1 // Puts PID in open loop. M104 sets the output power in % - #define PID_INTEGRAL_DRIVE_MAX 130 //limit for the integral term + #define PID_INTEGRAL_DRIVE_MAX 100 //limit for the integral term #define K1 0.95 //smoothing factor withing the PID #define PID_dT 0.122 //sampling period of the PID diff --git a/Marlin/pins.h b/Marlin/pins.h index c98a233781..2d7b1fbf70 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -587,8 +587,8 @@ #define PROBE_PIN -1 //29 on Melzi1284p A2, 11 on SL1.3a -#define LED_PIN -1//27 //27 on Melzi1284p -#define FAN_PIN -1 //4 on Melzi1284p +#define LED_PIN 27//27 //27 on Melzi1284p +#define FAN_PIN 4 //4 on Melzi1284p #define PS_ON_PIN -1 #define KILL_PIN -1 diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index fae9272374..84b551e008 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -275,11 +275,11 @@ void manage_heater() #ifndef PID_OPENLOOP pid_error[e] = pid_setpoint[e] - pid_input; - if(pid_error[e] > 10) { + if(pid_error[e] > FULL_PID_BAND) { pid_output = PID_MAX; pid_reset[e] = true; } - else if(pid_error[e] < -10) { + else if(pid_error[e] < -FULL_PID_BAND) { pid_output = 0; pid_reset[e] = true; }