creating seemingly instant extruder change
-
In short I'm trying to figure out how to balance the increase and decrease speed of extruders to allow for continuous movement of X and Y while changing extruders.
I’ve built a CNC machine that prints ceramic glaze on ceramic tiles. The machine runs on a duet 3 6HC board and uses peristaltic pumps driven by Nema 23 steppers to precisely dose ceramic glaze while it moves. The machine is instructed by Gcode from custom software that translates small pixel images to movements.
Currently the machine uses the IO ports to signal an external custom PCB to create a pulse train for external stepper drivers to control the pumps. The reason for this solution is the required precise control over the speed and possibility of directly adjusting it while the machine is running.
Because this external PCB is created by an external party it causes me to be less flexible in the further development of the machine. I’m therefore trying to figure out if it could be possible to control these pumps directly from the 6HC board by treating them as extruders. The direct override of the speed could in this case be controlled by changing the extrusion factor. The pumps also have to be flushed regularly with water and writing macros for this would greatly improve the workflow.
My main concern is the acceleration time of the pumps. In the current setup the machine does not slow down while switching pumps. The external PCB deals with this by linearly decelerating and accelerating the two pumps equally as shown in the example below.
It’s vital for this to work that the movement is continuous for the machine to work properly. The almost instantaneous change between pumps and therefore colors creates a gradient that is a required aesthetic in the result of the machine. You can see the result of the small preview above as a printed tile below.
I haven’t gotten round to creating a test setup for this but from what I gather from the documentation this won’t work because the machine will have to come to a standstill to accommodate for the acceleration and deceleration of the extruders. Even If I would divide the “gradient” segment into multiple small movements and increase and decrease the extruders in these parts to create a similar acceleration and deceleration the movement speed of the machine would still be affected.
I’m wondering if there is any way I could get this done with standard extruder settings or if there is any other solution you guys can think of to do this. Any help is appreciated as the only other route to solve this issue I can think of is to use PLC's which come with a learning curve and require a budget I'd rather avoid.
I'm a first time poster should this be in the wrong sub categorie please let me know and I'll gladly move it.
More tile designs for those interested here:
https://www.instagram.com/studio.gdb/ -
@GillesDB Just mulling this over in my head........One thing that comes to mind is perhaps treat it like a 2 in 1 out hot end. Whereby you create a tool which uses both extruders then set a mixing ratio. The mixing ratio can be anything you like but for a mixing hot end, the extrusion amount would always add up to 1 (or 100%) and it can be incremented in 1% steps. So if your pumps were treated as extruders, then one could incrementally alter the mixing ratio. This is what I'm talking about https://docs.duet3d.com/User_manual/Reference/Gcodes#m567-set-tool-mix-ratios
So you need some sort of script which would increment one extruder by say 1% and decrement the other by 1%. I've done something similar using a python script to generate the necessary M567 commands which I insert every "n" layer changes. This allows me to change from 100% colour (a) and 0% colour(b) to 0% colour (a) and 100% colour (ba) over the height of an object. If you segmented your X move, then you could insert the M567 commands into each segment which would change the mixing ratio (so respective pump speeds) synchronously and without slowing down the X carriage.
Of course you'd need to tweak your custom software.
-
@GillesDB this is an interesting application and i like @deckingman 's suggestion. from the illustrations you provided its not an instantaneous change but looks like a controlled handover between the two pumps.
What is the speed at which the "print head" travels during the glaze application pass and how quick is the transition from fully off to fully on for a pump?
-
@deckingman Thank you for your reply, this sounds like a viable solution. Altering the software is possible and this would in turn also allow me to add blends of colours by running at for example 50% each which could be a great extra feature.
I'm curious to see how the software would respond to an instant change between two with the M567 command. It doesn't seem completely unlikely to me that the standard acceleration and deceleration calculations would more or less balance each other out. For this to work B would have to start accelerating before A stopped though. Altering the gradient length this creates could in that case be done simply by altering the acceleration speed.
In theory this could even work with CMYK inks and four extruders to print full colour in one continuous motion which would create the world's lowest resolution inkjet printer.
-
@T3P3Tony thank you for your reply.
It's indeed not a completely instantaneous change, currently it's as fast as the pumps allow without missings steps. It doesn't take as long as the illustration might suggest and seems instantaneous to the naked eye. The gradient in the result has it's length from the amount of glaze that is still in the nozzle at the time of the change which blends before being extruded.
The machine normally moves at F6000 or a 100mm per sec.
-
@GillesDB If you set extruder jerk (instantaneous speed change) higher than the speed that the extruder(pump) is running, then there won't be an acceleration or decelarion phase. As the name implies, speed change will be instant (within the mechanical constraints of the system. Certainly, changing the mixing ratio "on the fly" when printing multi coloured objects has never resulted in any unusual print artefacts that I have been able to detect.
One thing of note is that if the M567 commands are embedded in the gcode stream via post processing or custom software, then they will be acted on immediately after the previous move has finished. This might be problematic if you have a long X move and want to change the pumps during that move. You could get around it by segmenting the X move.
Also, if the M567 moves are sent independently of the main gcode stream, then they will be added to the movement queue and only acted on when that queue has been emptied of all previous moves.
Hope that information might be useful in finding a solution that works for you.