Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: John in Ottawa on February 13, 2019, 01:47:08 PM

Title: Using a PWM controlled laser, Mach 4 vs Mach3
Post by: John in Ottawa on February 13, 2019, 01:47:08 PM
Hello everyone.  I will start by saying I've tried to find what is surely an existing discussion (or 3) about this, but the search engine wasn't getting me anywhere, so with apologies....

I am an existing Mach3 user, driving a Leadshine Mx4660 and 4 axes.  I've just acquired an Endurance diode laser that I would like to mount on my CNC table and control without changing up my wiring.  I don't use spindle control presently, so would like to use that for the laser (I think that makes sense so far).

One of the issues I've read about with Mach 3 is that there were delays in processing the laser on/off and intensity levels such that direct control of laser by Mach3 wasn't really great.  There are add on modules from places like J-Tech Photonics, but these are a couple of hundred $US plus the cost of a 5th axis stepper driver, and I would still be running Mach 3, which is getting long in the tooth.

Has Mach4 solved the laser issues?  ie, can I directly control laser on, off and intensity as required for raster / variable intensity picture engraving without an add on module? 

If so, then I would rather manage the upgrade to Mach4 than add hardware.

Thanks in advance for your patience in answering this question (for the nth time)....

John
Title: Re: Using a PWM controlled laser, Mach 4 vs Mach3
Post by: Tweakie.CNC on February 14, 2019, 05:15:10 AM
Quote
One of the issues I've read about with Mach 3 is that there were delays in processing the laser on/off and intensity levels such that direct control of laser by Mach3 wasn't really great. 

 That may have been the case when the Mach3 M11/M10 command set was not working correctly but that problem was fixed when build R3.043.056 was released some 6 years ago. Mach3 has been working just fine for me ever since.


Title: Re: Using a PWM controlled laser, Mach 4 vs Mach3
Post by: John in Ottawa on February 14, 2019, 10:06:53 AM
Thank you for this update!

I'd also be interested in learning if you had any success using Mach3 to engrave grayscale images and your thoughts on Mach4.

Cheers
John
Title: Re: Using a PWM controlled laser, Mach 4 vs Mach3
Post by: Tweakie.CNC on February 14, 2019, 10:45:59 AM
I think that I have had reasonable success at engraving grayscale images with Mach3 over the years and a couple of pictures are attached.

With Mach4 it is still early days with raster engraving (mainly because it is the job of the motion controller to set the variable PWM signal required) but it is progressing.

Tweakie.
Title: Re: Using a PWM controlled laser, Mach 4 vs Mach3
Post by: John in Ottawa on February 14, 2019, 10:59:35 AM
I would call that success!    I am running ArtCam Premium still, which I think uses a very similar post processor to Vectric.  Would you mind sharing what software you used to produce that art?

Thanks again
John
Title: Re: Using a PWM controlled laser, Mach 4 vs Mach3
Post by: kbelcar on February 14, 2019, 01:11:01 PM
Great work Tweakie! This pictures are made with diode laser and Mach3?
Title: Re: Using a PWM controlled laser, Mach 4 vs Mach3
Post by: John in Ottawa on February 14, 2019, 08:24:06 PM
An add on question - do you use the smoothstepper with Mach3 or mach4?  Is it necessary with Mach 3 to get the results you did?

Thanks!
John
Title: Re: Using a PWM controlled laser, Mach 4 vs Mach3
Post by: Tweakie.CNC on February 15, 2019, 01:46:04 AM
Hi Guys,

The pictures posted were all produced using a CO2 laser and the Impact/Laser Engraving plugin for Mach3 using just the LPT Parallel Port. This plugin and my introduction to it can be downloaded from here; http://tweakie.byethost10.com/Engraving.zip
The plugin is not particularly easy to use as getting all the settings just right can be a little tricky but it can be done. The original images that I used for testing were not modified but they were chosen for good contrast and no background.

As mentioned, Mach4 requires a motion controller and I use the ESS. Warp9 have now included Vector and Raster engraving routines within their plugin and further details are available here;
https://www.warp9td.com/index.php/faq/faq-mach4#LaserSetup

Another Mach4 motion controller is the 57CNC from Polabs and they have included some special routines to allow laser images to be reproduced with the free software Auggie. Further details can be found here; https://www.machsupport.com/forum/index.php?topic=12444.msg248511#msg248511

Hope this helps.
Title: Re: Using a PWM controlled laser, Mach 4 vs Mach3
Post by: darrenf1628 on June 12, 2019, 05:17:29 PM
Another quick question if you don't mind, just to clarify for me!  I'm using Mach3 with the Warp9 ESS. My Win7 computer doesn't have a parallel port. Would the ESS plugin for Mach4 also work with my Mach3? 

Would the Mach3 laser plugin work with my ESS?

Or how would you suggest I get mine setup?

Would adding a parallel port into a pci slot work?

I have read hundreds of posts and can't find a definitive answer and I thought that you Tweakie are the right person to ask.

TIA
Title: Re: Using a PWM controlled laser, Mach 4 vs Mach3
Post by: Tweakie.CNC on June 13, 2019, 01:04:46 AM
Quote
Would the ESS plugin for Mach4 also work with my Mach3? 

No

Quote
Would the Mach3 laser plugin work with my ESS?

No

Quote
Would adding a parallel port into a pci slot work?

Yes (The Mach3 plugin was intended to operate with a 32 bit PC - I have never tried using the Parallel Port with a 64 bit PC).

Hope this helps,

Tweakie.

Title: Re: Using a PWM controlled laser, Mach 4 vs Mach3
Post by: darrenf1628 on June 13, 2019, 05:34:49 AM
Thank you so much for your reply!

So can I just run the PWM/TTL wires from a 32bit parallel port, to my BOB and onto my laser driver then, the Impact/Laser engraver module will work?

Or will I need to use a stepper driver and use the Step/Dir pins from this spare axis to send the signals? This would also involve creating/editing a PP to send the Z up and Z down signals to turn the laser on and off.

Sorry for all the questions but there's so many options I've read about and I'm a bit confused.
Title: Re: Using a PWM controlled laser, Mach 4 vs Mach3
Post by: Tweakie.CNC on June 13, 2019, 06:11:21 AM
Quote
So can I just run the PWM/TTL wires from a 32bit parallel port, to my BOB and onto my laser driver then, the Impact/Laser engraver module will work?

No, that is not the way the Impact/Laser Engraver plugin works.
My introduction to the plugin can be downloaded from the link given in post #7   
The .pdf explains operation of the plugin in more detail (no PWM signal is required).

Quote
Or will I need to use a stepper driver and use the Step/Dir pins from this spare axis to send the signals? This would also involve creating/editing a PP to send the Z up and Z down signals to turn the laser on and off.

No, the plugin uses Digital Trigger pulses (derived from the axis step pulses) no Post Processor is required neither is any Z axis movement required to turn the laser on or off.

You may find more information in my web pages here;
http://www.tweakie.byethost10.com/27_files/Page652.htm

Hope this helps,

Tweakie.
Title: Re: Using a PWM controlled laser, Mach 4 vs Mach3
Post by: darrenf1628 on June 13, 2019, 06:15:13 AM
I'll check those out... Thank you!
Title: Re: Using a PWM controlled laser, Mach 4 vs Mach3
Post by: darrenf1628 on June 14, 2019, 04:54:19 AM
I've read through the links you gave me, thanks! There's a LOT of information on your laser project thread. 😊
Are you still using the inline parallel port with the opto-couplers? I'd saw the pictures before but never really took it in, exactly what I was looking at. That's some fantastic work you've done!

Do you have the specification for the opto-couplers and the LED resistors (so I can search on eBay for them)? Also can the two parallel ports with the breadboard be bought, or did you custom build that as well?  I know it's not a breakout board as such but it's doing the same job. It's probably obvious to you but, I'm not too experienced with electronics. I can solder and the circuit layout doesn't look too complicated but all these things are easy, when you know how!  Your instructions/schematics are really good, I just need some part numbers/specs to start.

I've also read Jtech photonics options for controlling a laser using Mach3.  They recommend using a TB6560 4axis board or a DB25 Dual BOB adapter.  Are these like 'off the shelf' versions of your setup?

I checked my parallel port on my computer and unfortunately it has 3.3v outputs.  I have older computers laying around so, I'll get one that has 5v outputs.

Finally, I haven't been able to get confirmation that the ESS will work alongside the parallel port.  I was thinking/hoping that if I enabled the second parallel port in Mach3 settings then, the 2nd parallel port would control the laser and the ESS would control everything else.
Title: Re: Using a PWM controlled laser, Mach 4 vs Mach3
Post by: Tweakie.CNC on June 14, 2019, 05:36:18 AM
The Optocoupler I used was Type PC123 and the 1k resistor was 1/8th Watt.

I made the 25 way connector circuit board but I have seen DB25 Male to Female Test / Measurement Adapters available on ebay – perhaps worth a look.

Be careful of the cheap Chinese 4 axis boards – sometimes they work and sometimes they don’t. This forum has plenty tales of woe from buyers of the cheap stuff.

If you are going to be using the Parallel Port then a 5 Volt version is essential.

You cannot use the Parallel Port and the ESS at the same time.
If you have an ESS then why not use the Warp9 laser control system ?
 https://warp9td.com/index.php/faq/faq-mach4#LaserSetup


Tweakie.
Title: Re: Using a PWM controlled laser, Mach 4 vs Mach3
Post by: darrenf1628 on June 14, 2019, 07:38:49 AM
I know, it's very frustrating because that's for Mach4. I'm using Mach3.

Newfangled solutions have developed a few plugins for Mach4 called LUA, Core and Regfile.  I don't think these will work with Mach3
Title: Re: Using a PWM controlled laser, Mach 4 vs Mach3
Post by: Tweakie.CNC on June 14, 2019, 07:53:09 AM
Quote
Newfangled solutions have developed a few plugins for Mach4 called LUA, Core and Regfile.  I don't think these will work with Mach3

I don't think they will either.  ;)

Tweakie.