Skr & laser?

Dan, I’m trying to get my Chinese laser to work with my SKR 1.1 board. Can you give me any direction on what you had to do to get the laser working with your 1.3 board? I know they’re different, but maybe I can use what you did to make mine work. And who knows how our lasers compare…


Dan, I’m trying to get my Chinese laser to work with my SKR 1.1 board. Can you give me any direction on what you had to do to get the laser working with your 1.3 board? I know they’re different, but maybe I can use what you did to make mine work. And who knows how our lasers compare…

I use the FAN port (the controllable one) to power the laser. Obviously heavier gauge wires than stepper motor wires. This allows me to use the fan control marlin commands to set the power of the laser (M106 S###).

This works until you get a super powerful laser that requires separate power control and then you have to use a different mechanism to set the power.

BL: You should just be able to use the fan port and then control via software.

Thanks for the quick reply, Dan. I did get the fan port working; I can see with my oscilloscope that it varies it’s output as I ramp the fan up/down. But it’s at 24v (my PSU output voltage), and I think I only want 5v? So I can just use resistors to build a voltage divider or a buck converter (which I have a handful of handy)?


I did a lot of trial and error. But the main things are so the TFT firmware most of the changes were more “cosmetic”. The SKR firmware for the main board took a bit more editing.

With that said, for the TFT most of the edits are in two main locations:

For languages I mostly edited in language_en.h
I found buttons I didn’t need and changed the language. This was based on what I saw on the different menu screens.

For Menus I edited the following boards:

  • Fan.c = this is the “laser” menu
  • Leveling.c = this is the screen for zero’ing everything (Job Setup). This is also a good screen to see how you can have the TFT run gcode commands based on button presses.
  • MainPage.c = the main page. Note I didn’t have it use unified menu.
  • Move.c is used but I don’t think I edited it
  • Printing.c = the page displayed when it use CNCing. I did edits to the menu but also spent awhile trying to get the stop button to convert to a back button upon completion. I probably should have committed that to BTT github. see lines 432 - 440 for an example of how the button function changes (stop vs back) based on what the CNC is doing. Lines 490-501 were modified to change to the back button.
  • Speed.c = I think I modified this to not allow “more” and just go back since we don’t need all the speed stuff for a CNC

In configuration.h I made sure that #define UNIFIED_MENU is commented out as is STATUS_SCREEN so it uses plain menus rather than the complicated ones. The complicated ones didn’t exist when I started and also appear more useful for 3d printing rather than CNC work.

Finally, edit the BMP images to match whatever function you want to use.

My laser wanted 12V (my CNC runs on all 12V right now) so I didn’t have to do any changes. As long as the buck converter reacts correctly as the M106 S### changes between 1 and 255 (255 is 100%) it should work to drop to the correct voltage for your laser.

Thank you Dan,
your explanation are always very clear. I’have started making cosmetic modifications today (eliminating extruder, bed, autolevelling menus) I will continue with your indications.

Probably @vicious1 we should move this infos in the SKR/Bigtreetech section of the forum in order to make it available and easily accessible to all the community.


Ok, so I did more reading, and now I’m more confused… :slight_smile:

My laser has two inputs. One is a TTL, and that one, I’m assuming I should keep at 5V. So I found a pin that I could control (PC9) with the M106 command. When looking at the output with my oscilloscope, I could see that it was varying the output of the pin from 0 to 5V, and was altering the “fill” range based on the range I gave it with the M106 command. So M106 P1 S1 gave almost entirely 0v, with a little bump up every so often, and M106 P1 S250 gave almost an entirely 5V signal.

But when I connected this to my laser, I couldn’t tell the difference from S1 to S255. Now, admittedly, the laser was stationary and pointing to a 2x4. I’d move the laser back and forth just to see what was going on, but there was no shut-off on the laser output, even at 0.

The other input is the PWM, and laser was shipped with a 12V PSU (like a small laptop PSU), with 2 wires fed from the PSU for this plug, and one separate wire. Does it make sense that I can just use the two pins fed by the PSU from my fan outputs, after I change that voltage down to 12V? So then I don’t even need the laser PSU that it came with? Is your laser connected to any external PSU?


I just use PWM to control mine through the fan line via the fan port.

My little laser doesn’t have a TTL. I have this one Banggood 2500mW laser

Did you just cut the wire and use the fan as the positive/negative? I don’t see a “PWM” connector on that one.


Yes. The specs are that the laser module can handle PWM signal via the positive/negative wire. I actually got other male/female ends for that cord so I can easily unplug it and put the router back on and then switch it back.

When I got it I put it on my tiny 3d printer. I would have likely gotten a bigger one now that I have an MPCNC to attach to. It has done a good job etching on wood and similar. Haven’t had success (or really tried) cutting.

One thing I noticed was that my TTL levels were only dropping down to 1V. Does that seem too high to register as “off”?


I think that is very laser dependent. On mine if I go from S0 to S005 (2%) it won’t really light up but if I go to 50% then down to 2% it will stay dimly lit.

Thanks very much for your help, Dan. I think I got it figured out tonight.

My solution feels kinda like cheating. But if it works and doesn’t blow anything up, that’s all good, right? I farted around with a voltage divider on my fan output to try to cut the voltage down from 24v to 12v, but then the different fan speeds didn’t seem to work well. Tried a buck converter, too. So in the end, I figured that my SKR 1.1 board could have multiple power supplies connected to it, for the motors, the main board, and the heated bed. So I took a spare barrel connector (the same one as the 12v PSU for the laser used), and used the laser PSU to power the main board at 12v. Now the fan voltage was easily controlled for PWM @ 12v, so I could hook it up directly to the laser.

End result, I can go from full power to totally off with S0 to S255, and nothing let out any magic smoke! Might find a better 12v PSU for the main board, but this one is working for now.


That is awesome. If it works it isn’t cheating :). Clever solution.

Hi there,
my name is Wolfgang and I’m from Germany, so please bear with my poor English!
I’ve had a K40 for a year and now want to convert it so that I can use lightburn. I bought the SKR 1.3 with display 12864 and stepper driver TMC2208. The K40 is the one with the digital display. Now I happened to find this topic here where it is exactly what I want to do. The control of the laser with the output for the fan sounds interesting! Can you help me with the implementation?



I’m actively editing the firmware right now to make laser more effective for my little diode laser. However, i don’t have a K40 to test but this tread: seems like a good place to start.

Sorry for the offtopic, where could I find láser protection glasses? I bought a cheap laser from ebay and I dont want to spend more in the glasses than in the laser, but I think that it is necessary to dont to be injured