Welcome! Log In Create A New Profile

Advanced

MIXING_EXTRUDER basic issue

Posted by ShaharB 
MIXING_EXTRUDER basic issue
March 26, 2019 04:02PM
Hi,

Struggling with the most trivial use case of MIXING_EXTRUDER
(Marlin 1.1.9, RAMPS ver 1.4, via Octoprint)

I am trying to run E0 and E1 at different rates simultaneously for achieving some color mix.

Did the following:

Marlin config
==========
#define EXTRUDERS 1
#define MIXING_EXTRUDER
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands

Octoprint
==========
Set it to know I have 2 extruders
(otherwise it will ignore any tool-change gcode except T0)

Created a simple Gcode file
=====================
M163 S0 P0.6
M163 S1 P0.4
M164 S2
T2
G4 P2000
G1 E10
G1 E-10
... (and repeating these G1 moves)

I used DVM with pulse frequency measuring capability on E0 and E1 to obtain the pulse rate.
I am always getting the _same_ frequency on both although I set the ratio of stepper 0 and stepper 1 to 4:6 as can be seen in the Gcode.

Any idea what I am missing ???

Many thanks.

Edited 1 time(s). Last edit at 03/26/2019 04:05PM by ShaharB.
Re: MIXING_EXTRUDER basic issue
March 29, 2019 06:41AM
Rephrasing my question and adding some more info... Hoping to get some help... ):

The most important question to me:
Please, let me know, I'll be really grateful:
Is there any working example out there of a Marlin setup configured with MIXING_EXTRUDER ?

Never mind if MIXING_STEPPERS is set to 2 or to 3 or to anything else.
I just couldn't find any useful example.
(There's [reprap.org] but it's really lacking and outdated)

Adding more possibly relevant info:

Marlin config
==========
I left SINGLENOZZLE undefined because I understand that it should not be used together with MIXING_EXTRUDER
(It was a bit confusing terminology to me I must say...)
Regarding DEFAULT_AXIS_STEPS_PER_UNIT:
Since there are actually 2 stepper motors in my setup (i.e. #define MIXING_STEPPERS 2)
It made sense to me to define steps-per-unit for both E1 and E2, that is:
#define DEFAULT_AXIS_STEPS_PER_UNIT { 200, 200, 3125, 185, 185 }
Although Marlin's Sanity check doesn't complain in either way.
So what should it be? E1 only or both?

Many thanks!
S

Edited 1 time(s). Last edit at 03/29/2019 06:53AM by ShaharB.
Re: MIXING_EXTRUDER basic issue
March 29, 2019 08:19AM
Post a image of your controller I your controller board is like mine it it is a Ramps compatible board
It is more accurately a MKS controller and has been running in a ramps 1.3 or 1.4 mode
This being the case you can look at the code below

#ifndef MOTHERBOARD
#define MOTHERBOARD BOARD_MKS_BASE_14 // MKS v1.4 A4982 stepper drivers
#endif

#define EXTRUDERS 1

#define MIXING_EXTRUDER
#if ENABLED(MIXING_EXTRUDER)
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
#endif

Edited 2 time(s). Last edit at 03/29/2019 08:47AM by Roberts_Clif.


Computer Programmer / Electronics Technician
Re: MIXING_EXTRUDER basic issue
March 29, 2019 09:11AM
Robert many thanks for your reply!

Yes, this is an MKS 1.4 board.


My config is set accordingly:

#ifndef MOTHERBOARD
#define MOTHERBOARD BOARD_MKS_GEN_13
#endif

(Seems that Marlin 1.1.9 has only BOARD_MKS_GEN_13, which says in the comment to comply with xxx_GEN_14)

All other #defines match your recommendation.

Just to remind: my problem is that I am getting the same frequency in E0 and E1,
Although I am using (Gcode) M163 and M164 to get the steppers to run in different speeds. (as detailed in the first post)

Thanks again!

Edited 1 time(s). Last edit at 03/29/2019 09:12AM by ShaharB.
Re: MIXING_EXTRUDER basic issue
March 29, 2019 12:56PM
Quote
ShaharB

My config is set accordingly:

#ifndef MOTHERBOARD
#define MOTHERBOARD BOARD_MKS_GEN_13
#endif

(Seems that Marlin 1.1.9 has only BOARD_MKS_GEN_13, which says in the comment to comply with xxx_GEN_14)

I forget that recently upgraded to Marlin 2.0.0, finally Marlin had provided me a reason to preform the upgrade from Marlin 1.1.5 to Marlin 2.0.0
Of course I made it in small steps 1.1.7, 1.1.9BF then Marlin 2.0.0, Saving all previous version for backups.

MOTHERBOARD BOARD_MKS_BASE_14
JUNCTION_DEVIATION
RESTORE_LEVELING_AFTER_G28
PARK_HEAD_ON_PAUSE // This is great, used to park then the nozzle would melt the model, not the pause is moved to a set location

Too name a few.


Computer Programmer / Electronics Technician
Re: MIXING_EXTRUDER basic issue
March 30, 2019 05:15PM
OK! This is probably resolved.

You mentioned 1.1.9BF, and this made me realize I was working with 1.1.9 release, and not with the Bug fix.
Gave it a try, and it all seems to work.
So... thanks!

Summarizing to the benefit of who finds this post relevant

In Marlin FW, just define:
#define MIXING_EXTRUDER

If you are using 2 stepper for the mix, leave the following line. If you'll need 3 (e.g. for CMY colors) set it to 3.
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder

Leave this as well:
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164

If you are using Octoprint as your printing server
========================================
You'll better let Octoprint also be aware that you are using 2 or 3 extruders
(Yes, there's a mix in the terminology. Marlin knows you have 1 Extruder (the mixing extruder) while Octoprint should know you have several...)
otherwise it will ignore any tool-change done via gcode except T0. But You'll want to perform T1,T2... to activate the Mixing extruder feature)
Look at Octoprint doc to learn where to set it.

Create a simple Gcode testing file
==========================
M163 S0 P0.6; Set Stepper 0 (S0) to 0.6 of the full speed
M163 S1 P0.4; Set Stepper 1 (S1) to 0.4 of the full speed (All steppers should sum up to 1.0)
M164 S2; "Commit" your {0.6,0.4} setting as (virtual) "Extruder 2" (You are free to use any one of the available free 16 slots)
T2; Let Marlin know it should use (virtual) Extruder 2 - The newly created Mixing Extruder.
G1 E10; When you actually extrude filament, you'll get pulses in both Stepper 1 and Stepper 2. (In MKS boards, they are marked "E0" and "E1")

Enjoy.
Re: MIXING_EXTRUDER basic issue
April 16, 2019 12:14AM
I used to do that with gcodes and then i have a mks_tft3.2 screen and it have a custom functions, so i made 5 butons with mixings (75%25% E0-E1), (50%50% E0 E1) its an explain , the gcodes are this
M165 A0.75 B0.25;
M165 A0.5 B0.5;
M165 A0.25 B0.75;
M165 A0 B1;
M165 A1 B0;
Re: MIXING_EXTRUDER basic issue
May 06, 2019 02:55PM
Hi all, I have set eight colour mixing codes in CuraEngine slicer start gcodes as follows:

M163 S0 P0.5; 100% Red
M163 S1 P0.5; 0% Green
M163 S2 P0; 0% Blue
M164 S4; Store color Mixing in Tools T1


M163 S0 P0.5; 0% Red
M163 S1 P0.5; 100% Green
M163 S2 P0; 0% Blue
M164 S4; Store color Mixing in Tools T2


M163 S0 P0.5; 0% Red
M163 S1 P0.5; 0% Green
M163 S2 P0; 100% Blue
M164 S4; Store color Mixing in Tools T3

;Yellow:
M163 S0 P0.5; 50% Red
M163 S1 P0.5; 50% Green
M163 S2 P0; 0% Blue
M164 S4; Store color Mixing in Tools T4

; Viola:
M163 S0 P0.5; 50% Red
M163 S1 P0; 0% Green
M163 S2 P0.5; 50% Blue
M164 S5; Store color Mixing in Tools T5

; Celeste:
M163 S0 P0; 0% Red
M163 S1 P0.5; 50% Green
M163 S2 P0.5; 50% Blue
M164 S6; Store color Mixing in Tools T6

; orange:
M163 S0 P0.7; 70% Red
M163 S1 P0.3; 30% Green
M163 S2 P0; 0% Blue
M164 S7; Store color Mixing in Tools T7

; White:// not at all convinced with this one
M163 S0 P0.7; 70%Red
M163 S1 P0.3; 30% Green
M163 S2 P0; 0% Blue
M164 S8; Store color Mixing in Tools T8

These percentage's may or may not be correct to create the stated colours I am not sure they are just values to see what colours turn out, however, my question to all is having uploaded these combinations and using M164 after each set to store them to differing locations does this mean that until I upload a different combination to a saved locations i.e. tool numbers the above values should be stored on the eeprom locations and be re-callable after switching off the printer when it is switched on again. Also if these tool numbers are set is it possible to add the virtual extruders to appear in the smart controller Prepair / move axis menu, at the moment all I can see are X Y Z and extruder options and using the extruder option only moves the first stepper, stepper 2 and 3 cannot be moved.
Re: MIXING_EXTRUDER basic issue
July 20, 2022 08:58AM
Hello,
Discussion on this forum is very helpful. I am attempting to print similar gradient color printed parts using mixing extruder. I am using Creality CR-X Pro printer with Marlin firmware version 2.0. May I know what printers you guys were using? I am somehow unable to get both the extruders run concurrently.
Karun
Re: MIXING_EXTRUDER basic issue
July 21, 2022 03:14AM
Hi there, my machine is a totally home made, based on the I3 design it had a cheepo chines diamond hot end and power supply and has an arduino mega 256 and a ramps 1.4 board with an extra stepper driver. I am a retired guy who developed an interest in 3D printing and with time on my hands I went from there , some of you out there may think how sad, well maybe so but what the heck ?.
Re: MIXING_EXTRUDER basic issue
July 21, 2022 06:24AM
I also have a totally home made system. Best way to learn.
Sorry, only registered users may post in this forum.

Click here to login