gnea / grbl

An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on a straight Arduino
https://github.com/gnea/grbl/wiki
Other
4.04k stars 1.61k forks source link

Safety Door Not Restarting Laser After Job Paused #1220

Open HowardSmith69 opened 1 year ago

HowardSmith69 commented 1 year ago

Hi,

I've just completed (but not finished) my first DIY CNC laser cutter, using a laser diode. GRBL is..., well it is just amazing!

However I can't get ENABLE_SAFETY_DOOR_INPUT_PIN to work, have been trying for a while, have hit a brick wall and now turn to you for help. It will probably be me, doing something wrong.

ENABLE_SAFETY_DOOR_INPUT_PIN was uncommented within the config.h file, recompiled and uploaded to the Arduino Uno R3 (not a clone). A microswitch was attached to the lid, drawing pin A1 to ground when the lid is shut (Normally Open).

When the device is powered on with door open everything is normal. Trying to home results in an alarm. Unexpected but OK. Close lid and machine homes. Start job with lid closed and everything fine. Open lid, job stops, laser is off and status in UGS is 'DOOR'. All good. *Close lid, job restarts from where it left off, however the laser is not on.

I thought the laser comes on when the lid is shut to complete the job. The SpinDr pin goes to a transistor controlling 12 volts to the laser. Putting a multimeter to this pin, shows it is high when the job restarts, that does not appear to the problem, it seems like PWM is not going to the laser.
Looked but can't find a solution; am I missing a step on the restart?

*The job only restarts when closing the lid if I have the normally closed side of the microswitch pulling A2 to ground. Without that, the job does not restart and I have to push Play on UGS. However even then, the job recommences, but the laser does not switch on.