What about smart nozzle heatup?


#1

Hi,

I don't know how other Slicer handle bed and nozzle heatup, Cura usally does
M190 S$BED_TEMP
M104 S$NOZZLE_TEMP
M109 S$NOZZLE_TEMP

I get that it's bad to start the heatup for the nozzle at the same time as the bed, since the bad is usually slower and that would ooze the nozzle and cook the rest of the Filament in the nozzle.

But this leads to things like the Preheat plugin, which basically does the thing that cura tries to prevent.

i've hacked together some code to preprocess my gcode before uploading to octoprint which does the following:

i have a json file with the heatup-profile of my printer, i've basically started with a cool printer, and heat up the nozzle and later the bed to the maximal temperature i've ever use it, and polled the temperature every 5 seconds.
also i've definded "safe" preheat temperatures, 80° for the nozzle and 40°C for the bed.
By "safe" i mean:

  • i'll never print with lower settings
  • there is no harm if the printer sits at this temperature for a while.

i've set these temperatures (with M104 and M140) on top of the start-gcode in octopi)

what i do now:
i calculate the heatup time for the nozzle and the bed from the safe-temp to the target-temp.
if the nozzle takes longer to heat up then the bed:
i set the target-temperatures with:

M104
M190
M109

Both bed and Nozzle heat op, the Nozzle will not cook without extruding, everything is fine, and heatup ist fast.

If the bed will take longer to heatup then the nozzle, like for ABS:
i calculate both heatup times.

Lets say Nozzle heatup time is 90s and bed heatup time is 300s.

Than i look up the temperature the bed should have after 210s of heating (300s - 90s), lets call it $temp210

So i set
M190 S$temp210
M104 S$extruderTarget
M190 S$bedTarget
M109 S$extruderTarget

This will speed up the heating period for about 90s.

This is currently totally hacked up, no error handling at all, and is only tested with the version of cura i'm running.

So, i'm not fluent in python, and im not that into the octoprint internals.

BUT:
if there is interest in such a plugin i would throw some freetime onto it.
Also id wopuld be great if somebody would have a look at the resulting code and give some advice, would the possible?