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

To clarify my question Ryan:

If I use your second option to download the latest skrpro branch.
Do I need to modify it further following Tuco’s instructions at the start of this thread to get the laser to work or is it ready to roll as is?

If it is ready to go as is, where to I connect the activate pin from the laser to the skrpro board?

The reason I ask is that this morning I downloaded the firmware and applied Tuco’s changes and I threw similar errors during compile as before.

Thanks

Yup as is.


Tuco picked a great spot.

If your current power supply can handle it (I bet it can). I have also enabled heater 2 to act as the enable pin, so on my laser power and ground go to heater 2 and the enable wire goes to that pin in the pic…super easy. If it is still plugged in I will take a pic…might be the rambo though.

1 Like

well poop, that is how I have it wired up. your marlin builder firmware loaded. the laser powered from the main power (not heater bed) spins the cooling fans on top of the laser extrusion and the laser driver board. I guess I don’t know what to do next.

In lightburn, I can move the primo gantry around fine but when I click test fire laser I get nothing. Is there another way to test it?

Just way to new at all of this.

Check in Lightburn Device settings to see what command it uses to fire the laser. It may be expecting to use M03/M05 by default. When connected to a repurposed fan pin I think you want M106/M107 selected.

(Take this with a grain of salt, working from memory and I don’t use RAMPS on my laser)

2 Likes

Thank you so much Tom!

It actually was the opposite of what you said but clicking the other option worked!

This picture shows where I ended up setting it.

I still barely know what I’m doing but now I have a laser that is firing so that can’t be good :slight_smile:

Thank you everyone so much for getting me to this point! I actually audibly let out a whoop when it finally fired for the first time!

3 Likes

Glad I was on the right track, even if I was facing the wrong direction.

3 Likes

I was watching the forum live notification letting me know you were replying and I knew help was on the way!

2 Likes

With the fan and that pin set to M3/M5, I would expect you to have to send M106 to turn on the laser at all, and then use M3/M5 in the gcode to burninate all the papers.

The way I use it with the heater port M3 does all the work, M5 is kinda broken at the moment no need for M106. There is a PR but it is not done. Actually you don’t even use M3 anymore, the Sxxx commands are inline with the G1 commands and that will enable (power up) and control the laser. Any G0 (or G28) will power it down. So you have to end your laser code with G0 anything. I use G0 X0 Y0.

3 Likes

Ah, that makes sense.

i thought you had switched it to the inline, that means that @droesch should switch his lightburn setting to the one marked “inline” so that it generates the proper Gcode.

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