Laser function in a LongMill

I paid $150 for mine!

@justinbouchardw I expect that you got a more powerful unit than mine.

Itā€™s a miracle! When I refused to start communicating with a province in China, Banggood miraculously re-stocked my laser in their warehouse. What an incredible, fortunate coincidence for me. Of course, I have no assurance that they will ship me one, only that they have them to ship.
My first and last experience with Banggood.

2 Likes

Anyone know if theys a limit on how long you can run the laser ? Light so it doesnt over heat or anything ?

I am having the same problem as @gwilki. I have now tried 2 different lasers. One the same as Andy had and an endurance laser. I have also reflashed the longmill control board to ensure it was up to date. The laser is either fully on or not on at all. I have tested both lasers with another board (old works laser board) and own works for both lasers.

@chrismakesstuff I am wondering if there is something wrong with the longmill control board. Is there a way to test if the longmill board is actually passing the signals? The most I have is a multimeter to test with. Any help would be appreciated.

@Kyfe Thatā€™s good to know, Kyle. I tested my laser with two different Long Mill controllers and the results were the same. I figured - maybe wrongly - that the chances of two LM controllers being bad were less than the chance that the laser driver was bad.

Also, others here are getting correct results with their lasers and the LM controller, so I know that it is possible to make this work.

Like you, I only have a multimeter to test output. From reading, ideally we need an oscilloscope.

@chrismakesstuff Any thoughts, Chris?

@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.

Hereā€™s an example of PWM.

I made the following measurements (note $31 in the table should be $30):

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).

2 Likes

@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?

1 Like

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.

1 Like

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.

Probably not, Grant.

1 Like

@paullarson Well, Paul, I did the tests.

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:

Laser power in % DC measurement AC measurement If $30=1000
5% .286 .50 S50
10% .53 .927 S100
50% 2.45 2.52 S500
100% 4.82 0 S1000
1 Like

@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.

1 Like

@paullarson Thanks for confirming that, in this instance only, Iā€™m not cracking up, Paul.

I still donā€™t have a functioning laser, but at least thanks to you, I now know that my LM controller is doing its thing.

3 Likes

@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.

$$
$0 = 10 (Step pulse time, microseconds)
$1 = 100 (Step idle delay, milliseconds)
$2 = 1 (Step pulse invert, mask)
$3 = 5 (Step direction invert, mask)
$4 = 1 (Invert step enable pin, boolean)
$5 = 0 (Invert limit pins, boolean)
$6 = 0 (Invert probe pin, boolean)
$10 = 1 (Status report options, mask)
$11 = 0.010 (Junction deviation, millimeters)
$12 = 0.002 (Arc tolerance, millimeters)
$13 = 0 (Report in inches, boolean)
$20 = 0 (Soft limits enable, boolean)
$21 = 0 (Hard limits enable, boolean)
$22 = 0 (Homing cycle enable, boolean)
$23 = 0 (Homing direction invert, mask)
$24 = 25.000 (Homing locate feed rate, mm/min)
$25 = 500.000 (Homing search seek rate, mm/min)
$26 = 250 (Homing switch debounce delay, milliseconds)
$27 = 1.000 (Homing switch pull-off distance, millimeters)
$30 = 1000 (Maximum spindle speed, RPM)
$31 = 0 (Minimum spindle speed, RPM)
$32 = 0 (Laser-mode enable, boolean)
$100 = 200.000 (X-axis travel resolution, step/mm)
$101 = 200.000 (Y-axis travel resolution, step/mm)
$102 = 200.000 (Z-axis travel resolution, step/mm)
$110 = 4000.000 (X-axis maximum rate, mm/min)
$111 = 4000.000 (Y-axis maximum rate, mm/min)
$112 = 3000.000 (Z-axis maximum rate, mm/min)
$120 = 750.000 (X-axis acceleration, mm/sec^2)
$121 = 750.000 (Y-axis acceleration, mm/sec^2)
$122 = 500.000 (Z-axis acceleration, mm/sec^2)
$130 = 812.000 (X-axis maximum travel, millimeters)
$131 = 812.000 (Y-axis maximum travel, millimeters)
$132 = 105.000 (Z-axis maximum travel, millimeters)
ok
S500
ok
M4
ok
s500
ok
m5
ok
m4
ok
s1000
ok
s1
ok
g1f300s0
ok

Edit: I tried this as well with laser mode enabled using M3 command to turn on the tool with same results.

@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.

@paullarson I believe I am testing the correct one. on my board it is listed as SpinPWM (in the photo currently i donā€™t have the green plug in it)
Google Photos

@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.

1 Like

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.