Laser module : intial configuration and testing

For reasons unbeknownst to me, I set up the laser toolhead and bed for the first time today, and gave it a go. Everything went OK, which doesn’t seem to be the case for everyone, and I thought I’d give a brief summary of my steps, as well as ask a couple of questions.

To begin with, I just followed the manual. Everything went well, even though I used scrap birch underlayment and MDF instead of the material that came with the SM2 (it was under a lot of stuff, and I am lazy). To set the laser height, I used the calibration card, sliding it under the laser and moving down by 0.1mm increments until the card no longer slid under the laser (which should be “barely touching”). The auto-focus bit printed a nice set of lines, the camera failed to find the best one, so I chose it manually ( a quick note here: initially I used the calipers I already had out for 3D printing to find the thinnest line, but later I switched to a method proposed by @brent113 where you look four lines to either side, and select the thinnest line where those two lines are closest in width) (second note: turning off enclosure and shop lights, and adding a direct light from an LED, did not cause the camera to start detecting the line). For calibrating the camera, I clipped a piece of paper to the print board, and while it laid out a nice square, the square did not cut all the way through. Ah well.

Now, onto the Luban bit. Connect to the Snampaker, go to the Laser workspace, and grab the camera image. This showed me about 9 copies of the same corner of the workpiece, so I hit ‘calibrate’ and drew the square very carefully (the lines on this should really be bright red, not faded blue) and saved that, then went through the capture process again and confirmed the now-perfect representation of my MDF scrap. All good.

So, I’m pretty bad about not doing the recommended projects. I still haven’t printed a benchy, mostly because I don’t like the look of the thing. Looks more like a Happy Meal toy than a calbration tool. At any rate, I wrote an openscad file 20mm-scale.scad :
20mm-scale.scad.gcode (1.1 KB)
(seriously? I can’t even name it .scad.txt?!?)
This is a simple 20mm scale, with a long mark every 5mm and a small tic every half-millimeter.

It took about three iterations to determine that the work origin set by using the camera was not that accurate (I didn’t really expect it to be), and to nail down the optimal laser power. Here are the final results (and the intermediates as well):


The thick marks are 100% laser; I went from there to 25%, 10%, and then 5%.

The two on the left by the (actual) scale measure correctly and are the result of two different work origin techniques. The first, which didn’t work: I put painter’s tape along one of the laser bed ridges, then went into touchpad Control, enabled the Laser (5% power) and jogged it 0.05mm at a time until it was half on the ridge, half off it (i.e. a vertical line down the side of the ridge), then saved that as the X work origin. I then lined up the workpiece against this blue-taped ridge, and positioned it in Luban directly at the work offset. As you can see, it was a millimeter off.

For the next attempt, I used Luban to enable the laser, jogged the laser to the edge of the workpiece (same method as with the ridge, aiming for a vertical line down the edge of the MDF), and saved that as the Work Origin (again, using Luban). This worked like a charm.

Now, on to the question. Here is the DXF I generated from OpenScad:
20mm-scale.dxf.gcode (19.9 KB)
When I add this file to a workspace in Luban, it shows up as a roughly 1mm long (X-axis) object, which I then have to scale to 10mm. These sizes are complete off: when scaled to 10mm, the object lines up with the 20mm grid line in Luban (which should have happened when loading it). SVG is even worse.

Aside from “don’t use Luban, use LightBurn”, what’s up with this? The DXF appears to be unitless, and the SVG has the correct size encoded (and loads just fine in Inkscape). Is there a more accurate way to import a small-features design into Luban? Or does Luban just sorta shrug its shoulders and say, “well that’s pretty small, let’s call it an inch and go home”?

It’s easy enough, though tedious, to determine the correct scale factor for an image like this by trial and error, but for any reasonably complex design this will not be all that accurate.

1 Like

Update: Just saw https://forum.snapmaker.com/t/what-file-format-for-luban-laser/10230/10 which discusses exactly the same problem with wrong-sized imported objects.

One other thing I forgot to mention about the DXF/SVG import: regardless of the orientation in OpenSCAD, the primary axis is aways the Y axis when importing into Luban. This means that regardless of whether the scale is created along the X, Y, or Z axis in OpenSCAD, Luban imports it with the scale running along the Y axis, requiring a rotation. Not a big deal, but unexpected and yet another thing to deal with when resizing and positioning. Will attempt a luban upgrade to see what’s up, as this appears to be fixed: https://github.com/Snapmaker/Luban/issues/943

Luban does exist a bug that will cause the incorrect size issue when import the SVG or DXF file. We are working on fixing this issue. Also, you can try the lightburn for a better result.

Something else that may be of interest for laser users.
I cut the same 20mm scale into clear acrylic: painted the acrylic with that spray-chalk used for painting soccer goals and such, used 25% power and 2 passes of 0.4mm depth. The thickness of the lines makes me think I could have used 5% power here as well. Also, I should have mirrored the scale so it would read well through the smooth side.


The acrylic was just some scrap lying around - the melted ends are from the jigsaw I used to cut it, not from the laser.