Can I set up Air Assist with Marlin?

I have a 5.5w diode laser, running off of a SKR 1.4 Turbo 32-bit board. It is running Marlin on a 3d printer base.
The laser is controlled with M106 P1 Sxxx.
There is also a fan (object cooling fan from the 3d printer mode) that I want to use for air assist. It would be controlled with M106 P0 Sxxx.
I don’t see where I can set this up so not sure if it is even possible?

Thanks
Norm

And you control the output for each layer from the ‘Cut Settings Editor’ window (Double-click any ‘Layer’ in the ‘Cuts/Layers’ window to expose.)

Yes, but that doesn’t work with my setup. As I explained in my post, I need to control air assist with M106 P0 Sxxx. xxx=255 for 100% on, 0 for off. Is there a way of doing that? In Marlin, M7, M8 and M9 are for coolant control.

I had another issue noted in another thread related to M7/M8/M9. I modified the firmware as follows:
in Configuration_adv.h line 3000 - uncomment #define COOLANT_CONTROL
line 3003 comment out #define COOLANT_FLOOD (assuming you don’t have it.

in your pins.h file (my case with an SKR - pins_BTT_SKR_V1_4.h) add
#define COOLANT_MIST_PIN FAN0_PIN
I put it with my other definition that tells the firmware my laser is on FAN1_PIN.

So this resolved the other issue, but does not resolve the air assist issue. It activating air assist does nothing.
There should be a way to turn off air assist completely, or modify the command used to control it, just like the laser.

This is not supported for air assist in LightBurn - just M8 / M9. Marlin is so ridiculously customizable that it makes writing the UI for configuring it challenging.

Let me look at writing a patch for Marlin then. It likely will not make it in mainstream, but if it is ‘simple’ to do, it may help others.
Thanks
Norm

If this helps anyone,great. YMMV. This is a rogue change - change at your own risk. If you don’t know how to code or are uncomfortable with modifying firmware, don’t do it!

I modified Marlin in the following way to make Lightburn/M7-M9 to turn on and off the PWM Fan 0. On and off only, no incremental fan speeds.

In file M7-M9.cpp
Around line 29 add:
#include “…/…/module/temperature.h”

Around line 31:
#if ENABLED(COOLANT_MIST)
/**

  • M7: Mist Coolant On
    */
    void GcodeSuite::M7() {
    planner.synchronize(); // Wait for move to arrive
    //WRITE(COOLANT_MIST_PIN, !(COOLANT_MIST_INVERT)); // Turn on Mist coolant
    thermalManager.set_fan_speed(0, 255);
    }
    #endif

Comment out the line starting with WRITE(COOLANT…
Add the next line that starts with thermalManager…

At about line 53:
/**

  • M9: Coolant OFF
    */
    void GcodeSuite::M9() {
    planner.synchronize(); // Wait for move to arrive
    #if ENABLED(COOLANT_MIST)
    **/WRITE(COOLANT_MIST_PIN, COOLANT_MIST_INVERT); // Turn off Mist coolant /
    thermalManager.set_fan_speed(0, 0);
    #endif:

Comment out line starting with WRITE(COOLANT…
Add line starting with thermalManager…

Caveats: This only works for FAN0. I have the laser plugged into the neopixel pin on the SKR 1.4 Turbo board and assigned accordingly.

1 Like

Thanks for writing this! Should be really helpful for others using modded 3D printers as laser engravers. I just wired my laser control box to the part cooling fan PWM signal leads on the printer’s PCB so the fan spins whenever the laser turns on, at the same setting. Seems to work pretty well for the small stuff I’m cutting/engraving. I have a switch box to turn on and off the various diode lasers in my arsenal, so I can 3D print using the part cooling fan without worry of any lasers turning on.

It really depends on the board you have for your 3d printer. Many 32bit boards have multiple PWM pins that you can use, you just need to identify them as such. In my case I assigned the neopixel pin to FAN1 so I can use the standard M106 commands to control.
As for the fans for air assist, I have a modular system that allows me to pull out the hot end assembly and drop in the laser without affecting the Bltouch and part cooling fan. I love the fact that I can then probe the part I’m about to laser and put the laser at the exact same height each time I’m going to burn. I don’t need to refocus or anything like that. The part cooling fan as an air assist was a bonus.
Hope it helps someone and if anyone needs help, I can do that too.
Oz - if you need assistance understand Marlin, just ask too.

Norm

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.