Hello Guest it is December 26, 2024, 08:32:02 PM

Author Topic: Laser control on and off using Z  (Read 10000 times)

0 Members and 1 Guest are viewing this topic.

Laser control on and off using Z
« on: September 22, 2016, 06:03:39 PM »
Been searching the internet for anything about controlling a relay (which controls a laser on/off) by using the Z axis.  There is a lot of talk about -Z turning the laser on and +Z turning the laser off.  That is exactly what I want to do.  But there is nothing mentioned for my hardware configuration, which I figured is quite common.

I use Solidworks and HSMxpress to produce my G-code.  I don't want to edit my G-code at all.  And I don't want to have to change to another suite of software. 

I am using a USB BOB http://www.automationtechnologiesinc.com/products-page/breakout-boards/3-axis-cnc-usb-card-mach3-200khz-breakout-board on my laser gantry. 

Anyway, I am not sure how to wire in a relay on the Z Axis outputs of this card.  Pulse+ and Direction+ are always 5V and so I am not exactly sure how to integrate the Pulse- and Direction- into the scheme of controlling a relay.  Even a circuit to latch the relay to itself may work.  Any ideas?

On a side note, will research setting up Mach3 as a plasma cutter, but even on this board there isn't much on that.  And I am not sure of its features and how it will operate the laser.   

Offline Tweakie.CNC

*
  • *
  •  9,279 9,279
  • Super Kitty
Re: Laser control on and off using Z
« Reply #1 on: September 23, 2016, 04:27:38 AM »
For your Z axis if you measure the voltage between +5v (Dir+) and Dir- it will change between 0v and 5v depending on which direction the axis was last moved.
Connecting a relay directly may not be a good idea (the Dir- can only sink 50mA current and it is already driving the Z axis controller) so use an opto coupler (or similar device) to drive your relay from the +5v and Dir- terminals.

Tweakie.
PEACE
Re: Laser control on and off using Z
« Reply #2 on: September 23, 2016, 09:20:53 AM »
Thanks Tweakie for the info, I've got a stash of 5V optically coupled solid state relays that may fit the bill. 

Offline boxin

*
  •  10 10
Re: Laser control on and off using Z
« Reply #3 on: March 01, 2017, 12:05:06 AM »
For your Z axis if you measure the voltage between +5v (Dir+) and Dir- it will change between 0v and 5v depending on which direction the axis was last moved.
Connecting a relay directly may not be a good idea (the Dir- can only sink 50mA current and it is already driving the Z axis controller) so use an opto coupler (or similar device) to drive your relay from the +5v and Dir- terminals.

Tweakie.


Hi Tweakie.
I just asked this a moment ago, but on a very old thread. I think it's more appropriate to do it here, I hope you can help me.
Could you tell me why when I use this method, the laser stays on only a flash? The laser does not stay on for the entire path, only turns on for an instant.

Offline Tweakie.CNC

*
  • *
  •  9,279 9,279
  • Super Kitty
Re: Laser control on and off using Z
« Reply #4 on: March 01, 2017, 01:40:54 AM »
Quote
Could you tell me why when I use this method, the laser stays on only a flash? The laser does not stay on for the entire path, only turns on for an instant.

Hi Boxin,

I can't explain that. The Direction signals are persistent (they will remain at the set TTL level until changed). I have never used a relay because of the switching delay introduced but I have never had any trouble switching my laser on / off just using TTL level signals.

Could you perhaps explain in a bit more detail how you are controlling your laser ?

Tweakie.
PEACE

Offline boxin

*
  •  10 10
Re: Laser control on and off using Z
« Reply #5 on: March 01, 2017, 02:04:56 AM »
I'll try...

But I think that if the signal must be persistent, there must be the problem ...
My BOB is this (due to my laptop, I can not use the parallel port for a traditional one):

https://www.aliexpress.com/item/Factory-outlets-100KHz-CNC-mach3-USB-4-Axis-Stepper-Motor-Driver-Breakout-Board-USBCNC-Smooth-Stepper/32334451366.html?spm=2114.13010608.0.0.cJRtzN

Mi laser:

https://www.aliexpress.com/item/Focusable-450nm-2W-Laser-Engraver-445nm-2000mW-Blue-Laser-Diode-Module-with-TTL-for-CNC-Engrave/32745647304.html?spm=2114.13010608.0.0.bcOG86

The laser takes 12V from an ATX power supply.
To excite the TTL input of the laser, I am connecting a relay between + 5V and DIR- on my BOB (DIR- of Z & A axis, I have tried both).
This relay connects 5V from the same ATX power supply and sends them to the TTL input.

But beyond this connection, now I understand that the DIR signal must be persistent as you say (If I do not want to use some kind of monostable or flip-flop).
I have not measured the DIR-voltage changes, but I assume it will be almost imperceptible in my digital tester.
What I'm wondering is: is it possible that this USB BOB works differently than a traditional BOB via parallel port?
Would it affect Mach3 at all if the DIR signal is not persistent?
From what I could see when setting high values on the Z axis when the laser is turned on, it stays on during the travel of this axis. That's why there is only a flash when I want to activate it quickly.

What do you think?

Offline boxin

*
  •  10 10
Re: Laser control on and off using Z
« Reply #6 on: March 01, 2017, 02:15:24 AM »
One more thing. The outputs work properly, I mean, their signals are persistent (M3) until I turn them off (M5), I have used them for the laser but there was an unwanted response time, so my interest in using one of the axes (as everyone, I think).

Offline Tweakie.CNC

*
  • *
  •  9,279 9,279
  • Super Kitty
Re: Laser control on and off using Z
« Reply #7 on: March 01, 2017, 02:15:54 AM »
Hi Boxin,

Firstly, connect a multimeter to the 5 Volt supply from your ATX and confirm that the voltage remains constant

If that is OK then measure the direction signal TTL voltage from your BoB - it could be that it does not have persistent TTL levels for the direction signal output (as you suspect).

Tweakie.
PEACE

Offline boxin

*
  •  10 10
Re: Laser control on and off using Z
« Reply #8 on: March 01, 2017, 02:20:19 AM »
I'm at work right now, but I will.
However, as I said above, using the same ATX power supply and the outputs activated with M3 and M5, I had no problems. So I do not think the problem are the 5V.

Offline boxin

*
  •  10 10
Re: Laser control on and off using Z
« Reply #9 on: March 01, 2017, 02:24:23 AM »
Wait, please completely rule out a power supply fault.
Now I remember that at the recommendation of the seller of the laser, the only thing I'm doing with the relay is to join TTL- with TTL +, there is no need to send any level of voltage if it is working at all-nothing.