So I recently finished installing a laser on my router. Here’s some things I found.
1. The PWM needs a ground reference. There isn’t a terminal, so you might have make one. I used a shielded cable and connected the shield to the ground terminal on my controller (Ethernet SmoothStepper) and the chassis of the laser. Without the ground, the PWM was just noise on my oscilloscope, with the ground it was a mostly clean 5v square wave.
2. I had to learn to use different gcode.
I’m using Mach 4 but the only post processor I could find that worked with fusion 360 was a Mach 3 post processor generously created by Tweakie on this Forum. This post processor uses M10 P1 and M11 P1 codes to turn the laser on and off. I think P1 means they had assigned the laser to output 1. My laser is assigned P20 since I use output 20. The only thing I have to add to the Gcode is a few lines at the beginning. See below.
m2003 (LASER_VECTOR_PWM_PERCENTAGE=85)
m2003 (LASER_VECTOR_FREQUENCY=20000)
m2003 (LASER_VECTOR_GATE_DELAY=0.5)
m2003 (LASER_VECTOR_GATE_DURATION=0.5)
m2004 (This enables Vector Laser)
And then add the rest of your code, using M11 P1 S255 to turn on the laser and M10 P1 to turn it off
Hope this helps.