I have a Prusa PCB heat bed on my Mendel being controlled by Techzone Gen 3 remix electronics using a modified firmware based Reprap host 20100719 with the addition of codes from Techzone to use their thermocouple AD card for the extruder. I've noticed that I can never reach 100 C if I set the bed temperature to 100. The only way that I can get past 100 is by setting the bed temperature to 140 C and above. Looking at the firmware, I noticed that it uses the same PID values for the extruder and for the bed. I think that this is the problem. I'm sure that the bed needs different PID values. So, I editted the code to use different values as follows:
PIDcontrol:IDcontrol(byte hp, byte tp, bool b)
{
heat_pin = hp;
temp_pin = tp;
if (b) {
pGain = BTEMP_PID_PGAIN;
iGain = BTEMP_PID_IGAIN;
dGain = BTEMP_PID_DGAIN;
} else {
pGain = TEMP_PID_PGAIN;
iGain = TEMP_PID_IGAIN;
dGain = TEMP_PID_DGAIN;
}
temp_iState = 0;
temp_dState = 0;
if (b) {
temp_iState_min = -BTEMP_PID_INTEGRAL_DRIVE_MAX/iGain;
temp_iState_max = BTEMP_PID_INTEGRAL_DRIVE_MAX/iGain;
} else {
temp_iState_min = -TEMP_PID_INTEGRAL_DRIVE_MAX/iGain;
temp_iState_max = TEMP_PID_INTEGRAL_DRIVE_MAX/iGain;
}
iState = 0;
dState = 0;
previousTime = millis()/MILLI_CORRECTION;
output = 0;
currentTemperature = 0;
bedTable = b;
pinMode(heat_pin, OUTPUT);
pinMode(temp_pin, INPUT);
}
And then added the new parameters in extruder.h.
The big question: Has anyone else figured out what PID values to use for the heated bed? I'm sure it will be different based on a number of factors like the bed heat capacity, heater power, etc. But I think yours would be a better starting value than the tip.
Edited 1 time(s). Last edit at 03/16/2011 07:12PM by brnrd.