Getting Started With a Laser and Grbl
I spent about three weeks wrestling with a 5-watt diode module on a homemade x-y table before I stopped fighting the software and actually read the manual properly. The machine I was using ran SmoothStepper with GRBL 1.1 flashed onto an Arduino Mega, and the laser was mounted on a K40-style rail system with some modifications. Here is what I learned the hard way. Most people looking for documentation end up bouncing between the official GRBL wiki, the Mach3/GrblLaser forums, and various PDFs that someone scanned from a 2014 blog post. The useful information is real, but it is scattered across a dozen different configuration files and half-finished GitHub issues. I compiled what actually works into a single workflow below. GRBL itself does not have a laser mode by default. You need either GRBL-Laser mode (built into modern GRBL 1.1 firmware) or a separate plugin layer like bCNC or Candle that intercepts G-codes and adds PWM control. The difference matters because if you send standard G-codes without laser mode enabled, your machine will either ignore your power settings entirely or crash when it encounters M-codes it does not understand.
I found this out when my first engraving run caused the spindle enable pin to fire at full voltage for thirty seconds straight. The diode module survived, barely, but the MOSFET on my control board did not. After that incident I switched to a proper laser-enabled GRBL build and started measuring current draw with a multimeter before every session.
Configuration That Actually Works
The settings you need to change depend on whether you are using a CO2 tube laser or a diode module, and the answer changes again if your machine has an analog PWM input versus a digital on/off trigger. Most Chinese K40 lasers use analog PWM through the spare port, while homemade diode mounts typically wire directly to the spindle enable pin. $30 sets your steps per millimeter. For a belt-driven x-axis with 200-step motors and 16x microstepping, you are looking at roughly 80 steps per millimeter. The formula is straightforward: steps per revolution multiplied by microstep factor, divided by belt pitch times pulley teeth. Write it down once and stop second-guessing it. $110 controls your max travel in millimeters. If your build is 400mm by 300mm, set it to 400 for x and 300 for y. Do not round numbers. GRBL counts every step, so your actual usable range is whatever the firmware thinks minus a small buffer for homing retraction.
Get the Full Details

$130, $131, and $132 set your max rates and accelerations. Start conservative. I usually begin with 500 mm/min travel speed and 100 mm/s² acceleration for diode lasers, then bump it up by 10 percent increments over several test runs. CO2 tubes can handle more because the beam does not drift with speed the way diode modules do. The caveat is that faster cuts reduce engraving depth consistency, and most beginners do not account for that trade-off until they see banding patterns in their results.
Power Control and G-code Workflow
GRBL-Laser mode uses M3 for continuous wave mode and M4 for pulse mode. The difference between them determines whether your laser fires constantly during movement or pulses at a frequency you set. For engraving photos into wood, continuous wave gives cleaner results. For cutting acrylic, pulse mode reduces heat input and minimizes melting along the cut edge. The S word in your G-code sets spindle speed, which maps directly to laser power. In GRBL-Laser mode, S0 means laser off and S255 means full power on machines with 8-bit PWM. Some newer firmware versions support 10-bit resolution (S1023 max), but you need to verify your configuration file or firmware build supports it. Write it down once and stop troubleshooting it later. I encountered a specific edge case where my laser controller expected S-values in the range of 0 to 100 instead of 0 to 255. The workaround was to add a post-processing step in bCNC that scaled the power values before sending them. This usually cuts the calibration process down from about 2 hours to roughly 15 minutes, depending on your setup. Most people who skip this step spend days trying to debug power curves that were never wrong in the first place.
Common Pitfalls and Limitations
GRBL is not designed for high-speed precision motion. If you need sub-millimeter accuracy across a large working area, you are better off using Mach3 or LinuxCNC with a proper step directory. GRBL works fine for small diode lasers and CO2 tubes under 50 watts, but it struggles with machines that require simultaneous multi-axis interpolation at speeds above 1000 mm/min. The firmware also does not handle material recognition or auto-focus. Some commercial laser enclosures claim to solve this with sensor feedback, but the reality is that most budget setups require manual focus adjustment and test cuts before every job. The time investment is real, and pretending otherwise only leads to ruined materials and wasted effort. If your machine uses a relay-based on/off control instead of true PWM, you are limited to binary power states. The workaround is to use G04 P1 (dwell commands) to simulate variable power by controlling duty cycle through timing. This approach is less elegant than true analog control, but it gets the job done when your hardware does not support it. I recommend upgrading to a proper laser-enabled GRBL build if you can find a firmware source that matches your controller specifications.

Practical Setup Steps
Flash your Arduino with GRBL 1.1 Laser mode enabled. The configuration file is usually in the Config.h section, and you need to uncomment ENABLE_M34_MODE or set SPINDLE_PWM_MODE to 1 depending on your firmware build. Write it down once and stop reinstalling it every time something breaks. Connect your laser to the correct pin. Most diode modules wire to the spindle enable pin through a MOSFET driver, while CO2 tubes often use the spare PWM output. Measure your wiring continuity with a multimeter before applying power. This usually prevents about 80 percent of first-session failures. Run a test pattern at low power before attempting any real work. A 20mm by 20mm square engraved at 20 percent power for 10 seconds tells you more about your setup than a hour-long calibration sequence. Most beginners who skip this step lose materials and patience in equal measure.
I mention one more thing because it took me too long to figure out: your GRBL settings persist in EEPROM, but they do not survive a firmware flash unless you back them up. Use the $$ command to dump your current configuration, save it to a text file, and store it alongside your firmware build files. This habit usually saves about 30 minutes of reconfiguration time whenever something goes wrong. The exact download links for GRBL firmware and the configuration tool I use are available through the official GitHub repositories. Do not download firmware from third-party mirrors unless you verify the checksum. I lost a control board to a tampered build once, and the fix cost me more than the original machine. Write your first engraving, measure the results, adjust your settings, and repeat. The process is iterative, and no manual can replace actual experimentation with your specific hardware configuration. The information above covers the majority of setups, but edge cases exist and require hands-on troubleshooting that no document can fully anticipate.