Control more than fans with M106
-
I have been using compressed air for hotend and part cooling with great success for over a year now and would like to propose the implementation of means to control things like RC-Servos or Stepper motors or even proportional valves with M106.
Removing fans from the print head comes with a number of advantages like:
-
reduced bulk
-
reduced mass
-
reduced wiring
-
reduced noise (My airpump provides more than enaugh pressure/airflow for two hotends incl. part cooling for each hotend and is far quiter than any of my previous fan setups.)
-
no breakdowns due to broken or clogged fans
(Vibrations during printing decreases the fans lifespan and they tend to suck in small parts of filament and get blocked) -
far better cooling since cold air from the outside is used instead of hot air rising from the heated bed. -> Cooling performance is independent of the temperature inside the printer.
Further more, the M106 command could be used to open/close ventilation flaps in order to control the temperature in printer enclosures like suggested by @achrn here.
This feature has been requested in different forms a couple of times by now by different users. I have tried everything from rc-servos to proportional valves with limited success due to firmware restrictions See the thread here . Most of the proposed solutions were based on a demon.g doing some kind of conversion. But since RRF version 3.3 the demon.g is only called every 10 seconds, the delay is just to long for responsive cooling.
One suggestion I found very interesting was to call a macro instead of the fan definition in config.g when the g.code contains a M106 command.
-Max
-
-
I support this and ask you to add a 'look-ahead' fan control. When the gcode tells the part cooling fan to spin 100% for a specific area (eg. bridges) it takes nn.nn seconds before the airflow really builds up. The nozzle has moved away from the critical area long before.
This is especially true for external berd-air part coolers, where the airflow is spot-on, but the pump is far away. -
@o_lampe Cura has a fan lag value, and I think prusa slicer (or at least super slicer version) has that as well.
-
Hey,
has there been any progress on the Firmware side that would allow me to have the functionality described in my first post? I saw that it is now possible to have a M7.g macro file in the system folder that is executed whenever a M7 is called. Would it be possible to do the same for M106?
At the moment, I am using daemon.g to control my stepper motor actuated air valves. But since the deamon.g is only called every 10 seconds, the fan control is always delayed.
deamon.g if {fans[1].requestedValue} + {fans[2].requestedValue} > 0 M106 P0 X0.55 H-1 ; increase blower power and disable temperature control G0 A{fans[1].requestedValue*10} F4000 ; open valve A with stepper motor on axis A G0 B{fans[2].requestedValue*10} F4000 ; open valve B with stepper motor on axis B else M106 P0 X0.5 H1:2 T80 ; reset blower to temperature controll G0 A0 F4000 ; close valve A with stepper motor on axis A G0 B0 F4000 ; close valve B with stepper motor on axis B endif
Cheers Max
-
@maxgyver hi Max, you can't override built in gcodes with macro files.
You can speed up the execution of the fan control in deamon.g by putting a while loop (with a wait of a second in it so it does not run continuously!).