Welcome! Log In Create A New Profile

Advanced

Changing filament during print

Posted by papergeek 
Changing filament during print
October 08, 2013 05:22PM
I'm curious how others handle this. I currently have a single extruder. If I want to print something with two colors, I need to do something like this. Assume that I'm printing something with a clear layer transition, for example a nameplate on a contrasting color background.

1. Start printing with the baseplate color and note the height where change will be needed
2. Hover around printrun when it gets near to that height, and pause printing at the right moment
3. Move the Z-axis up 20mm using printrun (to get it out of the way)
4. Quickly try to remove any excess material that may have drooled onto the work.
5. Reverse out the filament using printrun / pronterface, being careful not to move the X carriage
6. Load the new filament color until filament comes out of the nozzle. Snatch filament away from the extruder as soon as it comes out.
7. Move the Z-axis back down 20mm using printrun
8. Immediately resume printing

One of the commercial printers has a z-pause feature (which I believe is meant for this purpose).

I'm wondering what other alternatives might accomplish the same thing?

I could edit the G-code and insert commands in the layer change but that seems a bit awkward also. I'm wondering if there's an easy way to do this that I'm overlooking.
Re: Changing filament during print
October 13, 2013 09:38PM
Is it critical that the second color start at such a precise point? Seems like a lot of work to change colors. I did some little name medallions for my son's friends just a couple weeks back. I described it here.

It was a first attempt so I didn't time it very well and when I thought the second color was feeding it wasn't, so there was a little delay.


Wayne
PRINTinZ.com
Re: Changing filament during print
October 15, 2013 01:46PM
Not at all critical - basically I have a nameplate with raised lettering. At some point when the Z-offset moves to the point where lettering starts, I want to switch.

The tricky part is that as soon as I pause printing, I need to move the nozzle out of the way and make sure no extra material comes out so I can resume the print where I left off (after changing the filament).

Changing the filament is easy and I have a design that tolerates a fairly wide window of places to change it - I just would like to do it cleanly.

Another possibility that occurs to me is butt-splicing a second (or third) color at a known length, but I need to make something that can do that seamlessly (using heat and ensuring that I have a smooth splice).

Nylon is hygroscopic and can absorb clothing dye but that's more time consuming (and messy) than I want to deal with at this point.

Inserting G-code that reverses the extruder while moving the nozzle out of the way, reverses enough to allow the old color to be removed, waits for the new color to be loaded and primed out of the nozzle, then cleanly resumes seems like the best option so far. I haven't quite worked out the best way to get the new filament loaded then wipe off any excess before resuming.

Seems like it would be a good feature for printrun / pronterface; allow the user to specify a Z offset to pause, with a time delay after loading to wipe the nozzle before resuming...
Re: Changing filament during print
October 15, 2013 01:48PM
I should add that this application is quite simple but I would like to design for other more complex things that can take advantage of single-extruder color swapping... This is just a very simple test case.

I've also been thinking about adding this to the Marlin firmware (if someone hasn't already done it in some fork somewhere)...
Re: Changing filament during print
October 15, 2013 01:53PM
Actually your method (cutting the filament then pushing the second one in right after the cut end) would probably work pretty well for me, no pausing needed!

Keeping up with the moving X carriage will be a little challenging but so far no easy solution, your method is very quick. I'll give it a try.
Re: Changing filament during print
October 15, 2013 07:11PM
If you have space on your table, you could have it print a separate part off to the side that starts the second level of material just a little bit earlier than the main piece. It would give you an indication of when the letters were about to begin. With a little trial and error you could figure out exactly how much difference in Z you need between the two parts to time the second color. Having a small part off to the side would put the XY axis moving in just a small range momentarily while you feed the next color too.

Good luck.


Wayne
PRINTinZ.com
Re: Changing filament during print
October 22, 2013 06:24PM
I tried cutting and inserting and it was hard to not get it to jam. The tricky part is (as you've mentioned) trying to feed 3mm filament into a moving extruder.

It turns out there is (in THEORY) a solution for this - I'm going to give it a try tonight.

In the Marlin firmware, in configuration_adv.h around line 297, this code appears:

//adds support for experimental filament exchange support M600; requires display
#ifdef ULTIPANEL
#define FILAMENTCHANGEENABLE
#ifdef FILAMENTCHANGEENABLE
#define FILAMENTCHANGE_XPOS 3
#define FILAMENTCHANGE_YPOS 3
#define FILAMENTCHANGE_ZADD 10
#define FILAMENTCHANGE_FIRSTRETRACT -2
#define FILAMENTCHANGE_FINALRETRACT -100
#endif
#endif

ULTIPANEL is defined for (I think) all supported LCD displays. FILAMENTCHANGEENABLE is not enabled by default (it's commented out - in the above snippet, I've uncommented it).

The theory goes like this:

1. Compile Marlin with the above change and upload to controller board (RAMPS 1.4 in my case).
2. Insert something like
M600
just after the G1 Zxxx line where you change to a new layer.
When the firmware with FILAMENTCHANGEENABLE gets this, it will retract 100mm (you can change this on the M600 command line), disable extruder steppers, display a message on the LCD display and beep, maintaining nozzle and bed temperature until you acknowledge that you're done loading. Then it will resume.

The only downside I see is that if you move the X carriage while changing filament, the firmware doesn't seem to re-home X (or Y). But if the X and Y steppers remain active this may be a non-issue.
Anonymous User
Re: Changing filament during print
November 13, 2013 04:06PM
I had the same problem today as the thread starter and tried a few things.

Results so far: Neither M25, M226 nor M600 pauses my printer so I could change the filament. M25 does only work if you print from SD-Cards (what I don't use), M226 is not implemented in my firmware and M600 works only if there's an lcd display attached to the printer.

So I came up with the same idea as papergeek:

Quote
papergeek
Inserting G-code that reverses the extruder while moving the nozzle out of the way, reverses enough to allow the old color to be removed, waits for the new color to be loaded and primed out of the nozzle, then cleanly resumes seems like the best option so far. I haven't quite worked out the best way to get the new filament loaded then wipe off any excess before resuming.

Following code works without problems on my RepRapPro Huxley, maybe it's useful for others. The part of „filament change“ needs to be placed on the correct position in the gcode-file:

[...]
G1 F1800.000 E1.00000
G1 X96.037 Y76.800 F1200.000 E1.00092
M106 S255
G1 F1800.000 E0.00092


; Filament change
;  Move nozzle a few mm upwards
G1 Z10 F7800
;  Move nozzle to the right side
G1 X120
;  Move heatbed out of the way
G1 Y10
;  Retract 40cm of the old filament
G92 E200
G1 E0 F500
G92 E200
G1 E0 F500
;  Extude 60cm of the new filament
G92 E0
G1 E200 F500
G92 E0
G1 E200 F500
G92 E0
G1 E200 F500
;  Move the bed to its new approximate position
G1 Y46
; Filament change end


G92 E0
G1 Z3.500 F7800.000
G1 X68.164 Y46.509
G1 F1800.000 E1.00000
[...]

A few hints:
- The distance between the extruder and my hotend is ~35cm, so this is the minimum distance I need to retract to get all of the filament out of my printer
- This „code“ is only tested for absolute E-distances
- In the Marlin-Firmware there's an variable EXTRUDE_MAXLENGTH, default value is 200mm. You can't extrude more than this value! That's the reason why you need to reset the length of the extruded filament with the G92 command every 200mm.

Picture to see the result:


Edited 1 time(s). Last edit at 11/13/2013 04:09PM by Neuromancer.
Re: Changing filament during print
November 13, 2013 08:07PM
M600 works only if there's an lcd display attached to the printer.

Yes indeed, I probably should have mentioned that up front, it seems to be the only requirement. It shouldn't be that hard to modify the Marlin firmware to issue a message to the console that it's paused, then ENTER resumes a paused job. I would actually prefer that to pushing in the encoder knob on the LCD to resume. I'm going to give it a try - it was fairly easy to code into the firmware.

Normally when I get to M600 the printhead moves out of the way, the buzzer begins screeching (loud enough from my garage to set the neighbor's dog barking) and leaves the X stepper motor enabled (thereby locked in place while I rotate the extruder by hand to back out the old filament and load the new). The only tricky bit is that if I have any drooling from the nozzle I need to clear up the excess before spanking the encoder button and resuming.

I'm not entirely clear on how this would work if you have no LCD and are printing from an SD card (perhaps that isn't possible?)
Re: Changing filament during print
November 14, 2013 02:17PM
Rather dull of me to overlook the obvious - making this work would require changes in the client software as well. That makes this a bit more complex than a simple firmware change.

Similar discussion here: [github.com]

I suppose a "change filament" feature is really only useful when you have some external button, otherwise it's just a matter of how much g-code you need to wedge in when the change needs to take place...
Anonymous User
Re: Changing filament during print
November 15, 2013 02:11PM
Quote
papergeek
I suppose a "change filament" feature is really only useful when you have some external button, otherwise it's just a matter of how much g-code you need to wedge in when the change needs to take place...

I don't think so. You need to know, that Huxley is a really small printer that fits perfect on my desktop. And if I print something, I always do this via pronterface. So, I never needed an lcd display or external buttons.

The best solution would be an option in pronterface „Change filament on layer x“. So it would print the first x layers, displays a message „Changing filament“ and everything is controlled via pronterface. No need to update or change the printer firmware and no need to modify any slicer. I think it would be a relatively small patch for pronterface, just a few lines of „code injection“ on a specific layer. Nothing more.

I can't speak for others, but I think that would be the best option for small desktop-printers like the Huxley.
Re: Changing filament during print
November 19, 2013 12:21PM
I am in agreement with you there. Even adding a single line is a bit of a pain with a large gcode file - I'd rather have pronterface allow me to specify one or more layers where I want to change.

For now it's a bit easier for me to change the Marlin firmware than to muck around with Pronterface but that's definitely a good feature to have.
Re: Changing filament during print
December 10, 2013 06:42AM
just an idea from a beginner: couldn't you simply cut the filament before the extruder, and join it with the other color filament (maybe melt it with a lighter or something)? You could do this during the print.
Of course it wouldn't hit the exact layer, but I think it would be an easy way.
Re: Changing filament during print
December 10, 2013 01:07PM
Joining filament is definitely useful but you want to have it aligned and smooth. At least with my hot end (Magma) the tolerance on the top end is fairly close so if the join is kinked or not that solid it could jam or break off. Either would be bad.

I think people have come up with a few designs for filament joiners that use heat and some guide mechanism to get a smooth and seamless join...

For me, filament splicing will be good to make use of odd remaining lengths of filament from the previous spool.

The only problem I have with the filament-splicing approach for color change is that you would need to estimate the amount of filament needed to get to the layer where you want to change, either that or watch the print job and stop it at the right place. I found it much more convenient to just build Marlin with M600 enabled and insert M600 at the right layer, then it stops, beeps (VERY loudly) and waits for me (which could be a while, I am usually away from the printer).

The nice thing about the Reprap approach is that you can choose whichever approach works for you rather than have someone in product management decide for you. Want to add a second extruder? No problem. Don't want to / can't do that? Take your pick.

I also just started using Octoprint (on Raspberry Pi) as of this morning so I'm getting used to it - might offer some other options as well. Best $40 I ever spent smiling smiley
Re: Changing filament during print
December 16, 2013 07:45AM
Hi,
I'm new to 3D printing. I've just built my own printer and am having good results. My question has to do with pausing pronterface, not necessarly to change filament. I thought that I could pause a print by pressing the pause button on the top of the pronterface menu during a print and then ressume the printing again as opposed to restarting the print from the beginning again. Is it the case that the only way to resume a print from the paused point is to edit the G code file by deleting all lines that have already printed. I realise this is not straight forward as the print may be in the middle of a layer etc. People mention in the forums "a resume " button. Do they mean "restart"? Is it possible to resume after pause without any requirement to edit the G code file.
My setup is as folows: E3D Extruder 0.4mm. Marlin firmware on Gen 7 electronics.
Re: Changing filament during print
December 16, 2013 06:26PM
You can definitely change filament using pause and resume (in pronterface).

The problem with this approach is that you need to hover near the printer and be ready to pause printing at the right moment.

Another problem is that when you pause, the nozzle stays in place and may begin oozing melted filament. When you resume (not restart - restart will start printing from the beginning) it will start with the next line of Gcode, but if you have "drooled" extra plastic in place it is going to make problems with the rest of the print. In addition to hovering to pounce on pause, you can prepare to pounce on extra oozing with a pair of needlenose pliers.

If you have Marlin and an LCD display you can enable the experimental M600 feature mentioned earlier in this thread (assuming you are already familiar with rebuilding Marlin from source for your hardware). When it is encountered it moves the nozzle OUT of the print area before pausing (and loudly beeping for you to stop watching Scandal and change the filament). When you change the filament and resume (by pressing the knob) it picks up where it left off.

It's NOT a good idea to try editing code while printing, either within pronterface or using another program.

Neuromancer's technique (described above) is the best way to go if you don't have the LCD display and encoder knob. Note that you have to do the g-code edits BEFORE starting to print.

In general pause and resume works the way you'd expect, apart from the oozing.. pronterface always knows what line of gcode it's on and when you pause, it will resume with the next line. Editing code in between sounds very risky...

One use I've had for pause and resume (to give an example) is when some excess filament has gotten stuck to the nozzle and I don't want it to brush around and snag structures that are getting built up. I can pause, remove the excess from the nozzle with pliers, then resume.
Re: Changing filament during print
December 17, 2013 04:14AM
Thanks papergeek for the prompt reply. I'm not using LCD but rather a pc. It is exactly the scenario you refer to at the end of your post that I'm trying to provide for. So my question is; where is this elusive RESUME button on the pronterface user panel that everyone talks about?????? I'm attaching a screen shot of my panel when a print is paused. Maybe I'm missing something very obvious here but I can't see this button. Maybe it is a typed command that's activated by the send button???? Help!!!
Attachments:
open | download - Pronterface screengrab.png (287.7 KB)
Re: Changing filament during print
December 17, 2013 11:49AM
Hello Parto,

With my version of PronterFace running on PC, Resume Button is only available after Pause Button has been selected. In your screenshot, the Pause Button does not appear to have been selected, if so, the Pause Button would be replaced by the Resume Button.

Note: Restart is obviously different than Resume, You can't have the Resume Button if the print has not been Paused.

Edited 2 time(s). Last edit at 12/17/2013 11:53AM by ShawnT98027.
Re: Changing filament during print
December 18, 2013 02:34AM
Quote
parto
I'm attaching a screen shot of my panel when a print is paused.

If this is true then make sure you are using the newest version of Pronterface.


Bob Morrison
Wörth am Rhein, Germany
"Luke, use the source!"
BLOG - PHOTOS - Thingiverse
Re: Changing filament during print
December 18, 2013 04:29AM
Obviously there's something not right with my pronterface software. Although apart from this problem I have no issues with the software. If you look at the attached screengrab in my previous post you can see from the text in the right window that the print has indeed paused. The text says print paused at:9:12:47 but my print button doesn't change to a resume button. if I press print again I just get another message in the right window to say that the print has paused with the latest time stamp. The version of pronterface is the latest precompiled version available at [koti.kapsi.fi]
Re: Changing filament during print
December 26, 2013 05:34PM
Resume is only available in Pronterface when printing from SD card.
Anonymous User
Re: Changing filament during print
December 27, 2013 06:59PM
Quote
cbachalo
Resume is only available in Pronterface when printing from SD card.
No, not really. I never print from SD card and I can pause and resume my prints. Maybe we use different versions of pronterface?
Re: Changing filament during print
December 27, 2013 07:32PM
I am running current version.

Perhaps it is machine specific?

I have MakerGear M2. Resume only shows up when printing from SD

Also when I look at the Reprap M codes I can only find a resume code for SD printing
Re: Changing filament during print
December 30, 2013 12:56PM
There is an M code to resume printing since SD printing is done in the firmware itself.

When printing using pronterface, it is software running on the PC which is feeding G-code to the printer's firmware over USB. Pronterface (and octoprint) also support management of printing from SD card using M codes.

I used to use pronterface (now use octoprint from Raspberry Pi) and always had the option of pausing print (which simply tells pronterface to stop feeding G-code to the printer). While paused I can send commands, then resume (or restart). Resume, in the pronterface case, simply resumes feeding g-code to the printer from the next line. Basically pronterface always handles lines as indivisible units. It interprets some lines of G-code but mostly just sends whatever you have loaded and shows you the progress.

The M code to change filament works entirely using the LCD panel and encoder button on the printer.

I hope that clarifies things a bit...
Re: Changing filament during print
December 30, 2013 01:23PM
I am seeing the same thing as Pardo.

I am running Pronterface/Printrun 2013.10.19

I have Makergear M2. There is no LCD interface.

When loading a file into Pronterface, printing, and pausing, there is NO resume button. Issuing an M code for resume has no effect.

When printing from SD via Pronterface and pausing, there is a resume button. Issuing an M code for resume also works.
Re: Changing filament during print
December 31, 2013 07:44AM
Taking a quick look at the printrun/printcore.py source (where pause and resume are handled) it looks like there have been some changes in the gui but the actual print / resume is fairly simple and has not changed.

There is a recently opened issue: [github.com]
which sounds exactly like what you are describing. This issue is specific to the precompiled binary.

It's possible this is a build problem with the way the precompiled binary is being built. The most recent developer response is from 24 December.
Re: Changing filament during print
January 01, 2014 09:12AM
Hi Cbachalo,
Following on from the helpful comments of papergeek, I tried downloading the version of pronterface from [github.com] for windows using the compile from source option. The "no resume button" version of pronterface I had been using was the precompiled version available at [koti.kapsi.fi]
The down load from source at [github.com] is a bit more involved as you have to carefully follow the recommended order of additional python programs that are required before the main pronterface program. When I did this the pause button changed to resume once it was clicked during a print and everything worked as expected. Hope this helps.
Re: Changing filament during print
January 02, 2014 08:03AM
Yes i am also using the pre-compiled binaries.

Until they fix the binary, printing from SD appears to be much less hassle then having to compile Pronterface myself.

Thanks all.
Anonymous User
Re: Changing filament during print
January 03, 2014 09:15AM
@papergeek: Good explanation how pause/resume work, thanks.

And to get things right: Pronterface is written in python, if you set up everything right you don't need to "compile" anything. Just pull the lastet version from the git repository and run it. That's what I'm doing (Package management rocks!)
Re: Changing filament during print
January 03, 2014 08:17PM
I'm sure someone has a tutorial on running pronterface from source in Windows. The dependencies are minimal but there are a couple of things to install.

There are basically four packages to install listed here:

[reprap.org]

You can download the source archive from github without needing to install git (download zip link on the right), then start by running pronterface.py

Note that you need to install the dependencies in the recommended order.
Sorry, only registered users may post in this forum.

Click here to login