How-To: Modify Marlin to control a laser with an SKR Pro

I will try switching that, though I currently am running with a laptop directly plugged in running Lightburn. The gcode generation would be if I exported from Lightburn and run from the SD card correct?

Also, any Idea how hard I can run this laser? Can I run it constantly at 100% or should I try to live much lower as a general rule?

No gcode is always used, that is the only language marlin understands. If you run it from your laptop your streaming gcode commands to the device. If you run from an SD card, then your reading gcode from the card.

I can’t tell you how far you can push the laser. Alot would depend on heat dissipation and design of the laser.

1 Like

There should be a looks (charring) difference and some depth of cut differences. As long as you like the look your okay. Duty cycle on these things now is a lot higher than it used to be so no worries about that.

2 Likes

When I select inline in lightburn the laser doesn’t turn on.

when I try to do a line cut at 100% and 1200 mm per second the laser stalls out after a few moves, I assume I’m trying to run it way too fast. The thing is, I can successfully run a single shape, for instance an octagon. But if I try to do two letters in a text block the laser stalls out on the second letter and burns a hole through my board.

I just updated the marlinbuilder nightly firmware. Rambo and SKR Pro firmware are much better now. End of this, Lasers...revisted - #69 by jeffeb3

20mm/s for Rambo a little more for the SKR.

1 Like

I mean 1200 min/min LOL! I should be good on speed. I updated to latetest marlin builder firmware but I am running into a connection error through light burn where the laser gets about six lines into the cut and then just stops without turning off the laser.

Here are a few pictures of my setup where you can see my device settings as well as a video to show the connection error.

Any wisdom is much appreciated :slight_smile:

Export the gcode and run it from the SD card.

1 Like

Is your touch screen in Marlin mode, or in serial mode? Do you have both the 2 EXP cables and the 5 pin serial cable connected between the SKR and the touchscreen? I have a completely different setup, mine is GRBL with a serial only touchscreen, but I get the same issue when I run a job from Lightburn with the tft connected also. If I unplug the serial data lines to the touchscreen, it always works fine. Dunno if this helps, just thought I’d share my experience.

1 Like

The touchscreen is in serial mode, I have all three cables hooked up. I will try disconnecting one set tomorrow and see if that helps, thanks for the suggestion.

Saving the g code to an SD card and inserting it into the TFT burned correctly. I swapped cables in and out trying both modes separately but I could never get the job to burn correctly straight from light burn. It would be really nice to be able to do this though because it opens up a lot more functionality between the program.

1 Like

What about with no screen plugged in at all.

Pure guess on my part, just not sure why it doesn’t work. Maybe a driver is needed? Setting in the program, different baud rate needed? Different USB cable or port?

It turned out to be a setting in Lightburn. I needed to change my device settings from buffered to synchronous.

My first real burn!

8 Likes

Nice detail on those snowflakes!

1 Like

I got a NEJE 20W laser module for Christmas and have been trying to get it up and running. So far I have updated the firmware with the latest bugfix. I can get it to work fine with the M3 command but can’t get any of the files using the G1 and S power commands only.

The laser has its own 12V power supply and uses a TTL/PWM and GND wire for control. I have the TTL/PWM plugged in to the PC9 and the ground wire to one of the fan (-) screws although I am not sure if this is correct. Any ideas why it is not firing on the G1 commands?

The fan ground is on the 12V side, there is a ground right next to pc9. Lets see a couple dozen lines of your gcode to see if there are any errors…but you might need to start a new thread.

Thanks for the quick reply. I now have the GND on the pin to the left of PC9 and the TTL on PC9 It all still works the same way. Works fine with M3/M5 commands but does not turn on the laser when the S command is in the G1 line. The codes I have been trying are all the ones in this thread. If the gcode uses M3/M5 it works but any other code the laser does not turn on. For instance LB1 from the Laser.zip file in this thread. Not a big deal for anything I create myself but was not sure why it is not working for me when S is in the movement commands.

Using the newest nightly firmware?

What does your gcode look like?

I have test gcode on the Lasers revisited link a few posts above.

This works,
image

This Doesn’t