GRBL Laser: Spindle Control

Mike, yeah I just verified with the oscope and resistor… d44 goes high on reboot. So this must be one of those things Chamnit was referring to.

On another note, I ran into a bug in grblmega5x that breaks pausing an M4 cut. An issue is already posted, but does not appear to be any PR for it. Seems simple, since M4 files aren’t calling M3 all the time, using M5 for pause won’t work. It needs to do something like send a G91G0X0Y0 for safety when pausing from M4 I think… or use M4 when restarting a laser cut. I saw some info related to running both laser and router at the same time… sounds like getting cam pp to handle the $32 is not going to be possible anyways… so the latter solution may be no go. The former solution I don’t think would work when using M3 though.

I know the dev is busy, but I am not sure I have the skills to handle this one. Anyone else looking into this?

On a related note, I think the same bug exists with flood and restarts… or at least in testing I don’t remember my flood turning back on either.

I found what so far has been a reliable workaround for this. I commented out #define DISABLE_LASER_DURING_HOLD in config.h, and now resuming a paused laser job works. I have played with it a bit pausing in many different scenarios (middle of a large laser on move, near several small mixed moves, etc), and the laser turned itself off during pause every time. Better yet, the laser also now turns itself back on after a pause.

This just allowed me to get 2hrs ahead on an etch before I went to bed last night. I continued it when I woke up this morning. I don’t normally babysit my cnc, but I am not quite to the point where I’m comfy sleeping while it is working. :slight_smile:

I am late to the party, but I am using the mainline grbl5x, and originally my laser was not shutting off using the default spindle pin. I chnaged it to use the D6 pin ( #define SPINDLE_PWM_ON_D6) and that fixed my issues. This only works if your laser supports a 5v pwm signal.

1 Like

Good post Dan. I also recognized the latest code on the “most official” grblmega5x has options to configure pwm on d6 or d8. It has a few other changes to the pinout from the older version I am using right now (aka enducross grblmega5x). Since all else is working well I have not ported my config to the latest grblmega5x. I likely won’t ever either, since I am currently in the process of upgrading to grbl esp32 anyways. However for those working with ramps, using the latest grblmega5x w/ the d6/d8 options is the way to go… d8 for a fet, or d6 for ttl.