Hello Guest it is April 26, 2024, 11:17:12 AM

Author Topic: Mach3, USB (no LPT port), Grayscale (TTL/PWM) laser engraving  (Read 1444 times)

0 Members and 1 Guest are viewing this topic.

Mach3, USB (no LPT port), Grayscale (TTL/PWM) laser engraving
« on: February 03, 2022, 03:55:41 AM »
I'm new here, so I hope this topic is placed in the right section.

So I bought a Chineese CNC 3040:
https://eur.vevor.com/product/010415909177/Vevor-4-Axis-Cnc-3040-Engraving-Milling-Machine-Usb-Port-Milling-Pvc-Tech

I thought in upfront it would be not to hard to put a laser on it, I'm not the first to try it, but it quite hard to do.

First tried the spindle solution to see for my self if there are really delay's and there is.

The problem is that the commands M11Px and M10Px are not working on my USB board, link to the board:
https://nl.aliexpress.com/item/33004819615.html

It is quite a nice board with the stepper drivers included. I guess it is from the same developer from the widely spread BSMCEO4U, it uses the same driver and some components on the board.

So the only left solution would be to use for example the z-height for the laser power ? And count the steps ? (and adapt the post processor to use z-height for laser strength) ?

« Last Edit: February 03, 2022, 04:05:23 AM by Gatze »

Offline Tweakie.CNC

*
  • *
  •  9,200 9,200
  • Super Kitty
    • View Profile
Re: Mach3, USB (no LPT port), Grayscale (TTL/PWM) laser engraving
« Reply #1 on: February 03, 2022, 04:39:14 AM »
Just as an example…

Going back a few years with both Mach3 and Mach4 - before the Mach4 M62Px/M63Px commands (the equivalent to the Mach3 M11Px/M10Px commands) were implemented I used the spindle S### word to set my PWM (laser power level) and then gated this signal with the A axis (or Z axis) Direction signal to switch my laser ON/OFF without any undue switching delays being introduced.

This short video demonstrates how it works when alternating between a relatively high laser power for cutting and a relatively low laser power for engraving within the same Gcode file:
https://www.flickr.com/photos/tweakie-cnc/27822699768/in/dateposted/

A method for gating the PWM and an axis Direction signal can be found in this post (for M11/M10 read A or Z axis Direction pin):  https://www.machsupport.com/forum/index.php?topic=12444.msg265104#msg265104

Perhaps this may suggest a way forward.

Tweakie.
PEACE
Re: Mach3, USB (no LPT port), Grayscale (TTL/PWM) laser engraving
« Reply #2 on: February 03, 2022, 05:05:49 AM »
But you keep a constant PWM then ? Because changing the PWM (M3 Sx) is causing the delay's as I understood ? And if so, is a greyscale image still possible then ?

And thank you for your answer, I read a lot of your (high quality) posts.

Offline Tweakie.CNC

*
  • *
  •  9,200 9,200
  • Super Kitty
    • View Profile
Re: Mach3, USB (no LPT port), Grayscale (TTL/PWM) laser engraving
« Reply #3 on: February 03, 2022, 05:09:00 AM »
Sorry I posted the wrong video link. I will try to find the correct one.

Tweakie.
PEACE

Offline Tweakie.CNC

*
  • *
  •  9,200 9,200
  • Super Kitty
    • View Profile
Re: Mach3, USB (no LPT port), Grayscale (TTL/PWM) laser engraving
« Reply #4 on: February 03, 2022, 06:38:30 AM »
This is the video I meant to link to:
https://www.flickr.com/photos/22787396@N02/51859597943/in/datetaken/

The PWM runs continuously and the S### word is updated during the G00 moves (when the laser is OFF) with M3 only used at the start of the Gcode and M5 at the end. The laser is switched ON/OFF with the gated PWM / axis Direction signal and this does not break the CV chain so there is no delay in the switching sequences.
It would not be possible to produce Greyscale images using this method.
Way back then, I used the Mach3 Laser/Impact engraving plugin for greyscale images but that can’t be used with USB PC connections (Parallel Port only).

Although I have not tried it, I understand that Mach4 will now allow the M3 S### command to be changed ‘on the fly’ without breaking the CV chain – this may be another possibility worthy of consideration but Mach4 is currently lagging behind in the world of Laser control.

Tweakie.
PEACE
Re: Mach3, USB (no LPT port), Grayscale (TTL/PWM) laser engraving
« Reply #5 on: February 04, 2022, 06:49:07 AM »
I think I will try to use the 4th axis and count the steps and convert it to PWM. Eventuelly overtime I want to build a grbl system but for now time/money is a bit an isue.

Offline Tweakie.CNC

*
  • *
  •  9,200 9,200
  • Super Kitty
    • View Profile
Re: Mach3, USB (no LPT port), Grayscale (TTL/PWM) laser engraving
« Reply #6 on: February 04, 2022, 11:11:28 AM »
Sounds like a good solution, please keep us updated on you progress.

Tweakie.
PEACE