Diode Laser PWM Modulation Depth and Frequency: Fixing Flicker and Banding at High Engraving Speeds
This site's guide to constant power vs dynamic power (M3 vs M4) in GRBL lasers covers how your controller decides to vary power with speed. This covers a different, lower-level setting that trips people up once they start pushing engraving speeds higher: the PWM carrier frequency itself, and what happens when it's mismatched to your laser module's actual response time. Get it wrong and you'll see banding, a faint buzzing from the diode driver, or power that reads correctly on a test grid but looks visibly inconsistent across a fast raster engrave — and because nothing in LightBurn's main settings screen obviously points at this value, it's one of the more commonly misdiagnosed issues in diode laser work.
What the PWM Frequency Setting Actually Does
GRBL and GRBL-derived firmware control laser power by rapidly switching the laser on and off and varying the ratio of on-time to off-time — the duty cycle — many times per second. The S-value in your G-code sets that duty cycle (effectively, perceived power); a separate firmware setting, commonly $33 on GRBL-family boards, sets how many times per second that switching happens — the PWM carrier frequency. This setting is frequently hidden from the normal $$ settings dump and from LightBurn's standard device settings page; on many controllers it's set once by the machine manufacturer at the firmware level and isn't meant to be touched, while on others it's an exposed, user-adjustable value. Which situation you're in depends entirely on your specific controller board, so check your machine manufacturer's documentation before assuming $33 is even accessible on your setup.
Why Mismatch Causes Banding
A laser diode doesn't switch on and off instantly — there's a small but real rise and fall time in how fast the diode and its driver circuit respond to a PWM pulse. If the PWM frequency is too low relative to how fast the gantry is moving, each on/off cycle covers a visible distance on the material, and the diode's non-instant response means the actual delivered energy per pulse doesn't track the commanded duty cycle linearly — the result shows up as periodic banding or uneven darkness across a raster fill, especially visible at higher engraving speeds where fewer PWM cycles occur per millimeter of travel. Too high a frequency, on some driver hardware, can cause the opposite problem: the driver struggles to fully turn off between pulses, effectively raising the minimum power floor and muddying fine detail or light greyscale work.
SymptomLikely CauseWhat to Try Visible horizontal banding on raster fills, worse at high speedPWM frequency too low for the travel speed — too few cycles per mmIncrease PWM frequency if your controller exposes the setting; otherwise reduce engraving speed Audible buzzing or whine from the laser module during engravingPWM frequency landing in an audible range that resonates with the driver board or diode mountTry shifting frequency up or down in whatever increments your firmware allows; this is cosmetic/audible, not a quality defect, but worth knowing isn't a hardware fault Grayscale/photo engraves losing shadow detail, blacks looking muddyPWM frequency too high, driver not fully reaching zero output between pulsesLower PWM frequency; re-run a grayscale test card after any change Power reads correctly on a slow test grid but looks wrong on a fast production jobThe mismatch only shows up once travel speed outpaces the PWM cycle rate — slow test grids can mask it entirelyAlways validate settings at your actual production speed, not just a slow calibration speedFinding the Right Value
There is no universal correct number — it depends on your specific laser diode driver board, and manufacturers set wildly different defaults (some diode laser vendors specify values as low as 1–1.5 kHz for their stock driver boards, others run considerably higher). The practical approach:
- Check whether your specific machine's manufacturer publishes a recommended PWM frequency for their driver board — this is the single most reliable source, since it's tuned to their actual diode/driver hardware, and guessing a "standard" value is how people get this wrong
- If no manufacturer value exists and your firmware exposes $33, run a simple test: engrave the same grayscale or fill test at your normal production speed across a small range of frequency values, inspecting each result under consistent lighting
- Look specifically for banding, which is easiest to see in a solid fill at a mid-gray power level rather than full black or full white
- Once you find a value with no visible banding at your typical production speed, confirm it still holds up at your fastest realistic engraving speed, since the mismatch gets worse, not better, as speed increases
A Caution
On some controller boards, this setting is locked, firmware-level, or simply not present in the way described here — it is genuinely a non-standard GRBL extension on many machines rather than a core GRBL setting, meaning its presence and exact behavior varies by manufacturer firmware fork. If your machine doesn't expose it and your manufacturer doesn't document a recommended value, the safer lever to pull is engraving speed rather than guessing at an undocumented firmware value, since an incorrectly-set PWM frequency on some boards can also affect minimum/maximum power linearity in ways that are harder to diagnose than simple banding.
This is a small, easy-to-overlook setting, but it's one of the few explanations for banding that isn't about belt tension, mechanical play, or air assist — worth ruling in or out before you start tearing into the gantry looking for a mechanical cause that isn't there.