Actually the setup I'm using right now that is in the video is TTL modulation. The Lasers Analog modulation is not working properly and as I described I have to short out the positive and negative every time to get the laser to turn off. A Triac is normally for AC power because AC goes to 0 volts every cycle, but by me having the + and - of the modulation connections across MT1 and MT2 on the Triac, it does go to 0 volts every time the 2.5V signal from my pulse card that is connected to the gate turns off. When the signal from the pulse card goes to 2.5 volts, it puts that voltage to the modulation on the laser. This setup is only needed for my particular laser. The pulse card actually is a TTL signal of 2.5 volts and is 0 volts when nothing is blocking the photo interrupter and goes to 2.5V when it is blocked. Like I said before, I'm just powering the pulse card with the 5V coming from the USB port. A regulated 5V wall wart, like Dave is using would work also.
I have servos on my router, not steppers, so it may be more complicated to tie to an output pin in Mach to pulse the laser because the servo has to have an encoder feedback to Mach. I never really did any testing with tying to any output pins coming from Mach and was just wanting to make it as simple as possible by adding an external circuit. Dave has come up with the simplest setup for analog or TTL modulation for the laser if you want to use an external circuit that senses the Z axis movement.
For TTL, you just need the Photo Interrupter to be blocked or not quicker based on your slotted disk or cam.
One thing I did notice is the shorter the Z axis moves generated from PhotoVcarve, the smoother the motion when running the code and that is why I only generating the Z-.0015" and Z+.0015" motion to turn my laser on and off. If you make your depth of cuts considerably deeper, it will get real jerky when running your code. My 1W laser does instantly burn the birch plywood and basswood, but may not on harder woods. I have not tried any other wood yet, so I do not know. I'm sure it would require a more powerful laser, or running a considerably slower feedrate.
There are several ways to pulse a laser, either analog or TTL, with the output pins from Mach, special code, but this just worked best for me, on my machine, with my laser using the PhotoVcarve
software and how it generates the G-Code.
I did another picture yesterday that Tweakie lasered with his C02 laser and and in my opinion, the detail looks just as good as his without going through the complications on code generation for pulsing the laser in Mach. I'm now getting better results by how I'm processing the image in Corel PhotoPaint before bringing into the PhotoVcarve software.
Extensivly Re-worked/Re-designed/Modified Servo K2CNC KG-3925 and the Mini Laser Engraver