Please or Register to create posts and topics.

Minimum PWM Output

I successfully installed my MG today and was tuning the settings in firmware and Lightburn, and have run into a limitation with vector engraving.

For my laser tube, it does not fire until the power is >12%. The problem is that the power is scaled down when the laser slows down for sharp corners. This results in faint or no engraving near the corner when the power scales below 12%.

What I want to do is set the minimum power to 12%.  $31 seemed like the setting to do it, but does not actually give the desired result. Instead it just causes the laser output to go to zero if commanded below the threshold.

I think the only way to get the behavior I want is to flash a modified version of the firmware with the 12% minimum power limit. Is there an existing solution to this problem, or is custom firmware the way to go?




Hi Nathan, indeed you can use the $31 setting as minimum output. I would trial a value slightly about the faint engraving like $31=125 (range of 1000 set in $30). BTW my tube does ignite at 5% but its fairly new. Try to wire the PWM and GND wires securely so no resistance build up in the connectors (press them securely in place and tighten screw terminals).

You can alter the firmware but $31 does exactly the same. Try out a few values like 120, 125, 130 etc. and see if that gives you the desired out come. Alternatively you can compress the range by making $30 lower than 1000 e.g. 800 and leave the reference value in the laser program as 1000. (S parm in Lightburn). Keep us posted on your finding.

Cheers, Paul

Cheers, Paul awesome.tech

Hi Nathan,

I've recently written a blog on laser power - just checking if you've seen it?


The blog aligns with your interpretation that $31 controls the minimum S power level that produces any result.  It doesn't do what you want.

Laser mode in a CNC system deliberately reduces power when engraving corners, so the slower cornering speed doesn't cause corners to be darker than the straight lines.

This feature is switchable by exiting laser mode, see https://forum.lightburnsoftware.com/t/reduced-power-when-in-laser-mode/14324

If you're technically minded, you could consider saving the gcode file and then doing some processing on it so that it doesn't contain S values below your threshold. Then load it and run it.  While this might be impractical/inconvenient for frequent or larger images, you will at least determine exactly what output Lightburn is producing. It's the gcode that is the source of your problem, I don't think it's appropriate to develop firmware that corrects incoming gcode - better to change the source.

There may be other, lateral thinking solutions to the problem. For example, try reducing your overall engraving speed, so the corners speed will be similar to the line speed (and thus use similar power levels). Another way of achieving this would be to reduce your acceleration values.



Thanks for the suggestions!

Paul - I tried your suggestion, but setting $31 to a higher values does not work as desired. It simply results in the laser not firing if the commanded or scaled power is below the $31 threshold. It would be perfect if this setting functioned as desired.

Dan - Yes, I read your blog post. It helped me understand how the power settings work.

I wasn't able to find a way to implement what you suggest. The gcode for a vector engrave that is output from Lightburn does not specify the reduction in power that occurs when the laser slows down around corners. This is a capability built into the controller firmware. I think for raster engrave, Lightburn specifies the power for every 'pixel', but for vector engrave, it just sets the max power for the max speed (say 20% and 100mm/s), and the controller manages how to vary power as speed varies along the cut path.

I hope I am missing something, but a firmware change still seems like the only way to get the desired behavior.

I can achieve much more uniform cutting if I increase acceleration and decrease the max speed, but it just takes a lot longer to engrave. This is effectively what the old control board would do (M2 Nano). It would move with constant velocity, near infinite acceleration around corners, and only output constant laser power. The downside is that this sort of control limits you to slower speeds (20mm max before the motion becomes shaky on my K40 with M2Nano) than you can achieve with the MG (100mm/s and 1500mm/s/s results in high quality motions, but the laser power variation results in poor/faint vector engraving at turns/corners)

I'll take a closer look at grounding to see if there is a reason my laser doesn't fire until 12%. It has been this way ever since I received it.

Thanks Nathan,

that's very interesting.

From reading your response I couldn't tell if you tried the $32 setting to exit laser mode (to stop corners having less power applied).

Every laser has a minimum threshold for lasing action. 12% doesn't surprise me.

So can you simply increase the laser output (for the image as a whole) that you're sending from Lightburn, or do you need it at that intensity to achieve the shade you want?

I forgot to mention, but yes, I tried $32=0. For some reason it resulted in the laser staying on for the entire job, resulting in laser marks everywhere. Interesting effect.

I also tried changing the flavor of GRBL that Lightburn sets to GRBL-M3, which disables the dynamic power variation. It did exactly that, and results in burnt corners when the laser slows down for corners 😛

Increasing the power in Lightburn makes everything engrave darker, but still faint/no marking at the corners. Not the effect I'm trying for though.

Hi Nathan,

Just to provide some additional info for other people who are reading this and aren't aware of the various controller modes.

$32=0 sets the controller in cnc mode with burnt corners as a result since only laser mode does adapt the laser power at corners. It might be that the laser tube is aged. Even with no use, the gas within the tube does deplete and breaks down. My first k40 tube that came with the brand new machine could not even cut 3mm plywood despite correct laser focus and mirror alignment and I had to replace it. The stock mirrors and lens are really low quality so look into that as well.  I believe Myra does have some stock of mirrors and lenses if you need them.

Cheers Paul



Cheers, Paul awesome.tech

Hi Paul,

Yes, I realize my laser behavior is different than others. The limitations that I am trying to overcome are not a fault of the MG, but a fine tuning/performance improvement I am trying to make for my machine based on my laser behavior during dynamic laser power variation.

Ideally, I could offset the laser output signal from the MG so that when ~3% is commanded, ~12% is output. For vector engraving, there doesn't seem to be a way to do this from Lightburn or from the existing MG firmware settings. This seems like it would be possible to do though if I ever get around to figuring out editing and flashing a custom version of the firmware.

I did recently replace my mirrors and lens, but the old ones weren't terrible.

****Also, update, I was tugging on all of the wires/connectors and found a loose crimp on my 'LO OUTPUT' line between the LPS and the MG. Recrimping seems to have improved my laser response (lower effective firing %)! So anyone reading this, if your K40 laser has trouble firing below 12%, it could be bad connectors/crimps from the laser power supply.

I still want to play around with settings and take a stab at custom firmware eventually, but this makes the faint/unmarked corners problem less apparent.

dancolwp1974 has reacted to this post.

Thanks for the update!

Forum Registration