When I switched to GRBL I found the dir pin always reset to up whenever another axis moved. this strange interaction did not affect the stepper because there were no pulses on the step pin. all that was needed was a simple d flip flop to keep the state. it turns out a 12c508 pic micro is cheaper than a d flip flop....
Step 1: Assembly
I added a bi color led so i could see the laser status without having the laser connected. then I added a 3 pin jumper to select direction pin polarity.
if you are using a dedicated laser engraver this wouldn't be necessary as you could change the polarity of the pin in software. I use my machine for both laser and milling/engraving so I wanted an easy way to match it to the setup of the z axis of the mill.
I have used this circuit with a 2n2222 to drive a mechanical relay, with a 2n2222 pulling a p-channel mosfet, and with a solid state relay. the method you choose depends on your laser system.
Step 2: PROTECT YOURSELF!
The first and most expensive investment you will make is a quality set of Laser Safety Glasses. This is not optional.
Step 3: The Laser
There are many types and sizes of Lasers. The first one I experimented with was salvaged from a DVD burner. It was about 350mW but was a little weak for what I wanted. It would easily burn anything dark but had trouble with light woods and cork. I wanted to engrave the cork in the bottom of drink coasters.