"Chamber Preheating", help with gcode
Hi!
I have my prusa i3 MK3S in a storage room that is around 15-18 degress during winter.
I built a lack enclosure for the printer.
My normal procedure is to print with octoprint but I turn on the heatbed and look at the temperatures until I know that the "chamber" is around 26 degrees which is the recommended ambient temperature according to support.
I would like to move this to a gcode and have octoprint run that gcode before printing.
My printer reports "ambient" temperature, but I think it is very inaccurate, I believe it is the temperature inside the circuit box and it is influenced by the heat of the electronics themselves. Reported ambient temperature quickly jumps to 30 degrees, while the pinda sensor of the nozzle still report 20 or less.
I was thinking on moving the print head to the volumetric center of the printer and use the pinda sensor as a better metric for the "ambient" temperature.
So, the gcoge should:
- move the head to the volumetric center of the printer
- wait until the pinda temperature reaches a minimum of 26 degrees, or whatever...
- start printing .
Can that be done with gcode/octoprint? anybody that can point in the right direction?
Rafael
Best Answer by Neophyl:
Yes it can. Some of us use a customised start up sequence that makes sure the pinda is at a known temperature anyway. Basically to equalise the mesh levelling as that can vary with PINDA temp anyway. Although normally we are only worried about the pinda temp and not the enclosure itself so we position the pinda close to the bed to warm it up.
If you positioned the pinda higher you could get it to do what you want. This is my current one -
M83 ; extruder relative mode
G28 W ; MUST FIRST home all without mesh bed level or else risk nozzle crash!
G0 X70 Y70 Z0.2 F2000; PINDA warms faster near bed
M140 S65; set bed temp to help warm PINDA
M104 S160 ; preheat extruder to no ooze temp to help warm PINDA
M190 S65 ; wait for bed temp
M109 S160 ; wait for extruder temp
M860 S30 ; wait for PINDA temp. For most stable PINDA temp during mesh, set temp here 1-2 deg below your actual PINDA temp at end of mesh cal.
M104 S100 ; drop extruder to lower temp to minimize PINDA temp rise during mesh
G80 N7 R1 ; mesh bed leveling with extra points but this requires 3.6.0c firmware
G1 Y-3.0 F1000.0 ; go outside print area
G92 E0.0
G1 Z3 ; raise head safely clear of bed before heating extruder
M140 S[first_layer_bed_temperature] ; set bed temp
M190 S[first_layer_bed_temperature] ; wait for bed temp
M104 S[first_layer_temperature] ; we heat extruder AFTER mesh to minimize ooze
M109 S[first_layer_temperature] ; wait for extruder temp
G1 Z0.7 ; move slightly above bed for easy clean intro line
G1 X60.0 E9.0 F1000.0 ; intro line
G1 X100.0 E12.5 F1000.0 ; intro line
G1 E-0.1 F2100; bobstro anti-stringing retract and wipe
G1 X99.0 E0 F1000.0 ; -1mm intro line @ 0.00
G1 X110.0 E0 F1000.0 ; +10mm intro line @ 0.00
G1 Z0 ;lower head back to normal Z after intro line
G92 E0.0
M221 S{if layer_height==0.05}100{else}95{endif}
If you change the third line to position it differently I think it will do what you want. Something like G0 X100 Y100 Z100 F2000 . I should point out though that it might take a long while for the bed to heat your chamber so you might also want to think about selecting a lower PINDA target temp and you might also want to turn off the extruder heating, as even at ~160 I wouldn't want to leave it too long just sitting there.
RE: "Chamber Preheating", help with gcode
I think your in luck. There is a plugin called Enclosure which will do some of the stuff plus give you login for filament run out. I don't know if Octoprint can get Pinda temp.
RE: "Chamber Preheating", help with gcode
Yes it can. Some of us use a customised start up sequence that makes sure the pinda is at a known temperature anyway. Basically to equalise the mesh levelling as that can vary with PINDA temp anyway. Although normally we are only worried about the pinda temp and not the enclosure itself so we position the pinda close to the bed to warm it up.
If you positioned the pinda higher you could get it to do what you want. This is my current one -
M83 ; extruder relative mode
G28 W ; MUST FIRST home all without mesh bed level or else risk nozzle crash!
G0 X70 Y70 Z0.2 F2000; PINDA warms faster near bed
M140 S65; set bed temp to help warm PINDA
M104 S160 ; preheat extruder to no ooze temp to help warm PINDA
M190 S65 ; wait for bed temp
M109 S160 ; wait for extruder temp
M860 S30 ; wait for PINDA temp. For most stable PINDA temp during mesh, set temp here 1-2 deg below your actual PINDA temp at end of mesh cal.
M104 S100 ; drop extruder to lower temp to minimize PINDA temp rise during mesh
G80 N7 R1 ; mesh bed leveling with extra points but this requires 3.6.0c firmware
G1 Y-3.0 F1000.0 ; go outside print area
G92 E0.0
G1 Z3 ; raise head safely clear of bed before heating extruder
M140 S[first_layer_bed_temperature] ; set bed temp
M190 S[first_layer_bed_temperature] ; wait for bed temp
M104 S[first_layer_temperature] ; we heat extruder AFTER mesh to minimize ooze
M109 S[first_layer_temperature] ; wait for extruder temp
G1 Z0.7 ; move slightly above bed for easy clean intro line
G1 X60.0 E9.0 F1000.0 ; intro line
G1 X100.0 E12.5 F1000.0 ; intro line
G1 E-0.1 F2100; bobstro anti-stringing retract and wipe
G1 X99.0 E0 F1000.0 ; -1mm intro line @ 0.00
G1 X110.0 E0 F1000.0 ; +10mm intro line @ 0.00
G1 Z0 ;lower head back to normal Z after intro line
G92 E0.0
M221 S{if layer_height==0.05}100{else}95{endif}
If you change the third line to position it differently I think it will do what you want. Something like G0 X100 Y100 Z100 F2000 . I should point out though that it might take a long while for the bed to heat your chamber so you might also want to think about selecting a lower PINDA target temp and you might also want to turn off the extruder heating, as even at ~160 I wouldn't want to leave it too long just sitting there.
RE: "Chamber Preheating", help with gcode
thanks for the answers!
@neophyl your script seems very close to what I need. Honestly I am glad I asked because I did not think about things such as head crashing!
One thing I don't understand, are you also doing the mesh leveling? how does this script fit with the default prusaslicer one?
I was thinking on placing the script in octoprint on "before print job start", I guess you are doing something different, right?
Where can I find a reference of the Gcodes? I found rep-rap, but not specifically prusa ones, is that OK?
RE: "Chamber Preheating", help with gcode
I think I would try with the following script:
G28 W ; MUST FIRST home all without mesh bed level or else risk nozzle crash!
G0 X125 Y105 Z100 F2000; Move PINDA to the center of the volume approx
M140 S60; set bed temp to help warm enclosure
M190 S65 ; wait for bed temp
M860 S26 ; wait for PINDA temp which approx enclosure temp
I am assuming that @neophyl script is more complex and substitutes the initial part of the script sent by prusa. I am expecting the printer to resume to homing and mesh leveling after the chamber preheating is finished.
RE: "Chamber Preheating", help with gcode
Just tested it, and worked amazingly!
Actually @neophyl, I think I might also be getting the more accurate mesh leveling as a side benefit...
RE: "Chamber Preheating", help with gcode
The script I use was originally developed main by Bobstro with a bit of Tims iirc. The annotated notes on Bobs website here http://projects.ttlexceeded.com/3dprinting_prusaslicer_gcode.html might help (also lots of useful info on Bobs website). I replaced all my start up with that as I didn't want the update firmware warning (I'm running an older firmware). Its got all the important bits in it.
For a description of the Gcode as used by Prusa printers then https://marlinfw.org/meta/gcode/ is where you want to go as they run a version of Marlin.
Its intended purpose is to get better mesh levelling. By ensuring that the levelling doesn't occur until the pinda is at a set temperature it takes that variance out of it. It also helps I think that the bed itself gets more time to heat up evenly. While material expansion *shouldnt* be that big a factor it can happen so its nice to combat that too.
The only downside is the longer waiting time before you first print, especially on colder days. It can be frustrating. However I'd rather wait for extra time than risk having issues with a long duration print.
You could also just create a warm up print by slicing using your warmup profile that goes through the steps and prints say the prime line and then stops. If you always ran that first at the start of a session you could then run prints that were sliced with reduced start gcode. Got to be a bit organised for that though lol which I'm not sure I am 🙂
RE: "Chamber Preheating", help with gcode
Here's what I am using today. A couple steps Neo isn't using that I have found helpful.
M115 U3.7.1 ; tell printer latest fw version
G90 ; use absolute coordinates
M83 ; extruder relative mode
; cool down PINDA
M106 S255 ; turn on fan
M104 S0 ; turn off nozzle heat
M140 S0 ; turn off bed heat
M860 S35 ; wait until PINDA is less than 35C
M106 S0 ; turn off fan
; preheat nozzle to a low temp, get plastic mushy before driving into the bed with G28
M140 S[first_layer_bed_temperature] ; set bed temp
M109 S175 ; wait for extruder temp
M190 S[first_layer_bed_temperature] ; set & wait for bed temp
G28 W ; home all without mesh bed level
; soak PINDA then level
G0 X50 Y50 Z1 F3000; this is a good PINDA heating position - snug to the bed
M860 S37.5 ; wait until PINDA is >= 35C in winter, 37.5C spring/fall, 40C summer
G80 N7 R5; mesh bed leveling
; heat to extrude temp
G0 X0 Y-3.0 Z10 F3000; this is a good nozzle heating position
M109 S[first_layer_temperature] ; set & wait extruder temp
; purge
G1 Y-3.0 Z0.20 F1000.0 ; go outside print area
G92 E0.0
G1 X1.0 Y-1.0 E0.5 F500.0 ; scribble 1
G1 X1.0 Y-3.0 E0.5 F500.0 ; scribble 1
G1 X2.0 Y-1.0 E0.5 F500.0 ; scribble 2
G1 X2.0 Y-3.0 E0.5 F500.0 ; scribble 2
G1 X3.0 Y-1.0 E0.5 F500.0 ; scribble 3
G1 X3.0 Y-3.0 E0.5 F500.0 ; scribble 3
G1 X60.0 E9.0 F1000.0 ; intro line
G1 X100.0 E12.0 F1200.0 ; intro line
G1 X97.0 F2000.0 ; wipe left
G1 X105.0 F3000.0 ; wipe right
G92 E0.0
M221 S{if layer_height<0.075}100{else}95{endif}
; end Printer Start gcode
RE: "Chamber Preheating", help with gcode
thanks for the fantastic replies.
I am very impressed by your scripts and determination in achieving the best printing process.
I have now printed a few times and the script is working very well, this allows me to hit print without babysitting the chamber heating.
Having the printer in the storage room/garage, allows me to print a lot more (in particular when there are small children around), then the thermo complexity needs addressing.
For the summer I must develop active ventilation for the lack enclosure, I still want the printer enclosed even if it is warm (kids get everywhere!).