I've added a 2.3W diode laser (controlled by PWM spindle control) to my mill, and am slowly figuring out how to use it. I've got most of the kinks worked out (I think), but after powering up everything, and then clicking "Connect" in laserweb4, the laser comes on full-power for a brief instant - but it's enough to burn a dot in my surface. Is there a setting I've overlooked? [ The laser is this one, btw: EleksMaker® LA03-2300 445nm 2300mW Blue Laser Module With TTL/PWM For DIY Laser Engraver Machine ]
Are you running Grbl 1.1 or some other community fork (older T2, JtechGRBL forks for example) that uses D13 for Laser PWM: the stock arduino bootloader "flashes" the LED on D13 during bootloader startup as a visual debug when you program. Useful for arduino junkies, but not so much for those who needed the Hardware PWM pin on D13 for lasers/spindle. (Which with grbl1.1 you shouldnt) In Grbl 1.1 Laser PWM is on D11 which is not touched by the Bootloader (Upon connection to the port from LW (or ANY host really) the Microcontroller resets (Serial interface puts DTR (Data Terminal Ready) LOW which triggers the reset) and during reset it has to run the bootloader. So older community firmwares that used D13 - this was a known problem. If however you are already using Grbl 1.1 and are wired to D11 - this shouldnt happen. You can always put the laser's power on a relay, that you trigger with the Spindle Enable or Coolant pins (M8/M9): Connecting Grbl · gnea/grbl Wiki · GitHub
I'm using Grbl 1.1f on a Gradus M1 Pro. The laser is wired to Spindle PWM on the Gradus, but I couldn't tell you if it is wired to D11 (documentation on the Gradus is pretty thin). Thanks for the insight though, it gives me a place to look! I should mention, that after that initial hiccup, it works fine. I've already done a couple of raster burns.
If all else fails, post on https://plus.google.com/communities/115879488566665599508 and tag in Roy (Panucatt, creator of the Gradus) https://plus.google.com/108707975258053857780
I discovered a mechanical solution to this problem. My laser has a small push-button switch that keeps it at low power when I connect. After I connect, I release the switch, and it goes to pwm control. No more burned holes during connection.
This is a known problem with GRBL/Adruino. During boot the spindle pin will float for a bit. The way I fixed it on mine was to put a 1K resister between the spindle pin and ground. Then you won't have to make sure to remember to use the switch. When I built my first diode laser system I would not apply power to the laser until after the controller was started but of course I would forget once in a while and burn something. If you are using GRBL 1.1f then the spindle should be on D11.
The D13 pin issue can be permanently fixed by compiling Optiboot from source using the "make LED_START_FLASHES=0 atmega328" command and re flashing the controller with the resulting boot loader. Pros -Retains bootloader -D13 is no longer toggled on reset or power up This is useful for anyone like myself who still use D13 through compile time options in grbl1.1 . It should work just as well with any other firmware that makes use of D13 as well.