I need to slowly heat a custom tool so I’ve been staggering heat commands at specific levels with dwell in between because the temperature takes a bit of time to stabilize and this works okay but I can’t check the temperature during the dwell period. Any suggestions for what to try instead?
What’re you using? Seems like M109 would do it?
If you have two temp sensors, you could run the heater PID on one close to the heater, then use M109 to dwell waiting on the temp to rise on a second sensor placed on the tool you care about? Then run
M104 T0 Sxxx
M109 T1 Sxxx
M104 T0 Syyy
M109 T1 Syyy
Instead of a single dwell, a whole bunch of short pauses? Maybe that’ll allow the controller to update the thermocouple reading.
So I’m extruding a very low temperature material and I’ll set the heater to go to temp A and it will turn the heater cartridge on until it gets to temp A then shut off the heater but the temperature goes well past temp A so I want to wait for the temperature to stabilize above temp A before going to temp B. My current heat cycle is as follows:
Essentially what happens is the dwell command kicks in at about 2 C above the set temperature and I’m unable to see any changes in temperature until the dwell ends and the next M109 command starts.
Can you lower your heater power (PWM limit) or move the temp sensor closer to the heater in hardware to fix the overshoot?
You could manually change your PID settings. Increasing Kd will help with overshoot
@Ryan_Carlyle we tested it with the thermistor closer and it took much longer for the rest of the heater block to get to temperature. Future versions will likely have a better designed heater block but we wanted to limit the amount of fully custom components.
@Wylie_Hilliard I tried to automatically calibrate the PID for the PWM but the temperature variance during the tuning is too high and was damaging some FDM parts of the machine. How would I go about manually limiting the PWM?
PID values should still be set to stock so:
@Adam_Steinmark manually limiting PID depends on firmware. What are you using?
It’s a config.c setting then I think
@Ryan_Carlyle are you sure you don’t mean Configuration.h? I think config.c is Smoothieware.
I’ve added a picture of the PID settings. I’m assuming I should lower BANG_MAX and PID_FUNCTIONAL_RANGE ?
missing/deleted image from Google+
@Adam_Steinmark you do not need to run the PID tuning to modify the values. Increasing the value for Kd helps prevent overshoot. Modify the values and retest.
The Kp value controls how much heat is applied based on the difference in temperature.
Ki prevents the temperature from hovering just off the desired value.
Kd calms down oscillations.
@Wylie_Hilliard yes I know but the values mean nothing to me, what should I try turning the value up to? As I mentioned above the Kd value is currently at 114. Should I also lower the Kp value?
It is simple to set and test (e.g. M301 P22.2 I1.08 D 114). Try say a 30% change, test, repeat. When you are happy, store the values to EEPROM with M500.
There are many resources about this online like -
@Wylie_Hilliard Just read through those links and they’re each very well written and provide unique information. I’ll try to make some time to hand tune the PID today or tomorrow and I’ll let you know how it goes. I still may end up limiting the PWM if I have issues.
So I’m trying to calibrate it manually now. I went up to 30 on the P value with I and D set to 0 and it wouldn’t get to temperature so I added I to eliminate the steady state error and now I’m running P at 6 and I at 0.2 and I’m affecting the FFF parts again. I can try adding a D value but it’s affecting the plastic parts before the thermistor registers the hotend has reached the target temperature. Granted I am trying to print within about 25 C of the glass temperature of very close parts.
Without a value for D, the temperature will always pass the desired point a few times before it settles. The value for I adds to the change rate causing the initial swing to be wider. Cut the value for I to a much lower value and set a value for D.
I would have started with your initial PID values but decreased I and P.
Try M301 P20.0 I0.1 D 114
@Wylie_Hilliard the issue isn’t it getting over the target temperature but the heater cartridge itself getting too hot. The heater gets some 25+ C above the set temperature before it shuts off and the the heater block draws the heat to the thermistor which then only registers a few degrees past the target temperature. I’ve been testing this with a FLIR camera. I need to keep P as low as possible so the heater doesn’t get too hot. I may even limit the PWM to prevent it from doing so.
You either need the thermistor closer to the heater or you need to limit the PWM. Whatever your PID settings are, the heater is going to turn on full power until it nears the target temperature.