Lines not aligned when using laser

Hi, first of all thank you for sharing this amazing project! I have been using my MPCNC Burly for a while now, and it has been working great as a CNC mill with a spindle.

A week ago I received a laser module and mounted it to the MPCNC, but I am having problems with the alignment of all the lines. Even the lines of the laser focus script are not aligned. When using the machine as a CNC mill with a spindle it was working perfectly fine. I already tried tightening the belts, but that unfortunately didn’t solve the problem.

I am using the marlin fan control to control the laser using pin 44. Maybe this has something to do with it (order of execution of the gcodes)?

Here are some pictures:

I hope someone can help me.
Thanks in advance,
Ryan

Lasers turn on and off virtually instantaneously. Spindles take a bit of time to settle into their set RPM whenever a start/stop or RPM change is commanded.

I think what you’re seeing is over/underrun of the laser as the intensity changes because the firmware is expecting that a spindle is connected. Look for a “laser mode” setting. This is easy to do in grbl with a single $ command , but I don’t know the specifics of doing it in Marlin.

Thanks for your reply. I still don’t really get how that would cause this. For example, for the laser focus script, The gcode contains 10 times the same code to draw a line. All lines should start at the same x position (since the gcode is the same), but they still start at slightly different positions.

Greetings,

I had a similar problem and was able to solve it by making a modification at Marlin.

I am enclosing the publication that solved my problem, I hope it will also solve yours:

1 Like

Thanks! I will definitely try that. Do you have any idea why that solves the problem (I’m just curious and wanting to learn)? Also, how do you control your laser? With fan control (m106) or m3 commands?

It would increase the frequency at which the check is made. If it checks more often, then it is able to react faster.

I don’t know why this modification solves the problem, but in my case it does. I also don’t know if this modification affects anything else. But my machine does its job well, both with the laser and the milling machine.

I control the laser with M106 commands.

A greeting, and anything, here we are, I hope it solves your problem.

As a picture is worth a thousand words,… here you can see the impact this modification has on the result in a single gcode.

2 Likes

Thanks again! It solved my problem!

2 Likes