Need help with PWM laser control in Mach3


Results 1 to 6 of 6

Thread: Need help with PWM laser control in Mach3

  1. #1
    Registered
    Join Date
    Oct 2017
    Location
    Canada
    Posts
    22
    Downloads
    0
    Uploads
    0

    Default Need help with PWM laser control in Mach3

    I am new to PWM control and need some help. I have a DIY CNC router that DOES NOT use spindle control and I am adding a 6W diode laser.I have followed many of the online youtube videos on setting this up in Mach3 but can't seem to get it working. I have several questions that I think may point me in the right direction.

    1. My breakout board does not have a spindle relay. Any instruction I have found use a board with a spindle relay. Do I need a new board?
    2. My board only has a 5V input. Any boards with a spindle relay also have a 12-24V input for the PWM. Do I need a new board?
    3. If I get a board with the spindle relay, do I connect the TTL input to the laser controller to the relay output or to the PWM ports on the board?
    4. If I get this working, can I manually turn the laser on and off using the spindle control in Mach3?

    Any help would be greatly appreciated



  2. #2
    Member torkcm's Avatar
    Join Date
    Nov 2019
    Posts
    3
    Downloads
    0
    Uploads
    0

    Default Re: Need help with PWM laser control in Mach3

    My breakout board does not have a spindle relay. Any instruction I have found use a board with a spindle relay. Do I need a new board?
    --You shouldn't need a new board, just buy a relay board. This is the one I have https://www.amazon.com/gp/product/B07DSYTJMD (one controls the spindle, the other the laser)

    My board only has a 5V input. Any boards with a spindle relay also have a 12-24V input for the PWM. Do I need a new board?
    --The PWM comes from Mach3's parallel port pin usually pin 14 or what ever pin you have defined on the spindle for ports and pins. So shouldn't need a new board, it's just a pin on the BOB.

    If I get a board with the spindle relay, do I connect the TTL input to the laser controller to the relay output or to the PWM ports on the board?
    --The TTL connects to the PWM pin defined for the spindle on the BOB and ground.

    If I get this working, can I manually turn the laser on and off using the spindle control in Mach3?
    --Yes, I just got this all working on my setup with Mach3 and a gecko G540 controller.

    I have my laser connected to pin 1 (output 2) for the relay to send 12v power to the laser unit. I setup a fake C-Axis so I could use the direction pin to toggle the TTL on/off, but to get this to work I had to build a "AND Gate" circuit with pin 1, C Axis dir pin, and the PWM pin. Sounds confusing but this allows me to use my current spindle and laser in the same profile with PWM/TTL control.



  3. #3
    Member torkcm's Avatar
    Join Date
    Nov 2019
    Posts
    3
    Downloads
    0
    Uploads
    0

    Default Re: Need help with PWM laser control in Mach3

    Attached are some pictures of my wiring setup. Let me know if you need me to screen shot my Mach3 setup.

    I have my laser set to power on the relay with M4, G0C0 TTL off, G0C-1 TTL on, and I can do S# to set the laser power output. Since I have a spindle I share the PWM pin. so S24000 is laser full 100% power, S12000 50% power, and S0 0%, but since there is a delay when running S commands I set power at the beginning of the GCode and then use the C-Axis direction pin, G0C0/G0C-1 to fire the laser on/off instantly. I was able to do the raster photo print in about 10 minutes.

    Attached Thumbnails Attached Thumbnails Need help with PWM laser control in Mach3-relayboard-jpg   Need help with PWM laser control in Mach3-laserrelaycircuit-jpg   Need help with PWM laser control in Mach3-laserphoto-png   Need help with PWM laser control in Mach3-andgatecircuit-jpg  

    Need help with PWM laser control in Mach3-laser-jpg   Need help with PWM laser control in Mach3-bob-jpg  


  4. #4
    Member ZASto's Avatar
    Join Date
    Apr 2005
    Location
    Vanuatu
    Posts
    304
    Downloads
    3
    Uploads
    0

    Default Re: Need help with PWM laser control in Mach3

    You will always have lag in changing laser power with S parameter.
    Mach3 is not ment to work with lasers. Somewhere should be a thread in which @Tweakie explained how he dealt with laser (might be on NFS forum? Can't remember, was long time ago).
    Anyway, as you are using parallel port, you could try GRBL controller (Arduino based) connected to your drivers.
    This video shows GRBL in action.



    Make no mistake between my personality and my attitude.
    My personality is who I am. My attitude depends on who you are.


  5. #5
    Member najmpierre's Avatar
    Join Date
    Dec 2021
    Posts
    4
    Downloads
    0
    Uploads
    0

    Default Re: Need help with PWM laser control in Mach3

    Nice work you got there torkcm.
    I have a laser that activates when I "disconnect" the TTL from GND. If I can connect TTL to GND it shuts off.
    I think this is called active HIGH.
    I want to invert the logic hence when I connect the 2 cables together I want the laser to activate, what kind of circuit do i need to accomplish this?



  6. #6
    Member
    Join Date
    May 2013
    Location
    Canada
    Posts
    2
    Downloads
    3
    Uploads
    0

    Default Re: Need help with PWM laser control in Mach3

    Quote Originally Posted by torkcm View Post
    Attached are some pictures of my wiring setup. Let me know if you need me to screen shot my Mach3 setup.

    I have my laser set to power on the relay with M4, G0C0 TTL off, G0C-1 TTL on, and I can do S# to set the laser power output. Since I have a spindle I share the PWM pin. so S24000 is laser full 100% power, S12000 50% power, and S0 0%, but since there is a delay when running S commands I set power at the beginning of the GCode and then use the C-Axis direction pin, G0C0/G0C-1 to fire the laser on/off instantly. I was able to do the raster photo print in about 10 minutes.
    Hi,
    Love your setup, would very much like to give it a try on my CNC.
    Would you be kind enough to provide specs for your relays?
    Thank you very much for your time.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Need help with PWM laser control in Mach3

Need help with PWM laser control in Mach3