Hello Guest it is July 14, 2024, 03:21:20 AM

Author Topic: Installing a Laser - a nightmare to me!  (Read 10481 times)

0 Members and 1 Guest are viewing this topic.

Installing a Laser - a nightmare to me!
« on: July 12, 2022, 01:45:13 AM »
I am using Mach 3 and Gecko 540 on a router cutter.  The router works perfectly.
The laser is three wire - 12 volt and a 5 Volt  PWM connections.
I have set up the spindle setup with relay control M3 and M4 at 2.  Motor control with PMW on.
Outputs are using pin1 and pin 14
I am using M3 and M5 in the G code and S for power.

I hope the above is correct.  If not please advise.

My question is how do I wire up the PWM circuit so that the laser is active and switches off and on rapids in accordance with the G Code?

FYI - If I apply 5 Volts DC to the PWM line and an earth to the laser head it fires 100% all the time and cuts really well.

Please help as I now have bald patches.  Any help is much appreciated.
« Last Edit: July 12, 2022, 01:47:23 AM by advall »
Re: Installing a Laser - a nightmare to me!
« Reply #1 on: August 12, 2022, 08:17:56 PM »
So I recently finished installing a laser on my router. Here’s some things I found.
1. The PWM needs a ground reference. There isn’t a terminal, so you might have make one. I used a shielded cable and connected the shield to the ground terminal on my controller (Ethernet SmoothStepper) and the chassis of the laser. Without the ground, the PWM was just noise on my oscilloscope, with the ground it was a mostly clean 5v square wave.
2. I had to learn to use different gcode.
 I’m using Mach 4 but the only post processor I could find that worked with fusion 360 was a Mach 3 post processor generously created by Tweakie on this Forum. This post processor uses M10 P1 and M11 P1 codes to turn the laser on and off. I think P1 means they had assigned the laser to output 1. My laser is assigned P20 since I use output 20. The only thing I have to add to the Gcode is a few lines at the beginning. See below.

m2003 (LASER_VECTOR_PWM_PERCENTAGE=85)
m2003 (LASER_VECTOR_FREQUENCY=20000)
m2003 (LASER_VECTOR_GATE_DELAY=0.5)
m2003 (LASER_VECTOR_GATE_DURATION=0.5)

m2004 (This enables Vector Laser)

And then add the rest of your code, using M11 P1 S255 to turn on the laser and M10 P1 to turn it off

Hope this helps.
Re: Installing a Laser - a nightmare to me!
« Reply #2 on: November 28, 2022, 10:32:20 PM »
I have made some headway in the last few months.
Using M3 and M5 and a Vetric post processor the laser now turns on and off under direction of G1 and GO commands.
However using S100 command i am only getting a 2.7 volt PWM signal not the expected 5.0 volt.  Moreover the signal is very dirty and shows a chopped signal on the scope.
Cutting trials indicate about half power as one would expect from a 2.7 v PWM signal.
Any assistance is much appreciated

Offline Tweakie.CNC

*
  • *
  •  9,214 9,214
  • Super Kitty
Re: Installing a Laser - a nightmare to me!
« Reply #3 on: November 29, 2022, 12:27:17 AM »
Switching a laser ON/OFF under Mach3 using the M3/M5 commands is not the best way because of the time delay involved and to resolve this issue the M11/M10 command set was introduced by Artsoft and it is very effective.
To switch and control the power of a laser (under Mach3) is not complicated but there is a bit of work that needs to be done (it is not just 'Plug & Play').
If it helps, the best and easiest method I have found is detailed in this thread...  https://www.machsupport.com/forum/index.php?topic=12444.msg265104#msg265104
PEACE
Re: Installing a Laser - a nightmare to me!
« Reply #4 on: November 30, 2022, 08:29:17 PM »
Thanks Tweekie.

I cannot use M10/11 commands as one of my laser programs does not recognise them so i am stuck with M3/M5 so not a major issue.

Have traced a continuity issue to a faulty DB25 cable.  All now is working well except the PWM voltage directly out of the computer port is only 4.02 Volts and the scope trace is fine.  M3 and M5 works flawlessly and power is set to S100.

I assume I need to get 5 volts PWM to achieve full power.   Any help is much appreciated as the laser only a 5 watt laser diode.

I love cats too!!!
« Last Edit: November 30, 2022, 08:30:53 PM by advall »

Offline Tweakie.CNC

*
  • *
  •  9,214 9,214
  • Super Kitty
Re: Installing a Laser - a nightmare to me!
« Reply #5 on: December 01, 2022, 01:01:09 AM »
I have, and very occasionally use, low power diode lasers. The output power of these lasers is controlled by the ‘Mark/Space’ ratio of the PWM signal rather than by it’s actual voltage level. Having said that I do gate together the PWM and M11/M10 with additional circuitry which I assume maintains the PWM at 5 volts peak although I have never actually thought to measure it.

Just a suggestion but you could try routing your PWM signal through an opto coupler (or two) taking power from the PC’s USB port – that should give you 5 volts peak.

Tweakie.
PEACE