Hello Guest it is January 20, 2020, 01:07:39 PM

Author Topic: Add a laser to my CNC  (Read 11264 times)

0 Members and 1 Guest are viewing this topic.

Re: Add a laser to my CNC
« Reply #10 on: December 20, 2015, 11:21:09 AM »
Sorry, I missed the optional PWM connector.

If you have a PWM input, you do not need a PMDX-407, just configure
the spindle output in our plug-in to output on pin 14 or pin 16 and
feed that to the PWM input of the laser.

You will still need a 12 VDC power source for the laser and the negative
side of that power source must also connect to the GND on the
PMDX-410 so that the PMDX-410 and the laser share a ground
reference.



Steve Stallings
www.PMDX.com
For PMDX product support, please use PMDX forum or direct email for quickest response. We do not use this forum as our primary product support site.

Offline Pedio

*
  •  200 200
    • View Profile
Re: Add a laser to my CNC
« Reply #11 on: December 20, 2015, 10:05:50 PM »
Perhaps this is too much 'inside baseball' for this forum; however, I have to ask because I have #$%#@@% stuff up with bad grounds. To my defense who knew that electricity flows from the negative to the positive! They should put this in a book somewhere...     ::)

Ok - Can I connect the grounds for my PMDX-410 together with my power supply that drives a lot of ancillary items? I have a power supply that was scavenged out of an old PC that drives fans, digital thermometer, LED light on the router, etc. It has 12V running to the router to drive the LED that illuminates the area under the router. The LED is puugged into a nice DC connector on the head. It would be easy to take the 12V connector out and plug in a connector for the laser. I could then strap the grounds of the PMDX 132 and the scavenged power supply together. This would give me my ground for the PWM connection.

If I have offended the spirits of Watt and Volt please let me know...

One day I am going to understand this enough to be able to work on an old MG.
Re: Add a laser to my CNC
« Reply #12 on: December 21, 2015, 03:02:31 AM »
OK, settle in for a long post. Taking this from the top.....

For a typical CNC machine there may be many different "grounds".

The first is the safety ground. It starts as the ground wire that comes
to the machine through the mains power cord and should be connected to
the frame and cabinetry of the machine. When other considerations tempt
you to not ground the frame to the mains safety ground, think again.
Safety is the most important thing. Your computer, unless it is a laptop
or tablet, will also connect to this safety ground.

The next ground is the signal ground used by signals coming out of the
USB and parallel ports of the host computer. This ground is necessary
for the interface to "look" at the signals.

Desktop computers internally connect the safety ground to the signal ground
of USB ports and parallel ports. This is where problems can arise from ground
loops when the safety ground of the machine and the safety ground of the host
compute are not at the same voltage potential. This can happen when other
devices on the mains circuit are causing current to flow in the safety ground
wires of their mains connection. In industrial settings this can be tens of
volts sometimes. When the USB or parallel port cable is connected to the host
computer, and the signal ground at the machine is also connected to the
safety ground, then the ground wire in the USB or parallel port cable will
try to short these two grounds together and current will flow through
the ground of the cable. This is called a ground loop and it is not a good
thing.

The first step in avoiding ground loops is to power the host computer
from the same outlet or power strip as the machine. This will minimize the
magnitude of any voltage offset between the grounds. The next step is
to use an interface design that electrically isolates the signal ground of
the host computer from the safety ground of the machine. Low cost
interfaces such as the SmartBOB USB do NOT provide this isolation so
the quality of the safety ground wiring becomes more important.

Ground loops can also be avoided by using interfaces with isolation. This
can take the form of isolation on the host port side, or isolation on the
machine signal side. Sometimes both are utilized.

Isolation on the host port side can be implemented via Ethernet connections
which are, by design, isolated by a signal transformer. Isolation can also be
provided by special versions of the USB port on the controller or by an
isolation device in the cable between the controller and the host computer.

Isolation on the machine side can be provided by devices such as opto-isolators
and/or by simply avoiding connections between the machine interface signal
ground and the safety ground of the machine. It is common for axis motor
drivers to internally provide opto-isolation of their Step and Direction
signals. Geckodrive, Leadshine, and most packaged stepper and servo drives
do this. For low cost interfaces that do not have isolation circuits for the
machine control and status signals typically extend this concept by not making
connections between the control signals and the machine frame. This can be as
simple as not grounding limit switches and sensors to the frame of the machine,
and by using mechanical or solid state relays on output signals. When doing
this it becomes important that power sources for the sensors or relays are
also not grounded to the machine frame.

You mentioned that you are using a PMDX-132, and it provides opto-isolated
inputs for limit switches and sensors. This will allow you to connect the
ground side of these sensor inputs to the machine frame if necessary, but
without any special reason to do so, I would not.

When using axis motor drivers with isolated Step and Direction signals the
negative side of the power to the drivers can usually be connected to the
frame of the machine as long as that power supply is not powering anything
else such as sensors that connect to non-isolated inputs on the controller.
It is common to connect the negative side of this power supply to the frame
ground as it will often reduce the level of electrical noise radiated from
the motor wiring. Do not do this if your axis motor drivers do not have
isolated Step and Direction inputs.

In your case, you mention that have a PMDX-132 for mounting your axis motor
drivers. The DC power connections to it go only to the Gecko motor drivers which
have opto-isolators for the Step and Direction signals. The power supply going
to the PMDX-132s motor power connector can safely have its negative side tied
to frame ground of the machine as long as nothing else powered by it has a
grounding conflict.

Again, in your case, you mentioned a scavenged PC power supply being used for
accessory power. This power supply will, by design, have its safety ground
and the negative side of its outputs internally connected together.

Your proposed ElCheapo laser vendor does not document how the PWM interface
is implemented, but it is likely that the PWM signal uses the same ground
reference as the power input. This in combination with the scavenged power
supply having its negative side tied to safety ground means that whatever
drives the PWM input of the laser will also get its signal ground tied to
safety ground through the lasers power supply. In the specific case of the
PMDX-132, the logic level control outputs are opto-isolated from the host
computer port, but share a ground with the limit and home signal inputs.
This means that you should be able to safely connect the negative side of your
scavenged power supply to the ground of the J9 output signal connector of the
PMDX-132. This analysis applies ONLY to the PMDX-132 and is not valid for
other boards or to the PMDX-410's direct outputs. You must use the J9
connector on the PMDX-132.

I know this was a long description, but I hate giving a simple answer without
explaining the reasons for it.
Steve Stallings
www.PMDX.com
For PMDX product support, please use PMDX forum or direct email for quickest response. We do not use this forum as our primary product support site.

Offline Pedio

*
  •  200 200
    • View Profile
Re: Add a laser to my CNC
« Reply #13 on: December 21, 2015, 09:22:18 AM »
Thanks - I have had ground problems before and I have figured out it is not an easy problem.

I will let you know how the L-Cheapo works.

Offline Pedio

*
  •  200 200
    • View Profile
Re: Add a laser to my CNC
« Reply #14 on: January 30, 2016, 09:28:22 PM »
I got the laser working on my machine today. As Steve suggested I used the spindle control to activate the laser PWM. The only downside is the laser stays on even when making rapid moves. Since it moves the focal length with the Z axis movement it may not be a big problem. So far I have drawn shapes and have not played with complex patterns. Will try more tomorrow - stand by.

Offline Tweakie.CNC

*
  • *
  •  8,093 8,093
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: Add a laser to my CNC
« Reply #15 on: January 31, 2016, 05:30:18 AM »
I am following your progress and will be most interested to learn how you get on with changing the S#### (and thus the PWM) to switch your laser beam on / off.  In Mach3 the command is certainly far too slow but it is many times faster in Mach4 and it may work well.

Tweakie.
Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.

Offline Pedio

*
  •  200 200
    • View Profile
Re: Add a laser to my CNC
« Reply #16 on: February 01, 2016, 11:24:38 AM »
Yea - I got the laser to work!!! Right now I am using the normal post processor for Vcarve Pro so it turns on the spindle at the beginning and turns it off at the end. This causes light tails between the toolpaths when a rapid move occurs. On wood it can be sanded off easily. Today I will try to edit my post processor to turn on an off the spindle when the Z axis goes down and up. I will see if this is fast enough.

The engraving on the cutting board was done at a feedrate of 5 i/s and a rapid of 150 i/s. The Z axis was set at .05" with a plunge rate of 150 i/s. I used ramps to start each line so it did not put a little black dot at the beginning of the line. The engraving is on a bamboo cutting board that was purchased at Publix. The engraving is deep enough to feel with your fingernail.  So far I am pleased with the elCheapo laser. I purchased the v3.0 laser that has 3W of power and PWM control of the laser.

I will post something if I get my post processor to work to turn on and off the laser.

Offline Pedio

*
  •  200 200
    • View Profile
Re: Add a laser to my CNC
« Reply #17 on: February 01, 2016, 04:49:55 PM »
Yeaaaaa - I got the post processor for Vcarve Pro working for my laser. I added a spindle start (m03) before any feed type moves and spindle stop (M05) before a rapid move. I also added a M05 to the header and footer just in case. I guess it is possible for the file to end up at the home point and not engage a rapid move therefore leaving the laser on.

Disclaimer - use this at your own risk.

Here is the code - You need to copy down to the % mark. I had to put this post in as a quote so the forum did not look at some of the code as code for formatting the post.

Code: [Select]
+================================================
+                                               
+ Mach2/3 - Vectric machine output configuration file   
+                                               
+================================================
+                                               
+ History                                       
+                                               
+ Who      When       What                         
+ ======== ========== ===========================
+ Tony     15/11/2005 Written
+ Tony     06/01/2006 Added ATC option   
+ Tony     14/05/2006 Fixed G20 inch in header   
+ Tony     24/07/2006 Added G2 & G3 Arc support + removed (( ))
+ Tony     18/06/2007 Replaced the Tool comment       
+ Mark     14/08/2008 Added G1 to Feed moves, added New_Segment
+                     Removed 2nd G20 in header.
+ Mark     28/08/2009 Added G91.1 to force use of incremental arcs
+                     Added Substitution, File & Toolpath Notes.
+ Mark     30/11/2009 Added TOOLPATHS_OUTPUT.
+ Brian    15/12/2009 Remove M05 from NEW_SEGMENT
+ Mark     18/01/2014 Added Dwell
+Peter     2/1/16     Converted to Laser
+================================================

POST_NAME = "Mach Laser Arcs (inch) (*.txt)"

FILE_EXTENSION = "txt"

UNITS = "inches"

DIRECT_OUTPUT = "Mach|Mach4.Document"

SUBSTITUTE = "({)}"

+------------------------------------------------
+    Line terminating characters                 
+------------------------------------------------

LINE_ENDING = "[13][10]"

+------------------------------------------------
+    Block numbering                             
+------------------------------------------------

LINE_NUMBER_START     = 0
LINE_NUMBER_INCREMENT = 10
LINE_NUMBER_MAXIMUM = 999999

+================================================
+                                               
+    Formating for variables                     
+                                               
+================================================

VAR LINE_NUMBER = [N|A|N|1.0]
VAR SPINDLE_SPEED = [S|A|S|1.0]
VAR FEED_RATE = [F|C|F|1.1]
VAR X_POSITION = [X|A|X|1.4]
VAR Y_POSITION = [Y|A|Y|1.4]
VAR Z_POSITION = [Z|A|Z|1.4]
VAR ARC_CENTRE_I_INC_POSITION = [I|A|I|1.4]
VAR ARC_CENTRE_J_INC_POSITION = [J|A|J|1.4]
VAR X_HOME_POSITION = [XH|A|X|1.4]
VAR Y_HOME_POSITION = [YH|A|Y|1.4]
VAR Z_HOME_POSITION = [ZH|A|Z|1.4]
VAR SAFE_Z_HEIGHT = [SAFEZ|A|Z|1.4]
VAR DWELL_TIME = [DWELL|A|P|1.2]
+================================================
+                                               
+    Block definitions for toolpath output       
+                                               
+================================================

+---------------------------------------------------
+  Commands output at the start of the file
+---------------------------------------------------

begin HEADER

"( [TP_FILENAME] )"
"( File created: [DATE] - [TIME])"
"( for Mach2/3 from Vectric )"
"( Material Size)"
"( X= [XLENGTH], Y= [YLENGTH], Z= [ZLENGTH])"
"([FILE_NOTES])"
"(Toolpaths used in this file:)"
"([TOOLPATHS_OUTPUT])"
"(Tools used in this file: )"
"([TOOLS_USED])"
"[N]G00G20G17G90G40G49G80"
"[N]G70G91.1"
"[N]T[T]M06"
"[N] (Tool: [TOOLNAME])"
"[N]G00G43[ZH]H[T]"
"[N](Toolpath:- [TOOLPATH_NAME])"
"[N]([TOOLPATH_NOTES])"
"[N]G94"
"[N][XH][YH][F]"

+---------------------------------------------------
+  Commands output for rapid moves
+---------------------------------------------------

begin RAPID_MOVE

"[N]M05"
"[N]G00[X][Y]"


+---------------------------------------------------
+  Commands output for the first feed rate move
+---------------------------------------------------

begin FIRST_FEED_MOVE

"[N][S]M03"
"[N]G1[X][Y][F]"


+---------------------------------------------------
+  Commands output for feed rate moves
+---------------------------------------------------

begin FEED_MOVE

"[N][S]M03"
"[N]G1[X][Y]"

+---------------------------------------------------
+  Commands output for the first clockwise arc move
+---------------------------------------------------

begin FIRST_CW_ARC_MOVE

"[N][S]M03"
"[N]G2[X][Y][I][J][F]"

+---------------------------------------------------
+  Commands output for clockwise arc  move
+---------------------------------------------------

begin CW_ARC_MOVE

"[N][S]M03"
"[N]G2[X][Y][I][J]"

+---------------------------------------------------
+  Commands output for the first counterclockwise arc move
+---------------------------------------------------

begin FIRST_CCW_ARC_MOVE

"[N][S]M03"
"[N]G3[X][Y][I][J][F]"

+---------------------------------------------------
+  Commands output for counterclockwise arc  move
+---------------------------------------------------

begin CCW_ARC_MOVE

"[N][S]M03"
"[N]G3[X][Y][I][J]"

+---------------------------------------------------
+  Commands output at toolchange (Commented out)
+---------------------------------------------------

begin TOOLCHANGE

+[N]T[T]M6
+[N] (Tool: [TOOLNAME])
+[N]G43H[T]


+---------------------------------------------------
+  Commands output for a new segment - toolpath
+  with same toolnumber but maybe different feedrates
+---------------------------------------------------

begin NEW_SEGMENT

"[N][S]M03"
"([TOOLPATH_NAME])"
"([TOOLPATH_NOTES])"


+---------------------------------------------
+  Commands output for a dwell move
+---------------------------------------------

begin DWELL_MOVE

"G04 [DWELL]"

+---------------------------------------------------
+  Commands output at the end of the file
+---------------------------------------------------

begin FOOTER

"[N]M05"
"[N]G00[ZH]"
"[N]G00[XH][YH]"
"[N]M09"
"[N]M30"
%
« Last Edit: February 01, 2016, 04:57:19 PM by Pedio »

Offline Pedio

*
  •  200 200
    • View Profile
Re: Add a laser to my CNC
« Reply #18 on: February 01, 2016, 04:58:52 PM »
The laser will cut through masking tape so you can make your own paint masks for fancy items - too cool!

Offline Pedio

*
  •  200 200
    • View Profile
Re: Add a laser to my CNC
« Reply #19 on: February 02, 2016, 07:21:40 PM »
Burned a logo for the local sailing club in the back of a leather jacket I got at Goodwill today. It work fine. The lines were rather thin. I may try defocusing the laser to see if it gives a better result. Anyone tried doing leather with a laser? Tips would be appreciated.

Also, found an error in the post processor for Vcarve. Here is an update:

Code: [Select]
    +================================================
    +                                               
    + Mach2/3 - Vectric machine output configuration file   
    +                                               
    +================================================
    +                                               
    + History                                       
    +                                               
    + Who      When       What                         
    + ======== ========== ===========================
    + Tony     15/11/2005 Written
    + Tony     06/01/2006 Added ATC option   
    + Tony     14/05/2006 Fixed G20 inch in header   
    + Tony     24/07/2006 Added G2 & G3 Arc support + removed (( ))
    + Tony     18/06/2007 Replaced the Tool comment       
    + Mark     14/08/2008 Added G1 to Feed moves, added New_Segment
    +                     Removed 2nd G20 in header.
    + Mark     28/08/2009 Added G91.1 to force use of incremental arcs
    +                     Added Substitution, File & Toolpath Notes.
    + Mark     30/11/2009 Added TOOLPATHS_OUTPUT.
    + Brian    15/12/2009 Remove M05 from NEW_SEGMENT
    + Mark     18/01/2014 Added Dwell
    +Peter     2/1/16     Converted to Laser
    +================================================

    POST_NAME = "Mach Laser Arcs (inch) (*.txt)"

    FILE_EXTENSION = "txt"

    UNITS = "inches"

    DIRECT_OUTPUT = "Mach|Mach4.Document"

    SUBSTITUTE = "({)}"

    +------------------------------------------------
    +    Line terminating characters                 
    +------------------------------------------------

    LINE_ENDING = "[13][10]"

    +------------------------------------------------
    +    Block numbering                             
    +------------------------------------------------

    LINE_NUMBER_START     = 0
    LINE_NUMBER_INCREMENT = 10
    LINE_NUMBER_MAXIMUM = 999999

    +================================================
    +                                               
    +    Formating for variables                     
    +                                               
    +================================================

    VAR LINE_NUMBER = [N|A|N|1.0]
    VAR SPINDLE_SPEED = [S|A|S|1.0]
    VAR FEED_RATE = [F|C|F|1.1]
    VAR X_POSITION = [X|A|X|1.4]
    VAR Y_POSITION = [Y|A|Y|1.4]
    VAR Z_POSITION = [Z|A|Z|1.4]
    VAR ARC_CENTRE_I_INC_POSITION = [I|A|I|1.4]
    VAR ARC_CENTRE_J_INC_POSITION = [J|A|J|1.4]
    VAR X_HOME_POSITION = [XH|A|X|1.4]
    VAR Y_HOME_POSITION = [YH|A|Y|1.4]
    VAR Z_HOME_POSITION = [ZH|A|Z|1.4]
    VAR SAFE_Z_HEIGHT = [SAFEZ|A|Z|1.4]
    VAR DWELL_TIME = [DWELL|A|P|1.2]
    +================================================
    +                                               
    +    Block definitions for toolpath output       
    +                                               
    +================================================

    +---------------------------------------------------
    +  Commands output at the start of the file
    +---------------------------------------------------

    begin HEADER

    "( [TP_FILENAME] )"
    "( File created: [DATE] - [TIME])"
    "( for Mach2/3 from Vectric )"
    "( Material Size)"
    "( X= [XLENGTH], Y= [YLENGTH], Z= [ZLENGTH])"
    "([FILE_NOTES])"
    "(Toolpaths used in this file:)"
    "([TOOLPATHS_OUTPUT])"
    "(Tools used in this file: )"
    "([TOOLS_USED])"
    "[N]G00G20G17G90G40G49G80"
    "[N]G70G91.1"
    "[N] (Tool: [TOOLNAME])"
    "[N]G00G43[ZH]H[T]"
    "[N](Toolpath:- [TOOLPATH_NAME])"
    "[N]([TOOLPATH_NOTES])"
    "[N]G94"
    "[N][XH][YH][F]"

    +---------------------------------------------------
    +  Commands output for rapid moves
    +---------------------------------------------------

    begin RAPID_MOVE

    "[N]M05"
    "[N]G00[X][Y]"


    +---------------------------------------------------
    +  Commands output for the first feed rate move
    +---------------------------------------------------

    begin FIRST_FEED_MOVE

    "[N][S]M03"
    "[N]G1[X][Y][F]"


    +---------------------------------------------------
    +  Commands output for feed rate moves
    +---------------------------------------------------

    begin FEED_MOVE

    "[N][S]M03"
    "[N]G1[X][Y]"

    +---------------------------------------------------
    +  Commands output for the first clockwise arc move
    +---------------------------------------------------

    begin FIRST_CW_ARC_MOVE

    "[N][S]M03"
    "[N]G2[X][Y][I][J][F]"

    +---------------------------------------------------
    +  Commands output for clockwise arc  move
    +---------------------------------------------------

    begin CW_ARC_MOVE

    "[N][S]M03"
    "[N]G2[X][Y][I][J]"

    +---------------------------------------------------
    +  Commands output for the first counterclockwise arc move
    +---------------------------------------------------

    begin FIRST_CCW_ARC_MOVE

    "[N][S]M03"
    "[N]G3[X][Y][I][J][F]"

    +---------------------------------------------------
    +  Commands output for counterclockwise arc  move
    +---------------------------------------------------

    begin CCW_ARC_MOVE

    "[N][S]M03"
    "[N]G3[X][Y][I][J]"

    +---------------------------------------------------
    +  Commands output at toolchange (Commented out)
    +---------------------------------------------------

    begin TOOLCHANGE

    +[N]T[T]M6
    +[N] (Tool: [TOOLNAME])
    +[N]G43H[T]


    +---------------------------------------------------
    +  Commands output for a new segment - toolpath
    +  with same toolnumber but maybe different feedrates
    +---------------------------------------------------

    begin NEW_SEGMENT

    "[N][S]M03"
    "([TOOLPATH_NAME])"
    "([TOOLPATH_NOTES])"


    +---------------------------------------------
    +  Commands output for a dwell move
    +---------------------------------------------

    begin DWELL_MOVE

    "G04 [DWELL]"

    +---------------------------------------------------
    +  Commands output at the end of the file
    +---------------------------------------------------

    begin FOOTER

    "[N]M05"
    "[N]G00[ZH]"
    "[N]G00[XH][YH]"
    "[N]M09"
    "[N]M30"
    %

« Last Edit: February 02, 2016, 07:26:30 PM by Pedio »