@Kyfe and @gwilki, you can check the output by measuring its voltage with a multimeter. You will get different results if you measure DC vs AC, but you can still tell.
The output is a PWM signal (Pulse Width Modulation). The signal ranges from about 0V to 5V. Off would be 0V and full on would be a steady voltage close to 5V. For intensities in between the signal will be a series of pulses. At low intensities the pulses will be more off than on (lower duty cycle) and at higher intensities the pulses will be more on than off (higher duty cycles). Off = 0V and on = ~5V.
Essentially you are just looking for change on the outputs with a a change in power %. The GRBL “s” commands control the intensity as shown in the chart. In my case I have max spindle speed set to 1000 ($30=1000).
@paullarson This is excellent, Paul! Thank you much.
Just to be clear, If I have nothing connected to the pwm cable from the LM controller and I have $30=1 to turn on laser mode, then $31=1000 to set max speed, then send an s1000 command, I should read 5v +/- across the + and - wires in the pwm cable.
Then, if I send s500 in UGS, I should see .28V +/- across the wires. Etc. yes?
No. Set $31 to 0. This is minimum spindle speed. Set $30 to 1000. This is maximum spindle speed. You can actually set $30 to whatever you want. Scienci recommended 100. I chose 1000 because I thought it gave me greater resolution. Once set you leave these alone.
From the UGS console use the following GRBL commands:
M4 - turn on the laser
Sx - set spindle speed.
M5 - Disable/turn off the laser. (Your gcode will only use M5 at the end and will use s0 to turn the laser off while engraving/cutting).
Don’t forget we are using the spindle speed controls to control the laser.
So, m4 s0 would turn on the laser at 0% intensity - essentially off but enabled.
S100 would turn the laser on at 10%
S1000 would turn the laser on at 100%
If these don’t work try issuing g1f300s0. This also sets the speed of movement. This may not be necessary, but I got an error message once that I had to set the speed.
Tks again, Paul. I was confusing $30 with $32, the latter turns on laser mode. I assume that we don’t need laser mode on to test these outputs since, as you say, we are using spindle speed to control the laser power output.
First, your $30 and $31 instructions are backwards. No offence intended. $30 is max and $31 is minimum.
So, I set $30=1000 and $31=0.
Then, I did as you instructed. I used M4 to turn on the laser (unconnected). Then I entered the 4 S commands one at a time, taking the readings from my multimeter. My readings were a bit different than yours, but the key is that they changed with each S code.
In case other are interested, here are my readings:
@gwilki, you are absolutely correct. I had $30 and $31 swapped in my entries above. I corrected them. Thanks for catching that. You values look great. So your spindle speed output from the
control box is working correctly.
One thing to keep in mind, whatever value you end up using in $30 you need set the same value in LightBurn, or whatever program you are creating your projects in.
@paullarson thank you for the info and direction. I think I might have a non functioning SpinPWM as no commands are changing the voltage. It stays around 4.44 DC regardless.
Not sure what else it could be. I have attached my EEPROM settings to ensure that i do not have something wrong here.
@Kyfe, from what you’ve listed above I would have expected you to see a change in the voltage. The settings that I’m familiar with look correct. I would just like to confirm what output you are measuring on the LM control box. It should be Spindle PWM control port. If it is, then you may have a bad control box.
@Kyfe I’ll reply 'cause I’m here. That is the right output. How are you measuring the voltage coming out of it? Do you have green plug with a 2-conductor cable attached, and you are measuring the voltage across the 2 connectors?
When I measured Spin PWM on my controller I moved the empty Spin Direction plug over to Spin PWM so I could insert the probes in easily with no wires in the plug. It worked well. It’s probably a good idea to measure the output without the laser attached just in case it is some how influencing your results.
I measured by removing the green plug, and attached the multimeter directly to the pins. I can try to measure again through the green plug to check if the problem remains. I will update when i do that.
My problem was resolved with help from Andy. The Arduino board on the controller was not working, not adjusting the PWM pins. Replaced the arduino and now have fully functional laser setup. Thank you all for your help.
@stevendq Good stuff, S. I’ve done a few projects with mine now, both in LightBurn and in VCarvePro, Being paranoid, I still have not extended the wires on this one. I’ll get there though.