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

First you need a 9A power supply…6A for the steppers and the control board and another 3A for your laser [and you see caught that by your edit]. I just use a separate power supply for my laser, but in this configuration, you need to make sure you connect both a PWM pin and the ground pin to the control board. The laser control board needs to share a ground with the control board.

So if I use PC9 as the PWM or “laser pin” there’s no firmware changes needed?

No changes needed assuming you are running a newer version of the V1 maintained firmware. I think laser support was enabled around version 509.

What’s the gcode in that case for laser power?

In this configuration, the S parameter of the G0 - G3 g-codes is used to specify laser power with a range of values of 0 to 255. The first post in this topic contains a g-code file you can use to test your laser. In addition I’m 99% sure that M3, M4, and M5 g-codes are also enabled. I don’t have an SKR Pro board, but I believe that the laser items on the TFT display work, and I know the laser menu in Marlin mode works (though the wording is strange).

Do I still need to pull PC9 down?

I doubt it, but you will need to check. Try your setup (with your glasses on and the laser pointed in a safe direction). If your laser gives a brief shot at startup, then you will need to pull the pin down. I did not have to install a resistor for my laser on the Rambo, but every control board and laser board combination is different.

Edit: The SKR Pro is a 3.3V board, so PC9 will be 3.3V, not 5V. Most PWM devices that are designed for 5V PWM can be driven by a 3.3V signal, but not all. I suspect you will be just fine, but if you have issues, this might be the cause.

4 Likes