Starter with a home build led laser

I have a Home build CNC machine, en build a ebay cheap led-laser on it…
i adjust the power of the laser with PWM… and now I try to burn pictures in wood…

But ik can PWM my laser from 0 to 255… but if I make a picture in 255 steps… the first 64 steps do nothing, and after 128 everthing is black…

can I adjust that with lightburn?

and I just load the try version… but I don’t know what machine to choose?
it is normal g-code, and for the laser I use axis A— from 0 till 0,00255 mm

https://www.arjan-swets.com/hardware/cnc/Laser/laser_intro.html

In LightBurn only grayscale image mode will use variable power based on grayscale level. All other methods use various dithering techniques to achieve the illusion of variable darkness.

Your profile says you’re using Mach3. Is that correct? I don’t believe Mach3 is a supported controller for LightBurn. I believe Mach3 was forked from LinuxCNC at one point. It’s possible that you could try LinuxCNC and have it connect but really no clue about that.

Alternatively you could save Gcode from LightBurn and run it in an external tool.

I’m not sure I understand what this means. In what way is the laser associated with the A axis? Are you saying you’re using A-axis to somehow control PWM? LightBurn is likely going ot send an M3 or M4 to enable the laser for GRBL. There are additional variations for Marlin machines. Just checked and looks like LinuxCNC is sent M106.

Do you know if Mach3 takes any of these?

No I use the Axis…

normaly bij een CNC If you work, the z-as is moving up/down…
but now I use a spare axis to control the laser…
so I dir/step puls goes tot a Arduino…
the Arduino count the steps, and adjust the PWM signal to the laser

So I can adjust te Laserpower in 255 steps…
to set it like a virtual z-axis from 0 (is off) to 0,00255mm (is max on)

but I already thought Lightburn is not the software for this, but I lot of people say me to look at it…

I have 2 modes with my laser… ON/Off and the I use in mach3 M10 and M11 in the g-gode and I have a PWM mode, and use a step/dir output (like a normal stepper motor) to adjust the laser power… and that is working alright… but it is ehhh… with a led laser is not 0 white, and 255 black, and 128 grey… 0 till 64 is white… 128 till 255 is black, so I try to found a way to convert a 8 bit BMP in lets say 16 steps, but start from 64 till 128…

very difficult for me to explain it in English… :slight_smile:

That solution sounds very cumbersome. If you have an arduino have you conisidered adding a shield to it and and driving from there? Or getting a 32-bit board of some kind. There are a lot of solutions that I’m sure would be superior to and more flexible than what you’re doing now.

Yes, I have an Arduino, but that is not for controlling the Machine… But let it… All the (new) 3D print en (New) laser guys always know it better… :slight_smile: I’m running all for more than 20 years with Mach3, everything works… With dithering, like Lightburn I can also make a picture, I don’t know it is normal in the cheap laser world to use PWM lasers… and that people use their laser on (let’s say) half power to get a lighter color?

it is more for stuff like this:


so first mill the figure in wood and after that, a second toolpath to color the background, or eyes or or with the laser…

and maybe before you react look first to my homepage, to see what is the situation… : CNC 2 Laser

And I know from a lot of people (because they send me lots of emails) that they also want, on their CNC (mill) machine a led laser… because the Lasers are cheap, and it is fun… So they have already a mill CNC machine , and want also a laser on it… that’s where this is about…

but lightburn only works with on/off? no regular power?

but for people who might like to think along… Because I now understand that Lightburn is a no use for me? But it’s about the following… (forget the hardware!!) I can control the laser in 255 steps, from all the way off, to Max on… I have 2 modes on my machine, an On/Off mode , and that works fine, and I use it for DXF and other Vector files…

I can also use this by burning photos/images/bitmaps using the Dithering method.

Now I also have the 2nd method, and there I can regulate my laser power…
but the problem is actually, a laser is of course not linear. And that’s what this story is about…

If you look at the bottom at the white box, you will see a color bar that goes from white to black in 255 steps. (laser power)

but the laser does nothing from 0 to 64… and then I have an area, where you can clearly see different shades of gray, and beyond 128 it’s black…

so I’m looking for software that can divide a photo into for example 16 steps, where white starts at 64, and black is 128…


As an example, I moved the colors by hand in Paintshop-pro in this photo… and then the result is already much better…

Wow that looks great.
how do you actually do that???
what programs are you using???
just maga

as if it were a Litho Plane… In Artcam (cnc program) you can load a bitmap image, and say , black = 0mm, white=4 mm deep…
and then you can do things like this:



so with black you do not remove anything, so that remains dark, with white you remove 4 mm, and if you shine light through it, it becomes lighter…
so I’m making a toolpath like that, only the other way around… I say, with white you mill 0mm deep, and black 0.00255 mm deep…

and then instead of letting the z-axis go up and down, I use here for another axis… with which I control the PWM of the laser.

and it’s getting better…but just for fun looking at how i can improve my workflow so that it becomes easy to get a good result…

LightBurn can take full advantage of controllers using PWM. For grayscale images on g-code systems LightBurn will vary power for the entire grayscale image.

Typical power range for controllers outside of 8-bit Arduino is 0-1000. 8-bit Arduino solutions are normally 0-255. You can also choose a power band with min and max power and power will scale with grayscale within that band. It’s quite powerful.

But sounds like you have a good workflow setup now.

Your answer does make me think… maybe I can do something in the program in the Arduino… that I will work with a number that comes from the CNC controller, which runs from 0 to 255, but from there makes a 2nd number, which then goes to the pwm of the laser… That I divide 0 to 255 steps, which comes from the cnc controller, by 16… and then convert to the area where the laser works best … 64 to 128…

thanks… I’ll see if I can do something with that…

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