Dual extrusion problem in Geeetech a20m

What is the problem?

When I send a dual extrusion gcode from Octoprint, thi only uses one color, but the gcode works fine from SD card

What did you already try to solve it?

I have been reviewing this issue. My Geeetech a20m uses 16 virtual extruders in the firmware.

For my tests, I have put 2 extruders and "Shared Nozzle" in Octoprint settings. Actually, I'm not sure how many extruders I should put in the octoprint extruder number field

I'm using Cura, and I don't know if I have to add something there

Logs

This is part of the serial log;

2020-04-18 18:29:18,553 - Recv: echo:busy: processing
2020-04-18 18:29:18,568 - Recv: T:190.80 /190.00 B:60.14 /60.00 @:41 B@:71 W:0
2020-04-18 18:29:18,740 - Recv: T:190.03 /190.00 B:60.16 /60.00 @:77 B@:68
2020-04-18 18:29:19,455 - Recv: ok
2020-04-18 18:29:19,460 - Send: N27 M10518
2020-04-18 18:29:19,466 - Recv: ok T:190.48 /190.00 B:60.05 /60.00 @:60 B@:82
2020-04-18 18:29:19,479 - Send: N28 M109 T1 S190
31
2020-04-18 18:29:19,493 - Recv: echo:M109 Invalid extruder 1
2020-04-18 18:29:19,494 - T1 reported as invalid, reverting to T0
2020-04-18 18:29:19,496 - Recv: ok
2020-04-18 18:29:19,499 - Not queuing T0, that tool doesn't exist according to the printer profile or was reported as invalid by the firmware
2020-04-18 18:29:19,504 - Send: N29 M82*34
2020-04-18 18:29:19,509 - Recv: ok

Logs say: "Invalid extruder 1", but when reverting to T0, logs say that the T0 doesn't exist

Thank you!

The OctoPrint number of extruders in the printer profile is used by OctoPrint to prevent gcode commands that specify a extruder number higher than the number of extruders listed from being sent to the printer. In your case, if there are 16 virtual extruders, then I believe the number of extruders in the OctoPrint profile should be 16 (assuming the printer uses 0-15 to address the virtual extruders).

Thanks @b-morgan

I have put 16 extruders, but I continue with the same problem :pensive:

I'm confused. I believe Recv: echo:M109 Invalid extruder 1 is a response from the printer firmware. The OctoPrint profile "Number of Extruders" is used, for example, to prevent a T1 or a T2 from being sent to the printer if the number of extruders is 1. Since you have Number of Extruders set to 16, OctoPrint allowed the M109 T1 S19031 to be sent, but the printer didn't like it (Note: the N at the beginning is the line number and at the end should be an * followed by the checksum of that line. That doesn't match what you posted but it may have gotten "lost" in the translation). It would be better to upload the entire serial.log instead of editing out what you think is important.

I suggest that you also upload and post a link to the .gcode file. Also some additional details like the slicer being used and (a link to) the model being sliced. In addition, some screenshots of the four OctoPrint printer profile screens.

The more information (i.e. details) you provide to us, the better chance we have of providing a solution to you.

Thank you for your reply and help

I am using 2 cubes created from OpenSCAD. One of them with color and the other cube with another color. This is an image from Cura

cubes

This is the gCode:

test_cube_2colors.gcode (263.0 KB)

And this is the serial.log:

serial.log (981.9 KB)

I'm using these scripts in octoprint:

Before print job starts:

M82 ; absolute extrusion mode

M163 S0 P1.00 ; Set Left to 100%
M163 S1 P0.00 ; Set Right to 0%
M164 S0 ; Save Mix

M163 S0 P0.00 ; Set Left to 0%
M163 S1 P1.00 ; Set Right to 100%
M164 S1 ; Save Mix

M163 S0 P0.50 ; Set Left to 50%
M163 S1 P0.50 ; Set Right to 50%
M164 S2 ; Save Mix

M163 S0 P1.00 ; Set Left to 100%
M163 S1 P0.00 ; Set Right to 0%

G28 ; home all axes
M190 S[first_layer_bed_temperature]
M104 S[first_layer_temperature]
M109 S[first_layer_temperature]
G92 E0
G1 E30 F180
G92 E0
M117 Octoprinting...

After print job completes

G1 X0 Y220 Z15.0 E0 F3000
M104 S0
M140 S0
M84
M106 S0
M117 FINISHED

This response of printer firmware is weird " Invalid extruder 1", because the gcode works fine from SDCard

Thank you for your help

I believe I have been "Peter Principled" but I believe I have collected all the necessary information for someone like @foosel to maybe make sense of it all.

A couple of links that may be useful: https://reprap.org/wiki/Repetier_Color_Mixing and https://reprap.org/wiki/G-code#M160:_Number_of_mixed_materials.

I see in the serial.log:

2020-04-20 18:08:01,096 - Recv: FIRMWARE_NAME:Marlin 1.1.8 (Github) SOURCE_CODE_URL:https://github.com/MarlinFirmware/Marlin PROTOCOL_VERSION:1.0 MACHINE_TYPE:A20M EXTRUDER_COUNT:1 UUID:cede2a2f-41a2-4748-9b12-c55c62f367ff

Which would normally explain why the firmware is complaining about a T1 but it doesn't explain to me why the print works when read from the SD card.

A couple of additional questions... Is the firmware in the printer what came with it? Did the printer come with a slicer? If so, which one? I did notice that Ultimaker Cura 4.5 has a printer definition for the A20M which configures the printer as a dual extruder (shared heater is not checked).

I yield the floor :sweat_smile:

Hi @b-morgan and thank you again

Really interesting your comment. I have reviewing the marlin code and I see that:

// This defines the number of extruders
// :[1, 2, 3, 4, 5]
#define EXTRUDERS 1

but this is the official marlin code for Geeetech a20m, and dual extruders work fine from SDCard. I don't know if it's because of the virtual extruders and steppers. This is in another part of the marlin code

#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
#define GRADIENT_MIX // Apply a gradient between mixes over several layers
#endif

Answering your questions:

Is the firmware in the printer what came with it?

I have loaded a new marlin, but it's the official marlin for my printer. I only have changed the language

Did the printer come with a slicer?

No, I'm using Cura

which configures the printer as a dual extruder (shared heater is not checked)?

Shared heater is not checked by default. In my octoprint settings I have checked "Shared nozzle". I don't know if that is the problem

Thank you for your help. Maybe @foosel can help me with that

Finally, I have solved the problem. I had the shared heater not checked in Cura. I have checked it, and my Geeetech a20m is working now with 2 filaments

I'm using Cura 4.6

Thank you a lot @b-morgan

Any idea how to tell Cura to use the 2nd filament extruder from start to finish, It prints the purge line with the 1st one and then switches to the 2nd one for the print.

Hello Javi_Pacheco,
I´m facing the same problem, where did you shared the heater in Cura. I can´t find it in Cura 4.11.0.
Thank´s for your help

Hello @Fortuna !
You may have a look on this: