<LONG POST> Just thought I'd post and let you know what I was up

Just thought I'd post and let you know what I was up to with LW/LW3 - In addition to the Ramps K40 I have picked up a Banggood A3 2.5W laser. After a couple hours of assembly and testing with the benbox software I decided to move a little further into it.

I installed the JT Photonics Branch of GRBL on it and set the jumper to v0.9. Much to my chagrin the 2.5W laser doesn’t do PWM very well. Only if the PWM changes are very slow will the laser keep up. On the bright side I was able to do greyscale with dithering and that actually worked fairly well. Pushing further I tried to use it with LaserWeb3 (GRBL).

Modifying the start/stop/end etc settings I generated some GCODE. I can jog the machine and it seems to run fairly well…until I send GCODE from LaserWeb3. After some indeterminate time it corrupts the communication and I get error: unsupported command.

The line that it chokes on is:
Sent: G1 F1200 X9.02687276038705e-7 Y18.46436716475577 Z0 S255 Q: 2575
Recv: error: Unsupported command

I can take this same gcode and send it without issue in UGS. I’m not sure if UGS “massages” the GCODE into proper “grammar” when it encounters something like this or if it just carries on it’s way issuing the next command in the buffer. even if an error is encountered. LW3 appears to halt sending resulting in a “stuck” state. I’m also guessing that my RAMPS board might locks up for similar reasons. The bad thing here is when LW3 locks up the communication and won’t let me software e-stop the machine requiring a reset (LASER is left at whatever power it was at). I really don’t think these machines are capable of the kind of precision represented here anyhow since it’s 80 steps a mm.

Is it possible to add an option so output format be to a “X” digit long non-scientific notation 0.000000009 would have been better - even though the machine couldn’t actually get there moving in 0.0125 MM STEPS? It would likely result in smaller easier to read GCODE as well.

So i summary LW3 G-code works with the Banggood A3 2.5W laser, but the sender seems to “choke up”. The laser module itself is capable of PWM as long as it’s set and “dwells”…to get “greyscale” engraving varying the speeds with the laser on full throttle might be the only way I can use it for photo engraving other than dithering (which looks pretty good)…I haven’t done a ton of testing on the range between say 200 and 255 to see if it works better at that end of the spectrum…but my guess is no. The kit is well made (documentation is poor, and so is the video but good enough to put together if you have built something similar in the past). If the laser module was better it would be good. They don’t really sell this as a PWM capable unit…so I can’t really fault them on it…especially since just he parts would run me more than the $204 I paid for the entire kit shipped.

I’m going to make a blog post on the setup, setup and config at some point soon.

Top engrave PWM based greyscale test. (T2 LASER)
Middle engrave dithered (T2 LASER)
Just right and below (LW3 - lockup - burned through the wood before I could hit the reset button.
Bottom left same LW3 output sent using UGS.

Nice,. very well explained. There were some safety features added in LW to prevent the machine from running if it encountered an error. Maybe this is causing it to choke. Please add your file and line errors as an issue in github https://github.com/openhardwarecoza/LaserWeb3

Thanks Ariel! I’m guessing that’s the problem (certainly sounds like it) - unfortunately it puts the machine into a more unsafe state than if it just carried on (laser firing and not moving). The next move is so close it likely doesn’t matter if that move gets dropped. I’ll post up tomorrow or monday!

Are you using the foil as your engraving area?

Alex…yes - not the greatest idea…but it does prevent me from burning the table. I’m sure if I let it sit long enough the foil would burn too. And for he record I don’t recommend this…I just happened to have this handy and figured better be safe than sorry.

Added an issue #147. I suggest fixed output with maximum precision of 0.0001 for inches and 0.001 for mm. This follows with the GCODE wiki entries for G20 and G21. Precision greater than that isn’t likely going to do much or going to be measurable without some exotic tools.

If you want to convert the laser diode to PWM controlled, you can get a really nice driver from DTR Laser Shop for about $26.00

I might give that a shot. The module does respond to PWM the intensity does change but the marking only seems to happen at 100% or close too it. I mean visually I can see the brightness change. Maybe I need to really slow it downed keep the laser off it’s MAX setting to do “greyscale”. Ill have to play with the intensity/speed to see if I can get it to go at a lower speed…or maybe try different version of GRBL. I used this one because it has on-the-fly S value changes.

The china laser modules are hit or miss with their linear response to the PWM signal. The x-drive and super x-drive drivers from DTR laser is a pretty good option.

A couple of us over on the http://benboxlaser.us forum have started upgrading our modules. There are some good threads there on how to do the conversion if you need any help. I’m also currently testing my 4 amp driver design. The Kicad files are freely available and there is discussion thread over there too.

Needless to say, I’m here because I had the same problem this morning with GRBL 0.9j.
http://benboxlaser.us