Full Lightburn Control Guide

I do not have a FB, you can always upload it to youtube as a private video, or google drive and link here.

EDIT: OH! I did another test. I had some extra slate coasters laying around, so I wanted to see how fast I could go with the 1.6W (since I’ve only use the 10W on slate). Aaaand I was surprised. I tried a conservative 1500mm/min @ 100% power with the 1.6W and they came out perfect. Slate just lasers so cleanly and quickly, I’m going to have to buy more. :slight_smile:

1 Like

Try this link:

The old jittery stop and go of Luban dithering, I do not miss that at all. :slight_smile: At the same time, if it was the same exact gcode, it should be stopping for every pulse. There’s a dwell time for each dot, unless this was done in lightburn originally.

The SM2 was running from Lightburn via usb and the SM1 was running from exported gcode from the same file on a usb drive.

That would be a difference then and more understandable. I’m sure the original likely runs on a flavor of GRBL. See if you hook up via USB and type $$ or $I to see if it spits out any GRBL info. Maybe test a true grayscale image as well on scrap cardboard or wood. (maybe even just on the bare aluminum and see if the laser power varies)

I also get the same results running both via USB from the same computer running concurrent instances of Lightburn, same file and settings.

Thanks for putting this all together, but I’m so confused about how you deal with z origin. I followed the guide, but it almost doesn’t mention z at all. Unfortunately smashed my 10w into the bed pretty hard a few times already trying to figure it out. There seems to be no logic to how z machine origin or z work origin are saved. I can get material thickness from the api, but what difference does it make if the laser or snapmaker doesn’t know what the z starting point is?

When you do the calibration to get your laser height (displayed on the home screen of the touchscreen) that is “technically” Z0. The focus height of the laser, as displayed, has the focus point directly on the top of the laser bed. That’s how even Luban figures out how to focus the laser, it takes the laser height and adds the material thickness found either by the API, or manual input.

G53 ; Changes to Machine Coords.
G0 Z23 F6000 ; IMPORTANT, the Z value here is your LASER HEIGHT on the touchscreen.
G54 ; Changes back to Work Coords
G92 Z0 ; This sets Z Work Origin to 0, making your laser height as 0.

This bit moves the toolhead to the laser height (should be off the bed so it doesn’t crash), changes to work coords, and then sets Z0 for the machine (focus is at the laser bed). For my 1.6W laser, it’s Z23, for my 10W laser, it’s Z30. This is what sets Z0, so Lightburn can add the material thickness to it, like Luban does. Since it sets the laser height as Z0, when Lightburn puts G0 Z{material height} it’s moving the machine to the laser height + material height, so that focus is ontop of your material.

As a test, turn the machine off, then turn it on and home the machine. Connect via Luban and in the console on the left input G53 then Enter Then G0 X160 Y175 Z30 (if the laser height on your touchscreen is different, use that for Z). This will move the toolhead down near the center of the bed, about 10mm above it. The 10W laser should be fixed focus (so I’m going to assume yours matches mine), which oddly enough is about 20mm back from the end of the shroud. So when engraving, you you have 10mm between the shroud and your engraving object.

The most important part is using G53 to use machine coords to move to the Z origin, otherwise the machine is going to use wherever Z was on the last material you used. Keep in mind Machine coords, and Work coords, are two completely different things (you can see them in the control section on the right in Luban). G53 tells the machine to use machine coords, while G54 tells the machine to use work coords.

1 Like

That’s super helpful thanks @Skreelink ! my z should have been z38.80 in the gcode as I have a quickswap adapter under the bed. Also figured out that I hadn’t been using the standard calibration target which is different than the calibration card. (I bought my snapmaker used.) Got the z height going and now I need to figure out the x,y offset.

1 Like

Super excited to get this working as I’ve had really inconsistent results with the standard firmware and lightburn. Seems like blacks turn to whites above a certain speed and power, but that also isn’t consistent. Hopefully, this custom firmware will let me engrave faster than 800mm/m

My standard engrave speed is 2000mm/m, and only really go lower on a few materials. Hope it helps you make awesome things. If you need any other help, just ask.

1 Like

Getting some really promising results at 2000mm/m on wood and tile. This Firmware seems to really unlock the capabilities of the 10w laser. I’m able to get a very clean Norton white tile image at 2000mm/m with 45% power. That’s more than twice as fast and as powerful as I was able to go with the stock firmware and the 10w. Kinda wondering why snapmaker hasn’t fixed the firmware to work like this with lightburn themselves. Seems like they’d be able to compete much better against newer and much faster lasers from Xtool etc. Curious how you figured out what to change @Skreelink? Really well done in any case.

I’m just building on what others have found and mixing it together with my findings. :slight_smile: It’s the results of many users here.

1 Like

Thanks for the guide, it’s exactly what I was looking for.

Also, any chance you could post a list of the actual changes you made to the controller firmware or the source so they can be repeated for updates in the future?

Here’s the source, the inline changes have been merged. However, another merge created another issue.

I reverted this commit, since it made transverse lines (when it moves from one cut to another with the laser off) by ignoring I S0 to turn the laser off. It kept the laser at full power when it should have been off. I tested I S1 and the laser turned ‘off’ (minimal power so it didn’t burn). Then I reverted the commit, and it began respecting I S0 again.

TLDR; Revert the commit listed above, as it created a dangerous situation, then build from source as normal. The main inline commits are already merged.

EDIT: Here was one of the tests I was doing to find which commit broke the I S0 response. This is the exact same gcode ran twice, except the top one has I S0 and the bottom one has I S1. I ran this test again after removing that commit, and it gave the lower result as expected.

1 Like

Thank you for this guide.

However I have a problem. I’m using a A350 and the 1.6w laser. I’ve followed your guide and updated the firmware and your update and configured Lightburn as described.
However when I start my lasering project the machine homes as it should but the laser head stays at the highest point on the Z axiz whilst doing the lasering.
Can you please tell me where I’ve gone wrong.

Regards
Graeme

Can you paste your gcode header? Sounds like it isn’t setting the Z origin.

This is the GCode header copied from my Lightburn setup and was originally copied from the tutorial.

M106 P0 S255 ; This line is spit out by Luban and Snapmaker settings in Lightburn, so I include it.
G28 ; Safety home, incase you forgot after power on.
G53 ; Changes to Machine Coords.
G0 Z23 F6000 ; IMPORTANT, the Z value here is your LASER HEIGHT on the touchscreen.
G54 ; Changes back to Work Coords
G92 Z0 ; This sets Z Work Origin to 0, making your laser height as 0.
G0 Z300 ; Moves the toolhead back up out of the way.
G53 ; Back to machine coords!
G0 X2 Y0 F6000 ; IMPORTANT, this is the offset you found following my laser guide!
G54 ; Oops, we’re back in work coords.
G92 X0 Y0 ; Yep, we gotta set 0,0 on X,Y as well!
M3 S0 ; This is a safety line, it brings the laser online at 0 power, basically a ready state.

The header is correct (assuming your laser focus height is the same as mine, and X offset). You can remove all the words after and including the ; on each line.

Are you running via usb in lightburn? After a fresh reboot of the machine, go into the control screen, let it home, then take a picture of the coordinates on the screen please.

I use usb connection with Lightburn. and heres the image of the controller screen