script to drop temperature during ramming
I've got a (work in progress!) script that will allow you to change the extruder temp during ramming. It identifies each filament unload and drops the extruder temperature to a specified number and waits before doing the ram/unload. It then sets the temperature back to whatever it was last set to before loading the new filament.
It's a simple python3 script. You can find it here:
https://github.com/3Dabbler/mmu2_ram_cool.git
#> cool_ram.py -h
usage: cool_ram.py [-h] [-t RAM_TEMP] -i INPUT [-o OUTPUT]
optional arguments:
-h, --help show this help message and exit
-t RAM_TEMP, --ram_temp RAM_TEMP
Ram temperature
-i INPUT, --input INPUT
input file
-o OUTPUT, --output OUTPUT
output file
Disclaimer: please check the gcode that comes out before using it. Any damage to your printer is on you. I would not lower the temperature too much or the filament unload will fail (ask me how I know 🙄 )
I'm still working this into my approach with print temp, ram settings, and load/unload settings, but it gives me one more path.
I will continue to tweak it. Potential changes:
- adding some delay after the temp changes to allow for better temp stability
- lifting the extruder slightly before the temp change
Re: script to drop temperature during ramming
Hey Paul,
I installed python3 on my windows 10 installation, to try your script. But i'm a python noob. Haven't been able to run it. I know im doing something wrong, like a permission or path issue.
Bada@Bada-PC MINGW64 /d/Downloads/test git2 (master)
$ ls
cool_ram.py*
Bada@Bada-PC MINGW64 /d/Downloads/test git2 (master)
$ ./cool_ram.py -h
bash: ./cool_ram.py: /usr/local/bin/python3: bad interpreter: No such file or directory
Prusa MK3 > MK4s
Prusa MK2.5 kit > MK3 > MK3s > MK4s
Prusa SL1 3D printer + Curing and Washing Machine (day1 order)
Taz6 - taken apart for space
CR10s4 - upgrading
Delta 3ku - dont use
Re: script to drop temperature during ramming
My bad. Try this. If you are on Linux or Mac, try this. Type:
which python3
You might get "/usr/bin/python3" or some other path. The edit my script to change the top line:
#!/usr/local/bin/python3
to wherever python3 lives in your system
#!/path/to/my/python3
Let me know if that works. Since you are running bash, the above should work.
======
For those on Windows, you can follow instructions here:
Re: script to drop temperature during ramming
I just checked in a new version (still testing!). It adds a "no_wait" option (-nw) which sets the nozzle temp but doesn't wait for it to stabilize before moving on.
If you set a reasonably low temp (or just skip the -t option, as the default is 180) this should be equivalent to turning off the heater during ramming. I also shifted the temperature restore before the tool change so it can stabilize during the tool change.
Still testing it, YMMV.
Re: script to drop temperature during ramming
Latest commit a23f5a3
I got it running, but idk if im doing it correctly
cool_ram.py -t 195 -i 2C_sheep.gcode -o 2C_sheepram.gcode
(195, False, '2C_sheep.gcode', '2C_sheepram.gcode')
2C_sheep.gcode - 2,891 KB
2C_sheepram.gcode - 7KB
seems like it changed rammings settings but stripped out the gcode for sheep?
I'm running in a windows command prompt with admin.
Prusa MK3 > MK4s
Prusa MK2.5 kit > MK3 > MK3s > MK4s
Prusa SL1 3D printer + Curing and Washing Machine (day1 order)
Taz6 - taken apart for space
CR10s4 - upgrading
Delta 3ku - dont use
Re: script to drop temperature during ramming
I should know better than to make a "minor" tweak and check in without thorough testing. Typo on my end. Give me 15 minutes.
Check it out again and try it. When I rearranged things to restore the temperature before the tool change, I managed to make an optimization that helped save your disk space by not printing out 99% of the file!
Still testing, but I think I've got it.
Re: script to drop temperature during ramming
Can't guarantee it's perfect, but I'm now printing a lizard processed by the script, and at least it hasn't deleted 99% of the file. Let me know if it's working for you.
BTW, if you are a python noob, good chance to learn. This is a relatively straightforward script. I'll comment it up pretty well so you should be able to make changes.
This website is your friend when it comes to hacking gcode: https://reprap.org/wiki/G-code
Re: script to drop temperature during ramming
I was just happily going to ignore this until you mentioned it as an excuse to learn python. Sadly that sounds useful.
I'd wait till you hit 80% of the requested temp difference, or the set temp - some delta (3 degrees?).
I maintain an informal list of San Diego, CA 3D printing enthusiasts. PM me for details. If you include a contact email and I can add you to the informal mailing list.
Re: script to drop temperature during ramming
I've updated the script with a bunch of comments. Should make it much clearer if you anybody wants to tweak it or use it as a base for other gcode modifications (feel free)
I'm currently testing the "no_wait" option with a much lower temp (180, the default). This basically just turns off the nozzle heater at the start of the ram sequence, does not wait, and leaves it off until just before the tool change. The temp generally has time to stabilize during the unload/load sequence. It's faster than the previous.
There seems to be a lot of lag in the nozzle temperature sensor (or actual thermal lag in the nozzle), but it seems like a 4 second ram sequence is dropping the temp all the way to 180. That would make me nervous that I wouldn't be able to unload, but it seems to be working quite well, at least in my statistically significant first print.
Short video of two filament swaps here: Ram_cool Test
Re: script to drop temperature during ramming
I was just happily going to ignore this until you mentioned it as an excuse to learn python. Sadly that sounds useful.
I'd wait till you hit 80% of the requested temp difference, or the set temp - some delta (3 degrees?).
Unfortunately, I'm limited to what Marlin gcode can handle. https://reprap.org/wiki/G-code
My options are:
M104 => set the temp and just keep going
M109 => set the temp and wait for it to hit that temp
From the Marlin page I don't see a way to set the temp to one number and then wait for it to cool to a different number. You could pretty easily modify the script to add a static wait (2 seconds or whatever) using the M116 command.
Fortunately, I'm having quite good luck with just turning off the heater. I can adjust the ram time/volume to control how far the temperature dips.
Here are two example filament swaps with just the "-nw" option and no temp (defaulting to 180C).
Re: script to drop temperature during ramming
That overshoot is pretty insane.
Have you tuned your PID's? Probably just picking a closer temperature would make more sense - you effectively want you overshoot to be 180, not your "target"?
Do you have comparative pictures of your tips? How do you tune it?
I assume you can't set a "per channel" temp?
I maintain an informal list of San Diego, CA 3D printing enthusiasts. PM me for details. If you include a contact email and I can add you to the informal mailing list.
Re: script to drop temperature during ramming
That overshoot is pretty insane.
Have you tuned your PID's? Probably just picking a closer temperature would make more sense - you effectively want you overshoot to be 180, not your "target"?
Do you have comparative pictures of your tips? How do you tune it?
I assume you can't set a "per channel" temp?
I'm not sure what you mean by 'per channel' temp. As for the overshoot, I think it is exactly what I would expect. PID tuning is really designed to keep the nozzle temp stable during normal printing conditions. I suspect if I tuned the PID parameters to deal with a 20C sudden drop accompanied by a huge push of filament through, I would end up with less stability during normal printing.
To be honest, at this point I don't want to mess with it. It seems to be working. All my Inland PLA is working perfectly with these settings. Black, White, Purple, Green, Yellow, and even the Red PLA+ that was giving me massive stringing problems when I let the ram temp stabilize at 195.
My concern with this overshoot would be that I would solidify the tip in the nozzle and not be able to withdraw it. However, that doesn't seem to be an issue at this point. If it happens, it would be pretty easy to identify (stuck filament, or filament erosion/grinding from the bondtech), and I'll raise the floor a bit.
For now, I seem to have hit settings that let me do completely reliable (knock on wood) unattended prints. I'm halfway through my third 6 hour lizard three color lizard print with 6 different filaments, not a single jam or skipped layer.
Re: script to drop temperature during ramming
Go with what works!!!!
I was fighting and fighting and just bought a bunch of new filament - all $15 stuff - and had 1 jam in 500 changes.
I also cleaned up my filament feed instead of using the OEM "brake" thing.
And got the grinding gone.....
This has taken a lot of fiddling. 🙂 My first "real" prints:
I have like 50 psychedelic Marios if anyone needs any you just let me know.
I maintain an informal list of San Diego, CA 3D printing enthusiasts. PM me for details. If you include a contact email and I can add you to the informal mailing list.
Re: script to drop temperature during ramming
That overshoot is pretty insane.
That is one of the problems with a 40W heater.
I have already covered this in another post; basically I use a 30W heater with sock and the overshoot is greatly reduced. Accordign to E3D the 30W heater is "more controllable" and I have found that to be the case.
PR only moved to 40W heaters because they had problems designing fan outlets. With the Mk3 fan outlet, there really is no need to run a 40W heater.
And you don't need external scripts to drop the temp for tool change is you use KISS. It's already there as a user parameter.
Peter
Please note: I do not have any affiliation with Prusa Research. Any advices given are offered in good faith. It is your responsibility to ensure that by following my advice you do not suffer or cause injury, damage…
Re: script to drop temperature during ramming
Thanks for reminding me of that - I was going to comment on it - although it DOES add an ooze shield automatically, no?
Just sliced a model. The Wipe Tower completely disappears.
This is not ready for MMU use. I agree the script is motivation to get Prusa to work the existing feature into it.
I can tell you as I've used that feature on dual-nozzle printers, I wish I could turn on/off the ooze shield independently.
I maintain an informal list of San Diego, CA 3D printing enthusiasts. PM me for details. If you include a contact email and I can add you to the informal mailing list.
Re: script to drop temperature during ramming
Thanks for reminding me of that - I was going to comment on it - although it DOES add an ooze shield automatically, no?
Sorry Abraham, was this comment directed towards my KISS post? If so, no, KISS V2 includes an optimised purge tower. KISS V1.6 requires a post-processor (which is available for MMU1 and also includes the temp drop).
Peter
Please note: I do not have any affiliation with Prusa Research. Any advices given are offered in good faith. It is your responsibility to ensure that by following my advice you do not suffer or cause injury, damage…
Re: script to drop temperature during ramming
And you don't need external scripts to drop the temp for tool change is you use KISS. It's already there as a user parameter.
Except external scripts are fun! 😆 I actually love getting in there and hacking gcode. Makes me feel like I can really control what is going on.
KISS is on my list for someday, but my list is getting long. Right now, I have basic MMU2 with Inland PLA and my script dialed in. No jams/skips in a few days.
Can you point me to a quick "Kiss vs Prusa Slic3r" breakdown? At this point, slic3r is working for me for MMU2, and I use simplify3d for my Rostock and my Ultimaker. I'd need an advantage beyond 'drop temp during ram' to add a third slic3r to the mix.
Next on my list is getting the filament under control. I'm designing my own variation of TheBall's filament brake/loop control. Then spool holders that mount above that.
Re: script to drop temperature during ramming
Except external scripts are fun! 😆 I actually love getting in there and hacking gcode. Makes me feel like I can really control what is going on.
That's mainly why I wrote a KISS post-processor for MMU1 😉 Plus it was better than PR post-processor...
Peter
Please note: I do not have any affiliation with Prusa Research. Any advices given are offered in good faith. It is your responsibility to ensure that by following my advice you do not suffer or cause injury, damage…
Re: script to drop temperature during ramming
And you don't need external scripts to drop the temp for tool change is you use KISS. It's already there as a user parameter.
Next on my list is getting the filament under control. I'm designing my own variation of TheBall's filament brake/loop control. Then spool holders that mount above that.
His set up adds friction, complication and expense. You should go with mine - at least, nothing in the path and it doesn't need to be that big.
I maintain an informal list of San Diego, CA 3D printing enthusiasts. PM me for details. If you include a contact email and I can add you to the informal mailing list.
Re: script to drop temperature during ramming
His set up adds friction, complication and expense. You should go with mine - at least, nothing in the path and it doesn't need to be that big.
It'll end up being somewhere in between. His didn't seem that expensive, and they both have the same approach.
I'll have a bearing/wheel (as I've got boxes of 608 bearings lying around and printing a wheel is easy. The other issue is I want easy loading of filament.
It will possibly end up with something like yours, but
- with a wheel on the right side
- no back/bottom blockage between the plates (so top inserted filament can easily slide through to where I can grab it)
- Bottom PTFE an inch or two below the plates (so I can shove the filament tip in easily).
Still in the sketching mode. My initial design gave me some learnings, but didn't get me what I wanted.