FeatureRequest: Diamond Hotend Colormixing

Good evening everyone, I have a small project before but would also need a firmware that can… It is about the following hotend Diamond Hotend - RepRap

I know there is already a post about it but not with the concern, my thought was if you have red yellow green black and white as filament, then you can mix every imaginable color together yourself.

But for this you would have to extrude for example yellow and green at the same time 50/50.

Now the question is, can this be done with macros? Here is a fantasy macro how it could look like:

[gcode_macro T6] # blue
gcode:
    ACTIVATE_MIX_EXTRUDER EXTRUDER=[{extruder1, 50},{extruder2,50}]

Can anyone Help?

1 Like

So, are you still interested in this? I’ve coded in alot of language, but gcode’s new, I’ve always just let the slicer handle it, but at this point I’m curious enough to dig into to this. I don’t have a mixing hotend though, so I need a guinea pig for my experiments.

1 Like

Hey, cool that you’re in touch! I don’t have a free 3D printer that I could convert, but I have the hotend. I also have motors, motherboard, etc., so I could make a test setup. But in general I think it’s a cool feature that would also be good for the firmware.We can do this together and talk to each other via Discord if you feel like it.

That works, so lets do this, go ahead and get your test machine running, and by this weekend I’ll throw together a profile in cura and superslicer for a color mixing setup so I can see what the GCode looks like, especially when its mixing.
I have two printers out of commission, not broke, but wife is requiring they get vented enclosures, should be back in service within the next couple of weeks, one is a 2 in 1 out. We’ll pick a model for consistency, create stock gcode, 2 in 1 out gcode and a mixing color gcode to compare, that will not only help us find out where the setup specific code is, but the 2 -1 uses the klipper macro to work, so I can get an idea of how it makes those calls.

btw, my email is christopherncriddle@gmail.com in case something ever goes wrong with the site and you need to reach me. Discord I haven’t been on for a hot minute, but at some point we’ll probably need to do that, especially when we get to a testing phase.

I’ll send you an email straight away and you’ll have my address too. Setting this up in the slicer won’t be a big problem, Klipper just needs to be able to interpret it.

I program a lot with Javascript/Node/Vue but that doesn’t help me much.

Just so we understand each other, you adapt the Klipper firmware? Maybe it makes sense to clone the project on GitHub and create a branch for it.

Yea, so my understanding now is we’re creating an API for a Klipper config file and related gcode that will go in the slicer to speak with the API. Alot of this will be trial and error, because so far all we’ve seen demonstrated is syncing an extruder_stepper object with a extruder object, and gcode to kick off that behavior when needed. We also know we can pass the name of an object from the slicer/gcode to klipper firmware call.

The gcode for the color mixing will help alot, becaue we should be able to figure out if its hitting E0 and E1 one at a time or at the same time at variable speeds depending on the mix values.

As far as the github, I want to wait till we have code that’s at least functional and going in the right direction, but at some point we would want it added to the sample configs.

You might want to check https://github.com/Klipper3d/klipper/pull/5960

1 Like

SET_MIXING_EXTRUDER FACTORS=<factor1>[:<factor2>[:<factor3>...]] [ENABLE=[0|1]]:

Looks fine, but how to use that with PrusaSlicer?

Write Macros for Klipper?

On Saturday I would like to start an experimental setup, thank you for the link to the pull requests.

I have no idea why it isn’t merged…

How has this flown under the radar?! People have been asking for this all over the web, questions on why klipper doesn’t support it, and its right there, waiting for someone that doesn’t have enough time in their life to approve it for 4 months?

Awesome. >_<
Well, at least it’s accessible.

Are you sure you want Red, Yellow & Green?
If you want to actually mix colours then you would need Cyan, Magenta and Yellow. Colour printing is subtractive. Check out CMYK on the web.

Good luck on this project. And good luck finding appropriate filaments to mix.

1 Like