1064nm IR+20/40W + Lightburn Guide

With the new IR laser coming out, I figured testing and guides would follow. Lucky enough, it seems with minimal tweaks, Lightburn works with the new IR just fine. :slight_smile: So here’s a guide on setting it up fully with Lightburn for auto-focusing and accurate results. Note; while I don’t have the 20/40W lasers, this guide SHOULD work for those as well. CONFIRMED WITH 40W I tested both USB connection, and using my Drag/Drop files

I - Gathering Information

You’ll need to find out homing placement, focus height, and cross laser offset.

1: Home the machine and take a picture of the screen. Save the Machine Coordinates.
(please ignore the control screen being for 3d printing, I did this before installing the firmware, but the data is fine)

2: Set the focus bar directly on the bed in the center and note the Z coordinate again

3: Subtract your focus Z height from homed Z height.

334 - 56.3 = 277.7 on my machine. Keep this handy.

4: IMPORTANT In settings > 2W Laser > Cross Line Indicator Offset, write down these values and then set them both to 0

II - Set Up Lightburn

1: This is mostly going to be in images, but start by creating a GRBL device with an X of 320 and Y of 350, front left, do not home on connect.

2: Device settings should look like this;

3: On the Gcode tab check to emit S-value and the header/footer.
Screenshot 2024-05-26 065822

4: You can start with my start/end and adjust as needed to zero in your own origin.

Start

M106 P0 S255
M1010 S3 P100
M1010 S4 P100
G28
G90
G54
G92 X-24.8 Y346.6 Z277.7
M3 S0

End

M5
G0 Z276.7 F6000
G28

5: You will mainly have to modify this line from the start; G92 X-24.8 Y346.6 Z277.7 Modify the Z277.7 to whatever you got from I - 3.

III - Finding Your Origin

1 - In lightburn, make a little 10x10 square and put it 20x20 out in the field.
Screenshot 2024-05-26 065631
Screenshot 2024-05-26 065731

2: Set it as a line engrave, and adjust speed/power appropriately depending on the material you’re using. I’m using an anodized aluminum card.

3: Make sure to set material height and absolute coords
Screenshot 2024-05-26 065657
Screenshot 2024-05-26 065717

IV - Run Your Test

1: Line up your material in the front left corner and secure it

2: Run the program and let it engrave.


(ignore the fact it’s off the front by about 0.5mm, I bumped it before taking the picture)

V - Calculate and Refine Results

1: Measure the distance from the left side to the square, and front to the square. It should be 20mm. If it’s different, take your result and subtract 20 from it.

2: Modify the start line G92 X-24.8 Y346.6 Z277.7 again. Take whatever your measurement results were and add/subtract to the X/Y values.

3: Adding to X moves Left, Subtracting from X moves Right.

5: Adding Y moves Down , Subtracting Y moves Up.
Sidenote; at least on my machine with the fast-homing, Y seems inconsistant and results can skew upwards to ~0.5mm (running the same file without change ontop of itself exposes the drift well). YMMV

6: Repeat Section V until dialed in to your own requirements.

VI - Enjoy Your Laser

1: Feel free to ask questions and comments

2: Experiment on your own and answer questions if you can

3: Share your results so everyone can see :slight_smile:

I hope this guide is of use, and if anyone can test the guide with the 20/40W lasers and confirm it does work, please let me know!

9 Likes

Is the assumption in this guide that we’re directly connecting LightBurn to the Snapmaker? Or should this work from exported g-code?
I went through this process and when I loaded the g-code into the Luban to send to the Snapmaker it showed the print going way of of bounds

This works with Lightburn connected. I have do the same thing with the 40W laser a few weeks ago.

I don’t know what the laser do with the G-code if you load the file on the controller and start from touch screen.

It works directly connected, or if you export it and use a sender to start it like my drag/drop script. It doesn’t work from the touchscreen because the header setup is to bypass the entire process of setting focus, origin, etc manually and is instead fully automated.

To use the touchscreen, remove the start/end gcode and change the origin to user origin instead of absolute coords.

2 Likes

CONFIRMED THIS GUIDE WORKS WITH 40W

I finally managed to snag a 40W and used this guide to set it up like a new user. My final G92 ended up being at
G92 X-16.4 Y345.3 Z252

This sets the bed as 0 focus, and aligned with my 10W corners (which is 9mm off the front). So to square to the bed exactly, you’ll be around G92 X-16.4 Y354.3 Z252 so you can use that as a starting point and adjust correctly. :slight_smile:

1 Like

Are these value with/without bracing kit and with/without quick swap?

With bracing kit and quick swap I have
G92 Z216.4
G0 X-1.5 Y-30 ; is left front corner.

Without bracing kit or quick swap.

How do I figure out the focus z-height on a 10w laser module?

It should be 30mm, however, the easiest way to test (and similar to the focus bar method) would be to;

1: Do the platform height calibration.
2: Make a mock job and either send it to the machine or USB drive.
3: Start the job on the touchpad and choose manual thickness.
4: Touch the 10W laser to the platform and hit next.
5: When the laser moves up for you to set origin, tap the back button all the way back to the home screen.
6: Read the machine height from the control screen, that should be the Z height you need to subtract from your home height. :slight_smile:

1 Like

Thank you, I ended up having to use G0 instead G92 in order to make the machine move to what I figured out is my 0/0/0 starting and best focus height
M106 P0 S255
M1010 S3 P100
M1010 S4 P100
G28
G90
G54
G0 X10 Y-7 Z30
M3 S0

Does anyone know why it is running the GCODE twice? Everything is set to single pass, is it because I am G0 instead G92?

The nature of the new style header is to remove unnecessary movement. Replacing G92 with G0doesn’t help, they’re completely different commands.

G92 sets origin
G0 is a linear movement command.

My 10W header is this;

M106 P0 S255
M1010 S3 P100
M1010 S4 P100
G28
G90
G54
G92 X-24.8 Y348.3 Z304
M3 S0

It’s setting the home position at specific locations so when I use G0 X0 Y0 Z0 it’ll move to 0,0,0.

1 Like

I ended having to do the G92, your reply confirmed im on the right track. my next issue is when framing the laser head it doesn’t come down :confused:

so far I am:
G92 X-27 Y340 Z289
and
image

“Start from absolute coordinates”

I’ve never used the framing, but you’ll have to bring down the laser head yourself if you want to frame. In the console, input G28, hit enter, then G92 X-27 Y340 Z289, followed by G0 Z# where # is the height of the object you want, then try framing again.

1 Like

Plopping my new alignment corners here, a bit more reliable than what I was using.

I have tried this guide a few times and can’t get it work. I am using an Artisan with the 40 watt laser. the G92 command in the Start GCode seems to do nothing. This is the Basic Setting.


I have reduced the Start Code to:
G90
G92 X-.8 Y399.6
M3 S0
and End GCode to:
M5
G28
The Device was created using GRBL. I have multiple laser devices created (trying different settings). The GRBL that I created following the guide doesn’t return the position when clicking Get Position button. The Snapmaker Marlin does.

I have another Laser created using Snapmaker Marlin and it works better for moving the laser around, but when you try to run a job it never starts and says the laser is busy.

Any help would be greatly appreciated.

Why have you reduced the start code? Without the initial homing sequence, the G92 will set wherever the toolhead currently is at the location in X/Y you have. The purpose of the header sequence is to make a fully repeatable origin to ensure accuracy.

Also a lot of the buttons will be broken using GRBL simply because the system technically isn’t GRBL, the generated programs just work and are cleaner than using Marlin. I never use the movement buttons or anything, as they’re not needed with my setup.

This is a line length issue. It creates a thumbnail code, but the line length is too long to send over serial, which causes it to hang. I discovered and documented that here:

1 Like

I removed the start code to simplify it and because the G92 was not working.
I now have a working solution. I am using Marlin with a Start GCode of:
M106 P0 S255
M1010 S3 P100
M1010 S4 P100
M3 S0
When I want to run the job, I have a Saved Position (which I called Start) that moves the laser to the correct position. The job is run using a Start From of Current Position.

The one thing I forgot to add was to solve the Busy issue, I switched the Device Baud Rate to 115,200 and Transfer Mode to Synchronous.

Has anyone tried setting up/using the Snapmaker provided Lightburn profile for the IR laser?

snapmaker2.0-2w(1064nm)-v1.zip (1.4 KB)

Glad you figured out a method that works for you, basically what my header was doing was setting an absolute coord home to fully automate it.

115,200 is correct, I don’t use a USB so I never set that correctly. Synchronous works since it sends each line and waits on an OK response for each line, whereas buffered attempts to keep the movement buffer full, and is faster for heavier code (since the controller isn’t waiting for a response for every single line).