Multi Colour Printing without using wipe or prime towers

Avatar

By deckingman 18 December 2016 14:52

Member · 799 comments

This is a copy of a post I've just made on the reprap forums.

Anyone who has tried printing multiple coloured objects will know the difficulties of switching from one filament to another, especially when using a mixing hot end or a hot end which has multiple inputs but a single nozzle such as the Diamond hot end or maybe an E3D Cyclops or perhaps the new Prusa multi colour which takes a slightly different approach but to all intents and purposes still has multiple inputs but a single output. The problem is that when switching from one colour to another, the original colour (filament) has to be purged before the new colour comes through. The usual approach is to use a "sacrificial" wipe/prime tower which is messy, wasteful of filament (and print time), takes up space on the build plate.

So I've developed/am developing a different approach. Here is a little video which shows the results of my efforts so far https://youtu.be/0tPtn3urQ3g .

The entire print was 3mm thick and took a couple of hours so I've shortened the video to around 5 minutes. The technique isn't perfect and still has some rough edges to iron out but I think you'll agree that it's showing promise.

For now, I'll keep you guessing as to how I've done it. I'm working on a blog/web site and will publish full disclosure on there shortly in the true spirit of RepRap. Part of the reason for posting this now is to get the video out into the public domain so that no greedy organisation can come along and patent the idea.

Ian


Avatar

By T3P3Tony 18 December 2016 15:02

Administrator · 789 comments

Really nice looking print! I would like to see an up close of the colour transition when you get a chance.


Duet Wifi Hardware Designer
www.duet3d.com
www.think3dprint3d.com

Avatar

By dc42 18 December 2016 15:17

Administrator · 2,672 comments

Nice print! Let me guess: you have measured how much filament you need to extrude after a colour change before the new colour takes effect, and you have pre-processed the gcode file to move the tool change or tool mix ratio gcode earlier in the gcode fie to compensate?

If I am right, then it would be nice to do this in firmware. To do it in real-time would require having a queue of pending gcodes long enough to always use up sufficient filament, which could be tricky if the slicer generates a lot of short segments just before a colour change. However, as the firmware already supports simulation mode, perhaps it could run a simulation and then store the colour change points for use when printing.


Duet WiFi hardware designer and firmware engineer
http://www.escher3d.com
https://miscsolutions.wordpress.com

Avatar

By T3P3Tony 18 December 2016 15:25

Administrator · 789 comments

Having firmware look ahead for tool changes has another advantage: allow the new tool to start heating to its active temperature so its temp has just stabilised (and potentially the purge has happened) as its required. That way it can wipe and print directly. While this does not apply to the diamond arrangement it would speed up IDEX printing.


Duet Wifi Hardware Designer
www.duet3d.com
www.think3dprint3d.com

Avatar

By deckingman 18 December 2016 16:34

Member · 799 comments
dc42 wrote

Nice print! Let me guess: you have measured how much filament you need to extrude after a colour change before the new colour takes effect, and you have pre-processed the gcode file to move the tool change or tool mix ratio gcode earlier in the gcode fie to compensate?

If I am right, then it would be nice to do this in firmware. To do it in real-time would require having a queue of pending gcodes long enough to always use up sufficient filament, which could be tricky if the slicer generates a lot of short segments just before a colour change. However, as the firmware already supports simulation mode, perhaps it could run a simulation and then store the colour change points for use when printing.

Yes, that's pretty much how I'm doing it. The devil is in the detail though. Firstly I have to detect when it's a tool change and not just the first tool being selected 9or the same tool being reselected). I also have to  ignore any pre and post comments and commands which might select or deselect tools). Finding the true start and end of the printing part of the file is trickier than one might at first imagine - especially when your consider what people might have in their start and end gcode files. I deal with this by having flags as the last line of the start gcode and first line of the end gcode in my slicer but there may well be a more elegant way of doing it.

The really tricky bit is that invariably the tool change needs to happen in the middle of a move. For short moves, it might not matter too much but for longer moves it'd be no use putting the tool change before or after such a move. So what I do is split the move at the the file insertion point - that is to say replace one G1 Xnn Ynn Enn with two new lines such that X and Y start and end at the same place but there is an intermediate step. The second part of the step contains the "E" amount needed to make up the total required purge amount. The first part of the step is the difference between that E amount and the original E amount from the line that is being replaced. X and Y are calculated accordingly by the same proportion. Of course another added complication is that the values for X and Y in the gcode file are absolute so I look at the previous line to calculate the relative X and Y moves in order to calculate the proportionate moves in absolute terms (not sure if I explained that well). Yet another added complication is that the previous line may not be a G1 Xnn Ynn Enn move. It may be a fan switch command or something else so it needs to be ignored and the line previous to that used. The same applies when trying to derive the sum of all the "E" values - lines which don't have an E value have to be ignored.

As you say, doing it real time would mean building a queue of pending gcodes in order to get the sum of the required purge amount, but could firmware deal with creating new G1 Xnn Ynn Enn lines where the required insertion point is somewhere in the middle of a move? It'd be real cool if it was possible though. More than happy to share what I've done so far.

Ian


Avatar

By deckingman 18 December 2016 16:36

Member · 799 comments
T3P3Tony wrote

Having firmware look ahead for tool changes has another advantage: allow the new tool to start heating to its active temperature so its temp has just stabilised (and potentially the purge has happened) as its required. That way it can wipe and print directly. While this does not apply to the diamond arrangement it would speed up IDEX printing.

If it's not possible in firmware, it'd a piece of cake to do adapt my method and do it by post processing the sliced gcode.


Avatar

By dc42 18 December 2016 20:36

Administrator · 2,672 comments

I think a solution would be to have two gcode buffers reading from the file. One would be in advance of the other and its function would be only to count the filament extruded and look out for tool change or mix change commands. At each such command it would subtract the purge length from the filament extruded to give the point at which the change needs to be made, and store that in a queue along with details of the tool change or mix change command. The second gcode buffer would do the actual printing and look out for when the filament extruded reaches the amount given at the head of the queue.

RRF is already able to segment moves, because it has to do that when applying grid based bed compensation to moves that are longer than the grid spacing. So splitting a move in two to do a tool or mix change in the middle wouldn't be a problem.

I'm not sure we would have enough free RAM on the Duet 0.6/0.8.5 to implement this, but we would on the Duet WiFi.


Duet WiFi hardware designer and firmware engineer
http://www.escher3d.com
https://miscsolutions.wordpress.com

Avatar

By deckingman 19 December 2016 12:38

Member · 799 comments

A couple of things. This method isn't perfect. For one thing, there is no allowance for the transition between one filament and the next. In practice, at least with the Diamond hot end, the transition is so small that it is hardly noticeable. Other hot end designs may have larger or more active mixing chambers which might mean that the transition between one colour and the next would be noticeable. The other thing that will screw it up is if there are insufficient moves between tool changes to fully purge the filament. The object would need to some pretty small coloured sections for this to be a problem but it's possible.

So I'm thinking that there may well be a requirement for some sort of very small wipe or prime mechanism in conjunction with what I've done so far. I'm planning to see if I can build something in which will generate some sort of a small purge mechanism (but nothing as large and wasteful as a full wipe/prime tower).

Note that these issues only become apparent when changing colours within the same layer and where that layer is visible on the finished print. If the colour change happens at the layer change boundary, then it's just a matter of setting the slicer to give 2 or more perimeters and to do the inner one(s) before the outer one.   

Ian


Avatar

By T3P3Tony 19 December 2016 13:43

Administrator · 789 comments

While this can be done in Firmware as David suggests, is it not better done by the slicer for the reasons Ian points out?


Duet Wifi Hardware Designer
www.duet3d.com
www.think3dprint3d.com

Avatar

By deckingman 19 December 2016 14:56

Member · 799 comments

I guess if it's easy enough enough to implement "look ahead" tool changing in firmware, then it would be a good thing to do and it might well suffice for many situations. There is probably no single best solution but perhaps a combination of firmware and some additional post slicing / pre-print processing may be the way to go. In any case, I'll keep trying to develop the post processing route because it may be helpful to RepRappers who aren't using Duet firmware.


Avatar

By dc42 19 December 2016 15:58

Administrator · 2,672 comments
deckingman wrote

... The other thing that will screw it up is if there are insufficient moves between tool changes to fully purge the filament. The object would need to some pretty small coloured sections for this to be a problem but it's possible.

I don't see why a short sequence of moves in a colour before changing the colour again would be a problem. It just means that there may be more than one tool change in the pipeline.


Duet WiFi hardware designer and firmware engineer
http://www.escher3d.com
https://miscsolutions.wordpress.com

Avatar

By deckingman 19 December 2016 16:32

Member · 799 comments
dc42 wrote
deckingman wrote

... The other thing that will screw it up is if there are insufficient moves between tool changes to fully purge the filament. The object would need to some pretty small coloured sections for this to be a problem but it's possible.

I don't see why a short sequence of moves in a colour before changing the colour again would be a problem. It just means that there may be more than one tool change in the pipeline.

What I mean is that if the amount of filament to be extruded between colour changes is less than the amount needed to purge out the old, then extra purging "off print" will be needed (I think - but maybe not). Say for example you were to print a face and the eyes alone were in a different colour to anything else, and those eyes only needed (say) 4mm of filament but 5mm was needed to purge out the old. I guess all the filament for the eyes plus part of the next colour would be held in the "purge zone" of the hot end. Maybe it would work. Dunno, I'll test that scenario when I get chance.


Avatar

By dc42 19 December 2016 20:29

Administrator · 2,672 comments
deckingman wrote

Say for example you were to print a face and the eyes alone were in a different colour to anything else, and those eyes only needed (say) 4mm of filament but 5mm was needed to purge out the old. I guess all the filament for the eyes plus part of the next colour would be held in the "purge zone" of the hot end. Maybe it would work. Dunno, I'll test that scenario when I get chance.

That's what I had in mind. Treat the melt zone and nozzle as a pipeline. Your scheme relies on the approximation that the colour mix that goes into the melt zone comes out of the nozzle a fixed distance (i.e. length of filament) later. You may have more than one colour change in the pipeline.

Let me know how well this scheme works out so I can decide whether/when to implement it in firmware.


Duet WiFi hardware designer and firmware engineer
http://www.escher3d.com
https://miscsolutions.wordpress.com

Avatar

By deckingman 19 December 2016 20:39

Member · 799 comments

Yes I'll do some more testing/refinement and get back to you. Not sure when that will be as my wife recently had surgery so I'm having to be chief cook and bottle washer (and cleaner, carer etc).


Avatar

By Zesty_Lykle 20 December 2016 15:32

Member · 86 comments

Clever idea Deckingman, I like it.

One more complication I noticed. Different filaments need different purge lengths. For instance when I am switching from black to white, I need to purge a hell of a lot more than when going from green to blue, for instance.

No idea if that is the case with all hot ends, not having a Diamond I can't test it.
Also, how is this with different types of filaments? Is ABS easier or worse than PLA, for instance.


Lykle
Design, make and enjoy life

Co Creator of the Zesty Nimble

Avatar

By deckingman 20 December 2016 16:47

Member · 799 comments

Hi Lykle (yasoo file mou)

No problem with different coloured filaments on the Diamond - can't really see why different colours of the same filament would need different purge lengths. I suspect the purge length you need for Black to White is correct and using less with Green/Blue probably means that they aren't fully purged but you can get away with it because a bit of Blue mixed in with Green probably doesn't show up. Funnily enough, I've just finished a door sign for my Hairdresser (well it got me a free haircut), not Black and White but Black and Silver (that's what the filament is called but it's light grey in fact). I used the same purge setting as the Union Jack. It's not perfect - there is a bit of Black round one of the screw holes which shouldn't be there) but it's not far out. Here is a link  https://youtu.be/naiLL9qYeTE.

Maybe something weird happens with different dyes but I've not yet come across that problem. Having said that, I have only done limited testing so far and it's early days.   

Can't comment on filaments other than PLA. I can't think of any logical reason why the same method wouldn't work though.

Ian


Avatar

By Zesty_Lykle 21 December 2016 08:19

Member · 86 comments

Yasou!
OK, so the Diamond head is definitely a different beast than my lowly V6 lite.
Good to know. I should try and upgrade but way to busy at the moment.

If you want to try out different filaments that feel completely saturated with colour, you should try nGen. It feels as if you are printing colour particles instead of plastic. Their white even gives the impression of being "chalky". It isn't but that is what it feels like.

(btw, was thinking of designing a very compact 3 filament Nimble, good idea?)


Lykle
Design, make and enjoy life

Co Creator of the Zesty Nimble

Avatar

By deckingman 21 December 2016 10:39

Member · 799 comments

Yasou Lykle,

Purging during tool change with a mixing hot end is a lot different to purging out a single filament to be replaced with another. I think that's maybe led to a bit of misunderstanding. For sure, when you want to change one filament for another it takes quite a lot to purge all trace of the old filament out of the hot end. But when you switch from one loaded filament to another, you only need to purge the small bit of filament that is in the mixing chamber and from the mixing chamber to the nozzle tip. I was quite surprised myself when I started testing on how little this actually is. For example, when loading a new filament I'll extrude 50mm or more before the new colour is complete;y clean of all traces of the old. However, when switching between one loaded filament and another, it takes only around 2.5mm. From observation, the "transition" between one filament and the other is I'd guess only about 10% of that so around 0.25mm which in most cases is hardly noticeable. Of course, other "multi input" hot ends might have larger mixing chambers and need more purging, so there may still be a need for some sort of small sacrificial "tower" if there is a large transition period between filament changes. The Diamond doesn't really have much of a mixing chamber - it's about 2mm long. This is both an advantage and a disadvantage in that the filament doesn't actually get mixed but rather, comes out like stripey toothpaste.

Not sure how a 3 filament nimble would work. You need to drive each filament independently and feed each one to a different heat sink/input on the hot end.

Ian


Avatar

By Zesty_Lykle 21 December 2016 12:26

Member · 86 comments

Clear.

Wonder if changing the position of the filament feed holes will change the stripey aspect. Doubt it. Will probably need a screw in nozzle option to make real mixing an option. Looking at the corkscrew shapes they force plastics through to mix properly, it might be a bit too big.

3 filament Nimble. Just a small block that holds 3 complete Nimble mechanisms. But the idea is a bit silly as it will be just 3 extruders coupled to the hot ends with bowden tubes. Only advantage is that the extruder block is very small. OK enough about this.

One more thing on the color changing. Just a comment on the cleverness of the people here.
1 you thought of it and tried it.
2 David and Tony took one look and realised what you are doing.

clever.


Lykle
Design, make and enjoy life

Co Creator of the Zesty Nimble

Avatar

By deckingman 21 December 2016 14:17

Member · 799 comments
Zesty_Lykle wrote

Clear.

One more thing on the color changing. Just a comment on the cleverness of the people here.
1 you thought of it and tried it.
2 David and Tony took one look and realised what you are doing.

clever.

Thanks - I'll take that as a compliment. As an ex automotive engineer, self taught in writing code and everything else, currently scratching a living by cutting and screwing bits of wood together, and too many years the wrong side of 60, I need all the encouragement I can get.


Avatar

By Dougal1957 21 December 2016 14:32

Member · 292 comments

Ian

I have just ordered a Diamond Hotend for the CoreXY Build that I intend to resurrect after Xmas so may well be chasing you for configs etc  when the time comes

Avatar

By deckingman 21 December 2016 14:54

Member · 799 comments
Dougal1957 wrote

Ian

I have just ordered a Diamond Hotend for the CoreXY Build that I intend to resurrect after Xmas so may well be chasing you for configs etc  when the time comes

Any time Doug - you know my email address. I've got my machine pretty well dialled in. Of course, if there is info you need that might benefit others, then post here and I'll reply here.

Ian


Avatar

By deckingman 8 January 2017 12:10

Member · 799 comments

So as promised, herewith a link to the new blog that I have set up, in which I have created a post giving full details of my technique. The information should all be clear but if you have any questions, feel free to comment on the blog and I'll do what I can to help. https://somei3deas.wordpress.com/blog/

Please bear in mind that I only set the site up a couple of days ago and I've gone with the free WordPress plan which means I am very limited in what I can do with the design and layout. Also, apart from a brief introductory post, this is the first post I have ever made so I have much to learn.

Be warned that I'm not a programmer and if you use the Python Script which I have linked to, and it crashes your PC, don't blame me. Having said that, it works fine for me.

I give this information freely in the hope that others may benefit from my endeavours. If you find it useful, then a word of thanks or attribution would make an old man very happy.

Last edited by deckingman (8 January 2017 12:11)


Avatar

By (In)Sanity 8 January 2017 16:40

Member · 279 comments

It would be cool to have some kind of color/transparency sensor that could determine if the filament has reached the correct spot in the tool chain.  Not sure what good that would actually do,  but sounds fun.

Jeff


Duet WiFi Powered FFCP with E3D legends hotend system.  BLTouch grid leveling.

Avatar

By deckingman 8 January 2017 17:17

Member · 799 comments
(In)Sanity wrote

It would be cool to have some kind of color/transparency sensor that could determine if the filament has reached the correct spot in the tool chain.  Not sure what good that would actually do,  but sounds fun.

Jeff

I have no idea what that means or how it could help. Each of the filaments are loaded into the hot end as far as they can go which is the point where they all come together in the "mixing chamber". They have to be. If there is any gap, filament from one of the other inputs will be forced back up into it. So the distance from the end of the filament where it enters the hot end, to the nozzle tip is a fixed amount which never changes. Why would you need any sort of sensor?