Mixing Extruder with four Extruders
Hi,
Is it possible with the repetier firmware to use the Mixing Extruder function with 4 extruders and to control 2 heating elements?
I've set mixing extruder = 1 but only three extruders and one heating Element work.
I've set mixing extruder = 1 but only three extruders and one heating Element work.
Greetings Michael
Comments
If you can not handle the load with one output and have one sensor, you need to find all occurences where that pin gets set and also set in parallel a second one. You could define it in second extruder in in HAL.cpp just use PWM handler to listen on output of first extruder instead. Also make sure pin is defined as output in setup. That should suffice to do the trick.
The problem is that real sharing of heaters is only supported for one heater in V1 firmware. And with 4 nozzles it would not be a mixed extruder.
What you can do for example in this config:
Extruder 1+2 share heater and Extruder 3+4 share heater.
Extruder 1: Temp sensor + Heater pin
Extruder 2: same temp sensor as Extruder 1
Extruder 3: Temp sensor + Heater pin
Extruder 4: same temp sensor as Extruder 3
You can only control temperatures with Extruder 1 and 3, but 2 and 4 will show same temperature.
In Extruder.cpp you can add after
void Extruder::setTemperatureForExtruder(float temperatureInCelsius, uint8_t extr, bool beep, bool wait) {
if(extr == 1) extr = 0;
if(extr == 3) extr = 2;
So you can set temperature for second and forth extruder as well and they set it for 1 or 3 then. Makes slicers/hosts happy.
Unfortunately I haven't gotten any further yet.
What about the solution to connect both to heaters to same output? You never said if it would be possible or exceed current limit. Otherwise modify HAL.cpp to write pwm output to second output as well. Hope you understand a bit C++ to do so.
With C++ I know myself only half well but I think I can cope with it if I find the right place. If you could say where in the code it would be great.
and replace with
and also replace
with
#if PDM_FOR_EXTRUDER
That should already do it. Hope you noticed I removed for second extruder the mixing extruder test and changed pwm access from 1 to 0 to use same output signal.
SET_OUTPUT(EXT0_HEATER_PIN);
WRITE(EXT0_HEATER_PIN, HEATER_PINS_INVERTED);
#endif
#if defined(EXT1_HEATER_PIN) && EXT1_HEATER_PIN>-1 && NUM_EXTRUDER>1
SET_OUTPUT(EXT1_HEATER_PIN);
WRITE(EXT1_HEATER_PIN, HEATER_PINS_INVERTED);
#endif
#if defined(EXT2_HEATER_PIN) && EXT2_HEATER_PIN>-1 && NUM_EXTRUDER>2
SET_OUTPUT(EXT2_HEATER_PIN);
WRITE(EXT2_HEATER_PIN, HEATER_PINS_INVERTED);
#endif
#if defined(EXT3_HEATER_PIN) && EXT3_HEATER_PIN>-1 && NUM_EXTRUDER>3
SET_OUTPUT(EXT3_HEATER_PIN);
WRITE(EXT3_HEATER_PIN, HEATER_PINS_INVERTED);
#endif
#if defined(EXT4_HEATER_PIN) && EXT4_HEATER_PIN>-1 && NUM_EXTRUDER>4
SET_OUTPUT(EXT4_HEATER_PIN);
WRITE(EXT4_HEATER_PIN, HEATER_PINS_INVERTED);
#if defined(EXT1_HEATER_PIN) && EXT1_HEATER_PIN>-1 && NUM_EXTRUDER>1
SET_OUTPUT(EXT1_HEATER_PIN);
WRITE(EXT1_HEATER_PIN, HEATER_PINS_INVERTED);
#endif
should initialize it. EXT1_HEATER_PIN should be set and NUM_EXTRUDER is 4 correct? So no reason to not initialize the pin.
As a test you can always put a
#error compiles
inside a #if to test. If compilation then fails with that message it would include the code part. Same can be used to test the HAL part.