I need to slowly heat a custom tool so I've been staggering heat commands

gplus
(Adam Steinmark) #1

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?

(Ryan Carlyle) #2

What’re you using? Seems like M109 would do it?

(Ryan Carlyle) #3

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
etc

(John Bump) #4

Instead of a single dwell, a whole bunch of short pauses? Maybe that’ll allow the controller to update the thermocouple reading.

(Adam Steinmark) #5

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:

M109 Sxxx
G4 S25
M109 Sxxx
G4 S30
M109 Sxxx
G4 S25
M109 Sxxx
G4 S20
M109 Sxxx

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.

(Ryan Carlyle) #6

Can you lower your heater power (PWM limit) or move the temp sensor closer to the heater in hardware to fix the overshoot?

(Wylie Hilliard) #7

You could manually change your PID settings. Increasing Kd will help with overshoot

(Adam Steinmark) #8

@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:
Kp 22.2
Ki 1.08
Kd 114

(Ryan Carlyle) #9

@Adam_Steinmark manually limiting PID depends on firmware. What are you using?

(Adam Steinmark) #10

@Ryan_Carlyle Marlin 1.1

(Ryan Carlyle) #11

It’s a config.c setting then I think

(Adam Steinmark) #12

@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+

(Wylie Hilliard) #13

@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.

(Adam Steinmark) #14

@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?

(Wylie Hilliard) #15

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 -
http://rigidtalk.com/wiki/index.php?title=PID_tuning
or
http://forum.seemecnc.com/viewtopic.php?t=11440

(Adam Steinmark) #16

@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.

(Adam Steinmark) #17

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.

(Wylie Hilliard) #18

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

(Adam Steinmark) #19

@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.

(Wylie Hilliard) #20

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.