515,144 active members
5,307 visitors online
Register for free
Login
Results 1 to 1 of 1
  1. #1
    Member
    Join Date
    Oct 2017
    Posts
    22

    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

    Join Date
    Nov 2019
    Posts
    3

    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

    Join Date
    Nov 2019
    Posts
    3

    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.

  4. #4
    Registered
    Join Date
    Apr 2005
    Posts
    134

    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.

    https://www.youtube.com/watch?v=P7El-Vc4RBg
    Make no mistake between my personality and my attitude.
    My personality is who I am. My attitude depends on who you are.

Posting Permissions

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