Another laser

Hi Again.

Today’s topic is: Lasers.


I want to cut 3mm and 4mm plywood. Do I buy a 2.5w or a 5.5w laser? Will the 2.5w one be able to cut 4mm plywood?

And if I’m going to use the RAMPS 1.4 Controller do I buy TTL or PWM.


Are there any more things I should take in consideration (safety including)?

Do you know any good lasers on aliexpress?

If you’re cutting plywood, the diode laser is really NOT what you need. I’m not saying it can’t do it, you’re just going to have a lot of on going frustration.

I have a 4W laser. Great for engraving but I have not been unable to cut through any thickness of plywood. Recently ordered a 15W laser. I will let you know how it performs.

Buy TTL. It runs off a PWM pin from a RAMPS board.

Make sure you purchase the safety glasses for the correct laser wave length.

The problem with Diode lasers is the fact that you generally can’t focus the dot to be small enough. As I understand it… A diode laser goes up in watts by them adding more tiny emitters into the Diode. Those emitters take up more space so they create a larger beam. The focusing lens they use on the 3 watts and the 15 watts are all the same so you can’t make a 15 watt focus dot as small as a 3 watt dot. So what you are left with is nearly the exact same power hitting the same area. All the extra power you get from the 15 watt laser just gets spread out over a larger area so your cutting power stays close to the same. Sad but true. If you want to engrave then the smaller dot actually gives you a cleaner more crisp look.


Ryan has a really good write up on lasers.


1 Like

Yes this is a great article.


Kevin, whay is it frustrating? Is is that slow or are thear any other reasons?

Nice article. I hope it will be in the main menu of the site.

One warning - i’m not sure that you will be able control laser with m3 s0 - m3 s255 without additional tuning of marlin. As i remember there is a formula in the code to produce pwm value from S param and by default coefficients tuned for high S values suitable to milling motor.

I believe line 1574 clears that up, when we use a spindle we use a different command a few lines below and set the curve as well.

I have this page linked in a few places, electronics & how-to, not sure where else I should link it.



I can’t say that I know enough to talk about that but I do know that I read on one of the marlin forums that M3 S had a bug in it in Versions 1.7 through 1.9. The bug would cause about 300 microsecond delay to responding to new setting changes. So they were suggesting people use M106 S instead. I don’t know if it was fixed in version 2.0 or not. I do think that might be worth mentioning in Ryan’s Laser post. Just my opinion though. A 0.3 second delay isn’t horrible but it may cause some people to deal with problems they will never be able to figure out.

Edit: Looks like it was found in version 1.9 and 2.0.

[attachment file=83361]

[attachment file=83364]

1 Like

Well crap I will try and test that tonight but if the pwm switch is not what turns that on and off, the the fix is set speed power to 1, min to 0 and max to 255. Right?

SPINDLE_LASER_PWM just enables using PWM for spindle/laser

To directly set pwm value (128 as example) you have to use

M3 O128

It’s undocumeted feature of marlin. Check

SPEED_POWER_SLOPE is divider. In additional to 0 min and 255 max it should be 1.0. And this means you can’t use same firmware for milling (with pwm controlled spindle and “real” rpm in S) and for laser (where 0-255 is usual). Or have to use M3 O128 like commands for laser.

Formula is


int16_t ocr_val = (spindle_laser_power - (SPEED_POWER_INTERCEPT)) * (1.0f / (SPEED_POWER_SLOPE)); // convert RPM to PWM duty cycle
NOMORE(ocr_val, 255); // limit to max the Atmel PWM will support
if (spindle_laser_power <= SPEED_POWER_MIN)
ocr_val = (SPEED_POWER_MIN - (SPEED_POWER_INTERCEPT)) * (1.0f / (SPEED_POWER_SLOPE)); // minimum setting
if (spindle_laser_power >= SPEED_POWER_MAX)
ocr_val = (SPEED_POWER_MAX - (SPEED_POWER_INTERCEPT)) * (1.0f / (SPEED_POWER_SLOPE)); // limit to max RPM
if (SPINDLE_LASER_PWM_INVERT) ocr_val = 255 - ocr_val;
1 Like

Oh man that is too cool, Guffy you are my hero today!

I barely understand the code and would not have seen that unless you pointed it out. So they built in a workaround for teh equations. I actually think that little bit of code taught me a little more code as well.

Fixed the page.

And the sample above shows that code of the marlin sometime looks like it had been written by a kid :wink:

All their calculations could be expressed by a single line:

int16_t ocr_val = (max( min(spindle_laser_power, SPEED_POWER_MAX), SPEED_POWER_MIN) – (SPEED_POWER_INTERCEPT)) * (1.0f / (SPEED_POWER_SLOPE));

Ok so basically a 5.5W laser will speed up the cuting but it will always cut a bigger hole?


If I understand correctly PWM is the 12v controller and I connect it to a fan soket? Isint it easier to do that and control the laser with M106 than using TTL (5v controller?) and modify the software? I could be extremely wrong in this : ) so please comment no matter if I’m correct or not.

We don’t think so, same time, bigger hole. (purely theory I have not tested more than 2)

Yes…but this all depends on the laser you get, there are not many 12V controlled (again, that I know of). At the same time there is a tiny bit more control the 5V way (since we can change the timing if you get really fancy).

Strange. For the sake of argument:

2.5W laser has a 1 mm diameter beam

5.5W laser has a 1.5mm diameter beam

Work speed is 1mm/s

This would mean that a single point is burned for 1s with the 2.5w and 1.5s with the 5.5W.

So a point would be heated up for 3s with 3 passes of a 2.5w laser or 2 passes of a 5.5w laser. This would meen I need need to run 1 pass les = sawind tile.


Am I right? I’m making it up as I go :stuck_out_tongue_winking_eye: and I’m trying to understand it at the same time.

My theory on the dot size with higher wattage lasers is the bigger guys use larger diodes, but they all pretty much use the same optics. Either that or they just over drive them and they just don’t culminate as well.



You can see in even your example, it is about the same power. Twice the power more than twice the area it affects. It is counter intuitive to me because the actual spot sizes we are dealing with are tiny 0.1-0.4mm but that is actually o.o31mm2 - 0.5mm2 a difference of 16 times the area, so purely hypothetically, a 2W 0.1mm spot is about the same as a 32W 0.4mm spot -Hypothetically-

I think more to the point is what Barry is saying, the larger diodes are just over driven using the same optics so they actually do not even use some of the beam as it doesn’t fit into the lens.

Then throw on the fact that it is not actually a spot but a rectangle so it can burn better in one direction than the other direction of travel.

1 Like