4541
Show"N"Tell ( Your Machines) / Re: The Laser Project.
« on: June 26, 2014, 06:04:05 AM »
Something I keep getting asked about is CO2 laser output power control by using the Mach3 generated PWM signal and the S********* command in the GCode program. This is not something I prefer to do as I always treat engraving and cutting toolpaths as two different operations separated by a tool change. However, PWM control had to be done.
Well, pre-set laser output power is not a constant – it will vary dependant on tube temperature and it’s cutting / engraving ability will also vary dependant on ambient temperature as well as the type of material and it’s moisture content etc. etc. As a result a GCode program with a defined power setting may run just fine today but may need some adjustment to run just as well tomorrow.
There is always more than one way to accomplish anything but this is the best solution I have come up with so far. It does however need a bit of extra hardware to function but this is simple enough to make and just fits inline with the LPT cable to the machine.
The maximum laser power is still manually set and the GCode S********* command controls the actual laser output power between (approx.) 0% to 100% of the maximum that has been set. This allows for the laser output power variations, mentioned above, to be compensated for and adjusted on a day-to-day basis without having to make any changes to the GCode program.
This method basically gates together the Mach3 PWM signal with the M11P1 / M10P1 command codes on Output# 1 just by using a pair of opto-couplers and the LED series resistor values have been chosen to present a loading on the LPT port of no more than 5mA per pin which is well within it’s capability.
This method negates the set-up time delay associated with switching the PWM signal with the M3 / M5 commands by leaving the Mach3 PWM signal constantly running then just applying it as required with the M11P1 / M10P1 commands. Provided any changes to the laser output power are commanded by entering the S********* command on a separate line in the GCode no delays in changing power levels have been noticed and engraving / cutting within the same program is easily accomplished.
The circuit is extremely basic and can be easily made and fitted to an existing machine (which is controlled by the LPT port, of course) and the following pics. Show just what I have done.
(It should be noted that the Vcc required for the opto-transistor is provided by the pull-up resistor included within the laser PSU’s TTL(L) input. If this is not available then a 10k pull-up resistor to +5 Volts may need to be added).
My Mach3 set-up is as follows (please note - your pin numbers may be different).
PWM base frequency 500
Minimum PWM 0
Relay – M3 Output #2
Spin up / down delays all 0
Spindle √ 17 0 X X 1 1
Output #1 √ 1 16 X
Spindle pulley 1 Min speed 0 Max speed 100 Ratio 1
The GCode program uses M3 followed by S********* (0 to 100) which is essentially percentage of full power. Thereafter changing power by entering a new S********* command and the laser is switched on / off by the M11P1 / M10 P1 commands. The program then has M5 at the end.
Nice little project for a rainy day perhaps ?
Tweakie.
Well, pre-set laser output power is not a constant – it will vary dependant on tube temperature and it’s cutting / engraving ability will also vary dependant on ambient temperature as well as the type of material and it’s moisture content etc. etc. As a result a GCode program with a defined power setting may run just fine today but may need some adjustment to run just as well tomorrow.
There is always more than one way to accomplish anything but this is the best solution I have come up with so far. It does however need a bit of extra hardware to function but this is simple enough to make and just fits inline with the LPT cable to the machine.
The maximum laser power is still manually set and the GCode S********* command controls the actual laser output power between (approx.) 0% to 100% of the maximum that has been set. This allows for the laser output power variations, mentioned above, to be compensated for and adjusted on a day-to-day basis without having to make any changes to the GCode program.
This method basically gates together the Mach3 PWM signal with the M11P1 / M10P1 command codes on Output# 1 just by using a pair of opto-couplers and the LED series resistor values have been chosen to present a loading on the LPT port of no more than 5mA per pin which is well within it’s capability.
This method negates the set-up time delay associated with switching the PWM signal with the M3 / M5 commands by leaving the Mach3 PWM signal constantly running then just applying it as required with the M11P1 / M10P1 commands. Provided any changes to the laser output power are commanded by entering the S********* command on a separate line in the GCode no delays in changing power levels have been noticed and engraving / cutting within the same program is easily accomplished.
The circuit is extremely basic and can be easily made and fitted to an existing machine (which is controlled by the LPT port, of course) and the following pics. Show just what I have done.
(It should be noted that the Vcc required for the opto-transistor is provided by the pull-up resistor included within the laser PSU’s TTL(L) input. If this is not available then a 10k pull-up resistor to +5 Volts may need to be added).
My Mach3 set-up is as follows (please note - your pin numbers may be different).
PWM base frequency 500
Minimum PWM 0
Relay – M3 Output #2
Spin up / down delays all 0
Spindle √ 17 0 X X 1 1
Output #1 √ 1 16 X
Spindle pulley 1 Min speed 0 Max speed 100 Ratio 1
The GCode program uses M3 followed by S********* (0 to 100) which is essentially percentage of full power. Thereafter changing power by entering a new S********* command and the laser is switched on / off by the M11P1 / M10 P1 commands. The program then has M5 at the end.
Nice little project for a rainy day perhaps ?
Tweakie.