Laser Frustrations and bugs

Hi folks,

I had a project where I mixed 1.6W laser, 10W laser and 40W laser, and I had a lot of setbacks and frustrations, which I decided to investigate a bit further. Here the results - spoiler: Inline power implementation for the 10 W is buggy, and trapezoid power implementation is not working or buggy.

First test: 1.6W laser (5000 mm/min, 100%):

From left to right:

  • Lightburn, 10% oversan, bi-direcional line fill, constant power
  • Lightburn, 10% overscan, uni-directional line fill, constant power
  • Lightburn, 10% oversan, bi-direcional line fill, inline power
  • Lightburn, 10% overscan, uni-directional line fill, inline power
  • Luban, 10% overscan, constant power (bi directional, cannot be changed)
  • Luban, 10% overscan, inline power (bi directional, cannot be changed)

On constant power, the laser slowed down at the edges, and trapezoid power does not properly compensate. You get deeper burns at the edges.

Now: 10W laser (5000 mm/min, 50%)

From left to right:

  • Lightburn, 10% oversan, bi-direcional line fill, constant power
  • Lightburn, 10% overscan, uni-directional line fill, constant power
  • Lightburn, 10% oversan, bi-direcional line fill, inline power
  • Lightburn, 10% overscan, uni-directional line fill, inline power
  • Luban, 10% overscan, constant power (bi directional, cannot be changed)
  • Luban, 10% overscan, inline power (bi directional, cannot be changed)
  • Luban, 100% overscan, constant power (bi directional, cannot be changed)
  • Luban, 100% overscan, inline power (bi directional, cannot be changed)

Trapezoid problem is the same, but in addition, the edges, when using inline power, are not straight any more. The laser turns on and off at the wrong positions. I assume they botched the inline + trapezoid implementation…
Good: With more offset you can compensate for the burnt edges in constant power mode…

Finally, 40W laser (5000 mm/min, 10%):

  • Lightburn, 10% oversan, bi-direcional line fill, constant power
  • Lightburn, 10% overscan, uni-directional line fill, constant power
  • Lightburn, 10% oversan, bi-direcional line fill, inline power
  • Lightburn, 10% overscan, uni-directional line fill, inline power
  • Luban, 100% overscan, constant power (bi directional, cannot be changed)
  • Luban, 100% overscan, inline power (bi directional, cannot be changed)

You can’t see it well, but with 10% overscan again burnt edges, so trapezoid still broken.

Conclusions:

  • 10W Laser with inline power will spoil your results
  • When using scanning techniques (line fill, photos…) make sure to have enough overscan activated if you use constant power mode
  • When you use anything like ā€œon the pathā€ or Lightburn’s offset fill, you’re screwed: With trapezoid power not working properly, the speed changes of the laser with complicated shapes will cause inconsistent engraving depths. This is painful, as it takes away a lot of use cases!

I guess I’ll bother support with that - they need to fix these bugs.

2 Likes

And here’s an update: Turns out I’m wrong after all regarding Trapezoid power!
I asked in the Lightburn forum if the offset fill job setup could be modified so that at sharp corners I get overscan. This led to a bit discussion, which finally let me understand how things work - I seem to have been exeptionally obtuse here not understanding this earlier:

  • Constant Power Mode means laser is started with M03 - and this actively switches OFF trapezoid/s-curve power
  • Non-Constant power mode starts the laser with M04 - and this activates the power compensation
  • Inline power is just independent from that. ← It is a beast of its own, and I need to test this separately. It is neither M03 nor M04, but the G1 command include Sxxx - and if this properly uses trapezoid power I need to test - later… EDIT: See below - no trapezoid power with inline power :frowning:

Now comes the mean part which made me despair: Lightburn Snapmaker profile has a bug - regardless if I select constant power mode on or off in Lightburn job setup, it always issues M03, i.e. constant power in the GCode! And that lead me to believe trapezoid power is faulty in the Snapmaker implementation. I apologize for my wrong accusation!

Some people say (incl. Lightburn support): If you have issues with the Snapmaker profile, use GRBL profile, works just fine (it, e.g., addresses the problem with Air assist). So I tried GRBL - but this then has a problem with my much loved offset fill job setup - the laser turns off after the first move.

Long story short: I will do three things:

  • Try to convince Lightburn to correct the Snapmaker profile for this plus air assist
  • As long as the bug is there run a search’n’replace over Lightburn GCode to replace M03 with M04
  • Reveisit this test here, as my interpretation of the results may suffer from the Lightburn bug: Laser Inline Power processing slow?
    EDIT: I guess I should also revisit PCB etching with the 2W… would suffer from the same bug… Huh, lots to do the next weeks…

What remains is the problem with the 10W. This also is visible with Luban generated GCode.

Finally, here’s a picture of my tests:

  • Top row - unmodified Snapmaker profile output: First: Square, offset fill, constant power OFF, next: Square, offset fill, constant power ON, next: Square line fill, constant power OFF, 5mm overscan
  • Middle row: Same setup, but GRBL processor
  • Bottom row: Same setup, Snapmaker processor, for second and third square manually replaced M03 with M04 → Success!

2 Likes

Quickly did the Inline-Power-test: No trapezoid power with inline power :frowning:

Hi Snapmaker, would be great if Inline would use trapezoid!

1 Like

With newer Snapmaker Firmware you do need to use the GRBL Device Profile.

The ā€œSnapmaker (Marlin)ā€ Device profile was made for older Firmware versions when they were still Marlin-based.

Snapmaker posted newer .LBDEV files here.

These device profiles have an error:
You must activate ā€˜Emit S Value with every G1 Command’ in the Device Settings:

See this post for more info:

2 Likes

I got some interesting results for you. :upside_down_face: I was going to do a test of using G0 for overscan, and decided to rerun the test with M4 as well just to see what the hell. For reference; I’m using GRBL-M3 in Lightburn for this test. It seems doing a find/replace of M3 to M4 using this profile actually works fine. However, the regular GRBL (no M3) with variable M4 mode does not. :thinking:

Anyway the results! I purposefully ran the power a little light so variations in power would show up better. 0.5 fill to identify each line, along with a line mode for an outside trace. This is with a 10W.

Bottom left; Regular M3, no G0 for overscan.
Bottom Right; Regular M3, G0 for overscan.
Top Left; M4 swap, no G0 overscan.
Top Right; M4 swap, G0 for overscan.

That top left with M4 looks pretty clean and even. Bottom left was pretty much as expected for M3, corners a bit darker, but otherwise good. The G0 for overscan in the bottom right was a bit of a shock… why are the edges darker. However, both M4 results look decent, and the very tips of the corners seem to fade slightly, so the power is pulling down a smidge as it should.

1 Like

I’m surprised that the M3 squares look differently. I would have expected the left bottom to look the same like the bottom right, as the laser should accelerate and deccelerate at the edges in both cases.

Would you mind to share the GCode? Would love to understand this…

Original, M3 without using G0 for overscan.
M3NoG0.nc (2.1 KB)

Exact same, just flipping the G0
M3G0.nc (2.1 KB)

And search/replace M3/M4 versions of both
M4NoG0.nc (2.3 KB)
M4G0.nc (2.4 KB)

2 Likes

Thanks again Aaron for pointing me to Snapmaker’s profiles.

If you do not want to connect via Serial but just export GCode and transfer it, and if you use absolute coords, you may even use the 40W profile, switch off the laser offset, you can use one profile for all lasers. The GCode is basically interchangeable between all Snapmaker laser modules.

In addition to the ā€œEmit S valueā€¦ā€ change, the Snapmaker 2.0 profiles state a work size of 400x400 mm - that’s the Artisan size. But this is easily mended via Edit Device.

Here’s the GRBL test (same job setup as in my second post) with 1.6W, 10W (bug still there - Snapmaker ticket open), and 40W (Air Assist working):

Not perfect - but this is to be expected: the power compensation algorithm not necessarily matches the material reaction to the laser, which most likely will be something very non-linear. Thus with wood you get the white cross with offset fill. With other materials it might be better.

Oh, and last remark: The 2W IR laser profile from Snapmaker now adds Air assist (which does not make sense, as the 2W does not have Air Assist), but uses the Marlin base and has the M03 bug - M04 is not used - I discourage the use of that one…

Ah, I get the difference. In the ā€œNo G0ā€ variant, overscan is done by G1 commands with S0 - laser power 0 - i.e. inline power. In the G0 variant you switch laser on/off via M3/M4 - M5 and then do the G0. And that’s basically the ā€œoldā€ behaviour: With constant power and G1/G0 moves interchanging, the laser always stops on movement change.

Still, it inspires me to test if M4 + inline power would mean inline power with trapezoid if I only use G1 moves… Huh, will test later.