Replaced main board, now jobs stop right after starting. Shows Busy

I have a cheap HORZPIL LC400 Pro 40W. The mainboard went bad, so I replaced it with an Arduino Uno and a Two Trees CNC shield. I loaded GRBL on the Arduino through LaserGRBL and got the direction, steps per mm, and homing set. I set the spindle max to 255 and set the laser mode to enabled. I also set the S-value max to 255 in Lightburn’s settings. I can home properly and I can fire my laser with the Fire button.
When I start a job or try to run a framing, the laser move a few mm, the laser fires for about 1/2 a second, and then the laser tuns off and I get no more movement.
All I get in the console is:

[VER:1.1h.20190830:]
[OPT:VZ,15,128]
Target buffer size found
ok
<Idle|WPos:0.000,0.000,0.000|FS:0,0|WCO:0.000,0.000,0.000>
ok
Starting stream
Grbl 1.1h [‘$’ for help]
[MSG:‘$H’|‘$X’ to unlock]
And below the console I see a progress bar that says Busy. The only way I can do anything after that is to restart Lightburn. No issues moving the laser at all manually though.
$$
$0=10
$1=25
$2=0
$3=2
$4=0
$5=0
$6=0
$10=0
$11=0.010
$12=0.002
$13=0
$20=1
$21=1
$22=1
$23=3
$24=25.000
$25=250.000
$26=250
$27=1.000
$30=255
$31=0
$32=1
$100=78.120
$101=78.120
$102=250.000
$110=10000.000
$111=10000.000
$112=4000.000
$120=10.026
$121=10.000
$122=10.000
$130=400.000
$131=400.000
$132=0.000
ok

I read that I might have an issue with not supplying enough current so I got a 12V 7A DC power supply to replace the 12V 4A DC one that came with the laser. That didn’t help a bit.
Starting to feel a bit wonkers, help would be pretty awesome at this point!

The $110 and $111 speeds seem high; reduce them to 5000 mm/min, then revise upward after it works.

The $120 and $121 accelerations seem exceedingly low. Bump those to 250 mm/s², then revise upward or downward as needed.

The $130 and $131 limits probably don’t match the actual travel limits. Verify it homes correctly, pulls off the switches properly, and can jog to 400 mm from the home point: If so, happy dance. If not, tweak the values down to match reality.

If those adjustments improve its disposition, you can follow the usual tuning & adjustment process:

And if not, report back and other folks can jump in …

Thank you for the insights. I made adjustments and tried again. I’m still getting the same results.
Output from trying to run a Frame:

G1F100S102.5:ok
ok
<Idle|WPos:0.000,0.000,0.000|FS:0,0|WCO:0.000,0.000,0.000>
ok
Starting stream
[MSG:Pgm End]
Stream completed in 0:05
<Idle|WPos:0.000,400.000,0.000|FS:0,0|WCO:0.000,0.000,0.000>
ok
Starting stream
[MSG:Pgm End]
Stream completed in 0:05

G1F100S102.5:ok
ok
<Idle|WPos:0.000,0.000,0.000|FS:0,0|WCO:0.000,0.000,0.000>
ok
Starting stream

Current settings:

$$
$0=10
$1=25
$2=0
$3=2
$4=0
$5=0
$6=0
$10=0
$11=0.010
$12=0.002
$13=0
$20=1
$21=1
$22=1
$23=3
$24=25.000
$25=250.000
$26=250
$27=1.000
$30=255
$31=0
$32=1
$100=78.120
$101=78.120
$102=250.000
$110=5000.000
$111=5000.000
$112=4000.000
$120=250.000
$121=250.000
$122=10.000
$130=400.000
$131=400.000
$132=0.000
ok

Mmmmm

Make sure you’ve selected the GRBL device type, rather than GRBL-M3 or something else.

There’s likely something obvious I’m missing, so upload a failing *lbrn2 file and everybody can poke into it.

I may have found the problem. I rebooted and got presented with an initramfs prompt. I have disk corruption and bad blocks on the PC HDD. Ill rebuild the PC with a new SSD this morning and let you know how it goes after that.

Unfortunately my hard drive was not the problem. I have a different PC with a new SSD and new installation of Ubuntu, and Lightburn. I can Frame now, and now when I try to start a job it at least goes to the starting position rather than firing the laser as soon as it starts moving. However, as soon as the laser does fire, all movement stops and the laser goes right back off. Also, I am able to stop the job now and then resume manual controls. I wasn’t able to do that before. I just verified that the machine type is GRBL and not some variant.

Nothing new in the console logs, no errors:

[MSG:Caution: Unlocked]

ok

[VER:1.1h.20190830:]

[OPT:VZ,15,128]

Target buffer size found

ok

Starting stream

Layer C00

Grbl 1.1h [‘$’ for help]

[MSG:‘$H’|‘$X’ to unlock]
I’ve attached a simple test job that is failing.

CircleTest.lbrn2 (12.4 KB)

OK, now that it’s moving at least a little, the problem seems to be power related. The console log suggests the controller goes through a hard reset just after the layer starts, which can happen when the laser lights up and the power supply browns out.

Higher power cheap lasers seem to come with marginal power supplies. Add up the stepper motor current ratings, the input current for the laser, and an amp for the controller: double that number and buy a power supply around that rating, because whatever you have now is likely inadequate.

If you don’t know the stepper settings, figure 2 × 2A. The laser is probably 40 W input and the supply is likely 12 V, so figure 4 A. Overall, the total might be 9 A, so the power supply should be rated around 15-ish amps.

If that is what you’ve got, then the power supply is totally inadequate:

  • Power Output 12V 4A

I also suspected it could be power related.i. Read in some other forums that some other folks ran into the same issues and had to increase the current. I found a 12 V 7 A Power supply And Attached that
without any difference in result. I should have a few PC ATX power suplies laying around. Ill get the PS changed and let you know.

My back of the envelope says that’s just barely on the better side of inadequate.

The problem is the laser diode instantly going from zero to 4 A, which is a big jolt for a marginal switching supply. Small supplies tend to have very small output capacitors and correspondingly little energy storage, so the output voltage drops dramatically before the regulator can pick up the load.

The motivation for a grossly oversized supply is to get more energy storage for those pulse loads. They’re overqualified for the average load, but just about right for the pulse load.

Okay, I’ve got a PC ATX PS on supplying it now. I can supply 12 volts @ 17 amps on each 12 volt rail. Still having the same behavior. I also tried disconnecting the power and PWM from the laser before running the job and it still goes to the starting position then just stops.

[VER:1.1h.20190830:]

[OPT:VZ,15,128]

Target buffer size found

ok

G1F100S102.5:ok

ok

G0 X130Y190

ok

G1 X319S200F200

ok

G1F100S102.5:ok

ok

G1F100S102.5:ok

ok

Starting stream

Layer C00

Job halted

Stream completed in 1:01



M5

That changes the evidence again!

It previews and runs just fine here on a completely different laser, of course.

The (tweaked, I presume) GRBL parameters seem sensible, I’m sure the power supply isn’t the problem, and I’m out of ideas.

Paging @berainlb! What are we missing?

Just catching up on this Topic.

Want to make sure I have it right for the current state. Even with laser module completely disconnected, the laser will move to first position and then stop?

If so, I suggest checking the basics. Leave the laser module disconnected while you do this:

  1. Confirm that the jogging controls in Move window work as expected. Up moves up, down moves down, left move left, and right moves right.
  2. Do jogging controls move the specified distance?
  3. Take a full screenshot of LightBurn with the design loaded and ready to burn. Please have Cut window and Laser window showing for the screenshot.
  4. Try doing a square frame. What happens?
  5. Save the gcode for the design. File->Save gcode, use .txt extension, then upload file here
  6. Run these commands in Console and return the full output:
$H
$#
?
  1. After the job stops, what state is the machine and LightBurn in? Are you able to continue communicating and controlling the laser?
  2. There’s a non-zero chance that this is a communication issue. Have you tried swapping USB cables?

Movement:
Movement works correctly (right=right, left=left,up=to back,down=to front)

Jogging:
Jogging goes the correct distance. I moved 100mm up and right without issue.

Frame:
When I run a square frame, it goes to the start position and stops just like when I try to run a job. I stays showing Busy under where is says Laser at 98%.I have to Click Stop to do anything else.

Console output from start to finish with comments (###)

Grbl 1.1h [‘$’ for help]
[MSG:‘$H’|‘$X’ to unlock]
$X
[MSG:Caution: Unlocked]
ok
$H

G1F100S102.5:ok
ok
?
<Idle|WPos:0.000,0.000,0.000|FS:0,0|WCO:0.000,0.000,0.000>
ok
Starting stream
G21 G54
G91
G1 X0 Y100 F6000 S0
G90
M2
[MSG:Pgm End]
Stream completed in 0:01
?
<Idle|WPos:0.000,100.000,0.000|FS:0,0|WCO:0.000,0.000,0.000>
ok
Starting stream
G21 G54
G91
G1 X100 Y0 F6000 S0
G90
M2
[MSG:Pgm End]
Stream completed in 0:01
$H
G1F100S102.5:ok
ok
Project file saved as Line_Test.
$H
$H
$#
[G54:0.000,0.000,0.000]
[G55:0.000,0.000,0.000]
[G56:0.000,0.000,0.000]
[G57:0.000,0.000,0.000]
[G58:0.000,0.000,0.000]
[G59:0.000,0.000,0.000]
[G28:0.000,0.000,0.000]
[G30:0.000,0.000,0.000]
[G92:0.000,0.000,0.000]
[TLO:0.000]
[PRB:0.000,0.000,0.000:0]
ok
?
<Idle|WPos:0.000,0.000,0.000|FS:0,0|WCO:0.000,0.000,0.000>
ok

Starting Frame

Starting stream
Grbl 1.1h [‘$’ for help]
[MSG:‘$H’|‘$X’ to unlock]
Stream completed in 2:08

This is where I clicked Stop.

Grbl 1.1h [‘$’ for help]
[MSG:‘$H’|‘$X’ to unlock]
error:9
G-code locked out during alarm or jog state.
[MSG:Caution: Unlocked]
ok
When I try to run the Line_Test gcode (or any other) The laser goes to the starting point, Stops, and Lightburn just shows Busy below where it says Laser on the right. To do anything else from that point I have click the Stop button even if I wait a long time for the job to “complete”.
I haven’t tried a different USB cable but this is the once I have been using with this laser since I got it.


Line_Test.lbrn2 (2.7 KB)
Line_Test.txt (255 Bytes)

Try running each line from the gcode file one line at a time in Console. What happens?

G00 G17 G40 G21 G54
G90
M4
; Cut @ 200 mm/min, 20% power
M8
G0 X140Y189
; Layer C00
G1 X240S200F200
M9
G1 S0
M5
G90
; return to user-defined finish pos
G0 X0 Y0
M2

May be an issue with the new controller. Or curious if you’re having a grounding issue. However, if you’re not losing connection then it may not be the root cause. Seems like to me that the controller may be reporting that it’s done what you’ve asked.

Also, can you take a screenshot of Edit->Device Settings?

I looks like the connection is being reset or comms are lost when the laser is told to come on. I also tried running the next command (G1 S0) when I got an error about the feed rate.

G00 G17 G40 G21 G54

ok

G90

ok

M4

ok

M8

ok

G0 X140Y189

ok

G1 X240S200F200

ok

Grbl 1.1h [‘$’ for help]

[MSG:‘$H’|‘$X’ to unlock]

[MS:Caution: Unlocked]

ok

M9

ok

G1 S0

error:22

Feed rate has not yet been set or is undefined.

I had a time trying to figure out what controller to buy. Everything just looked so cheap. I went with an arduino Uno and a Two Trees CNC V3 shield. Whats recommended?

This should work adequately fine although I would typically suggest a 32-bit controller at this point.

A couple of things:

  1. change S Value Max to 255 in Edit->Device Settings
  2. I do suggest trying a different cable, preferably one with a ferrite choke

And to confirm, you ran this test with the laser module disconnected? If not, try again with it disconnected. If the issue only persists when connected make sure that the pin assignment is correct between the shield and laser module.

Thank you. I had $30=255 and s value max set set to 255 before starting this thread. I still have the laser disconnected. Ill try a different USB cable. Would you mind please recommending a board or manufacturer? There is a lot of crap out there.

I don’t do board recommendations. Too many options and too many variables. I have some previous posts where I list some alternative boards.

Having said that, there’s no reason this board shouldn’t work fine. GRBL was developed on Arduino boards and the Shield is really just a clean way of exposing the Arduino.

Could it be that the usb is over writting one of the instruction and gives that error?

Can you change the DTR setting?

:smile_cat:

I have a lot of experience with grbl, but unfortunately not driven by LightBurn.
I agree that it seems that the command buffer gets overwritten causing a loss of commands and a full lock of the communication.
Normally this is avoided with a sending program that is aware of the buffer size, or by having Grbl toggling DTR to pause the communication.
The “Enable DTR signal” toggle under “Device Settings” should take care of that…