PWM (Pulse Width Modulation) is the signal type the controller uses to regulate the laser module's power. The controller continuously switches the signal on/off at a given frequency — the laser's average power depends on the proportion of time it's ON. This proportion is called the duty cycle.
Engraving quality is directly affected by how fast the PWM signal can respond. If the frequency is low — the laser can't render individual pixels precisely, because the signal is still in its previous state by the time it reaches the next pixel in the line.
The PWM frequency determines how often the laser can "switch." If this frequency is lower than what the speed and DPI setting demands, the engraving will be blurred, and individual pixels will bleed into each other.
These are two completely different frequencies, and mixing them up is the source of most misunderstandings.
The frequency at which the firmware generates the PWM signal. This is the hardware timer's frequency. Platform specs (1 kHz, 10 kHz, 50 kHz, etc.) refer to this.
The firmware configures this. It runs at a fixed value, independent of the image.
The frequency at which the machine switches from pixel to pixel during engraving. This depends on movement speed and the DPI setting.
The job determines this. It increases with higher speed or higher DPI.
Rule: the carrier frequency needs to be at least 5-10× higher than f_img, so the PWM signal can precisely track the pixel sequence.
A diode laser module can't react instantly to a PWM signal's state change. The rise time and fall time are the time it takes for the laser to reach maximum power, or zero power, respectively, following a signal edge.
If the carrier frequency exceeds the limit set by rise/fall time, the laser can't fully turn on and off within every period — the duty cycle loses its precise meaning.
At high frequency the laser "gets stuck" at a mid-power level. This is most noticeable at 0% and 100% duty — the minimum power can't be zeroed out, the maximum can't be reached.
The two most common control methods differ fundamentally in what the firmware sends to the module.
The controller sends a digital signal (0V / 5V) to the module's TTL input. The module's internal control electronics interpret the duty cycle and set the diode's current.
Advantage: noise-free, digitally controlled, no need for an RC filter.
Limit: the module's internal PWM processing determines the maximum useful frequency.
An RC filter converts the PWM signal into a DC voltage (0–5V), which is sent to the module's analog input.
Advantage: smooth control even at an arbitrary PWM frequency.
Limit: requires an RC filter; the filter's time constant limits the switching speed.
LaserBase recommendation: TTL PWM is the preferred method. Most modern diode laser modules (LaserTree, Sculpfun, xTool, etc.) treat the TTL input as the main control channel.
The laser's PWM output is generated by the firmware. The two main firmware lines have fundamentally different PWM capabilities.
The original GRBL implements timer-based PWM generation in software. This approach yields a maximum PWM frequency of roughly ~1 kHz. A higher value can be set, but timer accuracy drops as a result.
Above ~1 kHz, GRBL 1.1's PWM signal becomes unreliable. On AVR-based controllers (Arduino Nano, UNO) this is a hard limit; on ESP32 ~5 kHz is achievable in software, but this requires a firmware modification.
grblHAL accesses hardware timer resources directly — it uses the platform's native timer peripherals. Result: 5–50 kHz stable PWM, depending on platform.
With grblHAL + suitable hardware (Teensy 4.1, STM32), 50 kHz PWM is also achievable, with a stable duty cycle. This is enough even for 254 DPI at 36,000 mm/min engraving.
| Platform | Firmware | Max PWM freq. | Limiting factor | Rating |
|---|---|---|---|---|
Arduino Nano / UNOAVR ATmega328 |
GRBL 1.1 | ~1 kHz | 8-bit timer, software PWM | basic |
ESP32Xtensa LX6, 240 MHz |
GRBL 1.1 | ~1 kHz | Firmware limit, not hardware | limited |
ESP32Xtensa LX6, 240 MHz |
grblHAL | 5–20 kHz | Hardware LEDC timer | medium |
Teensy 4.1ARM Cortex-M7, 600 MHz |
grblHAL | 5–50 kHz | Rise/fall time is the limit | recommended |
STM32F4xxARM Cortex-M4, 168 MHz |
grblHAL | 5–50 kHz | Rise/fall time is the limit | recommended |
For Teensy 4.1- and STM32-based systems, the PWM frequency limit is no longer the firmware — it's the laser module's rise/fall time characteristic.
For a given speed and DPI, the frequency at which the machine has to switch from pixel to pixel:
The machine can't stop instantly — at the end of the line, speed drops to zero, then accelerates back up by the start of the next line. This path is the overscan: the laser is already turned off during this stretch, but the motion continues.
LightBurn calculates and sets the overscan automatically if the "Overscan" option is enabled. The machine's work area shrinks by this much on each side the laser head starts from.
The table below shows how much PWM carrier frequency is needed for different speed and DPI combinations. The value shown in the table is f_img. A 5–10× carrier/f_img ratio is the theoretical ideal — the diode laser module's rise/fall time (~5–20 µs) can partially compensate for a lower ratio, but this varies by module and isn't guaranteed.
| DPI | 500 mm/min | 1,000 mm/min | 2,000 mm/min | 4,000 mm/min | 8,000 mm/min | 16,000 mm/min | 24,000 mm/min |
|---|---|---|---|---|---|---|---|
| 100 | 33 Hz | 66 Hz | 131 Hz | 262 Hz | 524 Hz | 1,048 Hz | 1,573 Hz |
| 200 | 66 Hz | 131 Hz | 262 Hz | 524 Hz | 1,049 Hz | 2,097 Hz | 3,146 Hz |
| 254 | 83 Hz | 167 Hz | 333 Hz | 667 Hz | 1,334 Hz | 2,667 Hz | 4,000 Hz |
| 300 | 98 Hz | 197 Hz | 394 Hz | 787 Hz | 1,575 Hz | 3,150 Hz | 4,724 Hz |
| 500 | 164 Hz | 328 Hz | 656 Hz | 1,312 Hz | 2,625 Hz | 5,249 Hz | 7,874 Hz |
| 750 | 246 Hz | 492 Hz | 984 Hz | 1,969 Hz | 3,937 Hz | 7,874 Hz | 11,811 Hz |
| 1000 | 328 Hz | 656 Hz | 1,312 Hz | 2,625 Hz | 5,249 Hz | 10,499 Hz | 15,748 Hz |
Green: GRBL 1.1 is enough · Yellow: grblHAL recommended · Red: grblHAL + a suitable platform only (Teensy/STM32)
Remember: the carrier frequency needs to be 5–10× f_img. E.g. for a 4,000 Hz f_img, a 20–40 kHz carrier is needed for stable engraving.
The configuration below was tested on a 50×70 cm dither engraving, stably and reproducibly.
Resolution: 254 DPI
Speed: 24,000 mm/min
PWM carrier: 6.5 kHz
Every pixel switch executes precisely.
Resolution: 254 DPI
Speed: 36,000 mm/min
PWM carrier: 6.5 kHz
f_img ≈ 6 kHz — carrier/f_img ratio ~1.1×, but the diode's rise time buffers it.
Conclusion: 254 DPI and 24,000 mm/min is the point where the Teensy 4.1 + grblHAL + LaserTree combination gives a reliable, reproducible result. Above 36,000 mm/min, rise/fall time becomes the bottleneck.
The TB6600 is a widely used, inexpensive stepper motor driver module. On high-speed systems, you need to watch the maximum frequency of the STEP signal.
The TB6600's STEP input is reliable up to ~200 kHz. At 100 step/mm and 36,000 mm/min: STEP frequency = 100 × 600 mm/s = 60 kHz — this is safely within range. A limit can only appear at extreme speeds (>120,000 mm/min).
The TB6600 is not the ideal stepper driver for linear-rail, high-speed systems — its internal step-loss protection limits dynamic acceleration. TMC2226- or DM556-based drivers give a better result on high-acceleration systems.
Important: the TB6600 can't react to the laser's PWM signal — laser control and motor control are completely separate signals. The PWM frequency problem affects only the laser module, not the TB6600.