"Smart purge" of BCN

  • Hi,
    I was wondering how BCN does that tool changing of their Sigma and did browse through their profiles they supply for S3D and their firmware on Github.
    It seems they implemented an M800 command, not documented on reprap.org, which they call "Smart purge".
    See here https://github.com/BCN3D/BCN3DSigma-Firmware/blob/master/Marlin/Marlin_main.cpp#L7992.
    There are two options, I think they use the second one at the moment with parameters 'F', 'S', 'E' and 'P'.
    Basically they measure the time an extruder has been inactive, that code is implemented in the screen update loop, there they count the seconds.
    And in the M800 command then they use this to calculate the distance to purge.
    In the S3D profile they use 'M800 F9.41 S0.0011 E9.0 P1.62' for their ABS material and 'M800 F8.46 S0.0154 E9.9 P1.78' for their PVA material. So the values appear to be really tuned for every material.

    What do you think of this method of doing a purge upon tool change?

    An different approach to achieve a similar goal would be to implement some gcode commands to create variables and do calculations with them in gcode. Like saving the current time with a gcode to a variable when activating a tool. Substract that value from the current time and multiply it with some other value, all in a gcode command like 'G1' to calculate the values of the paramters for that command.
    That would be pretty cool. And this would also solve some other thing I have in mind, like calculating the idle temperature based on the acitve temperature if your slicer just supports the active temperature as all slicers I know do. That would be cool…

  • administrators

    Hi Alex

    Is the different time based on the amount of soft filament needed to be purged? That makes sense, I would want to make it a general as possible. Also it would make sense for that purge to happen while the other head is printing if hardware configuration allowed it.



  • Yeah the purge amount is the idle time multiplicated with the slope S value. E and P are max and min purge values. F is the speed. I think that shall compensate the filament flowing out of an inactive hot nozzle…

  • Hmmmmm. Well it is a fact that PLA will hydrolyse if it's left at above about 170 degrees C and will become less and less viscous (more and more runny) over time, so I could see that you might want to use less purge if the tool had been inactive for only a short time. However, this process is a function of both time and temperature. If the standby temperature is lower than about 170 deg C then it won't happen. Personally, I think that there are many other factors that affect the purge requirement such as the size and geometry of the melt chamber and hot end in general, and whether the tools use a mixing hot end or separate hot ends or some sort of "Y" adaptor etc. Obviously Sigma can tune the purge parameters around their particular application as the geometry is fixed but it's difficult to see how it could be done "generically" in a slicer. Even then, in my experience certain filament colours need more purging than others. In very general terms, it doesn't take much to purge Black filament (or at least any residue from a previous colour is not noticeable) but it takes a lot more to purge White filament before the colour is pure. So ideally, to be truly "smart" you need to allow for a lot more parameters such as filament colour and possibly even brand and many more filament types than just PLA and ABS. It's probably a whole lot easier to use sufficient purge for "worse case".

    Even then, it depends on the model being printed. I use 3 strategies with my mixing hot end. One is simply to not purge at all and works for models where essentially immediately after a tool change there is infill to be printed. This means that any of the "wrong" filament is hidden inside the part. Another strategy is to move the tool change point earlier in the gcode file so the new filament starts to flow earlier and is "true" by the time it is needed. This works quite well with PETG and other filaments that do not hydrolyse. My third strategy (still under development) is to move away from the model and simply squirt some filament into a "bucket" which works when the other two options are not viable.

  • I see your point…
    I ist checked one profile with ABS left and PVA right and the values of both are different. So I assume they will also be different for other types of materials. I didn’t find a colour selection...
    As far as I can see the Sigma does not cool an inactive hotend but they retract by 8mm upon a change...

    I have no experience with a Sigma but I just hear good things about it. I just wanted to know how others do that switching. Maybe having a look at how the UM3 does it can’t hurt too...

  • Hmmm. Perhaps 8mm is enough to take the filament out of their melt chamber - that would mean they have a pretty small melt chamber though. Or maybe Sigma have yet to discover that PLA will hydrolyse…..

    You could also check out Prusa's smart towers but from what I saw at the TCT show, the (sacrificial) towers contained more filament than the objects being printed. They seemed awfully wasteful both in time and filament to me.


Looks like your connection to Duet3D was lost, please wait while we try to reconnect.