Gazza wrote:For PWM control:
Check both the boxes for “PWM Spindle” and “Spindle relay output enabled”.
Set M3 relay pin to “1” and port to “1” in the spindle relay section.
Set PWM pin to 17.
Set your Frequency to a number you want. 100 or 500 is pretty good. Anything under 5000 will work.
Set minimum duty % to 0.
Set maximum duty % to 100.
Now you will have control over the power using the command:
M3 SXXX
where the “XXX” is a number between 0 and 100.
Hi Gazza,
Everything before the quoted text is OK, but these last sentences are left on their site from the old configuration when there was no laser output in UCCNC. As you see on the last screenshot, set laser output to pin 17 and connect your white wire to pin 17. It is missing from your drawing, but do not forget to connect the 12V laser power supply negative to the GND on the KK01 board. (Without this connection the white wire will do nothing but collect the electric noise from the card...)
To use the laser first you have to command M3 (this is a safety switch for the laser now) and after it command M10 [Q<0..255>]. If you omit the Q parameter the laser will turn on full power. The Q parameter 0 to 255 sets the PWM to 0..100% duty cycle. To turn off the laser command M11, at the end of the g-code M5.