Duet 3 Mini MPCNC and laser
-
@markz thank you for the information.
Given that I am just using out6 to turn the CNC on and off with no PWM control would it be better to move the Spindle to another pin and then use this for the laser:
-
@YYCSparks I'd leave the spindle where it is. You just need a spare pin for the laser, of which you have at least 3 - use out5. Then use the M950 to tell RRF which pin the laser is connected to. My impression is that you wanted a 12V output and the one you're pointing at is 5V.
The fact that they name one pin for laser doesn't mean it has to be used for it. I think they do this because it's the only 5V PWM pin - but you don't need 5V.
-
@markz Yes you are right I need a 12 volt not a 5 volt so I will more forward with your recommendation.
Thank you for your time and advice.
-
@markz sorry, silly question but where do you switch the Tool in use?
As well I would really rather not fry my laser or board so if this is my laser and the cable I have in the image below.
Then I need to connect the Red and Black to a 12volt power source as I am using a 24volt supply so I will need a buck converter to bring that down to 12volt correct.
Then the yellow PWM wire to the v_outlc2+ pin? -
@YYCSparks Usually the tool switch is done as part of the manufacturing software. So, in Fusion360 if you have it machine more than one step and the steps use different tools then it will automatically generate the tool switching code in-line in the gcode. The tool definition includes a tool number.
Here's a piece from my Fusion360 manufacturing tab showing the tool number and offset options.
As for the 24V to 12V thing, hmmm - if you are only sending DC voltages (on/off) then a DC converter would be fine. It won't work for PWM if the laser requires that since it can't switch that fast.
-
@YYCSparks most likely the PWM wire needs a TTL level signal, in which case the LASER/VFD output on the Duet 3 Mini would be suitable; but check with the datasheet for the laser module.
-
@YYCSparks If you haven't looked at it yet, I'd recommend looking at:
https://docs.duet3d.com/en/User_manual/Machine_configuration/Configuration_laser
-
Thank you both @markz and @dc42 for you help and advise.
After checking the VFD ports looks to do what I want it to for the PWM control so I followed the Guide that Mark posted about setting up a laser.I moved the spindle SSR control to out5 and setup this in my config:
M452 C"out6" R255 F200
In the guide it lists the Frequency at 200, is there a way to tell what this is on the laser?
I think I am pretty close so I apricate the help.
Also it looks like CNC and laser modes are two seperate things, if so what or how would you setup the machine swap back and forth? -
@YYCSparks Usually the machine will swap back and forth under control of the manufacturing application (Fusion360). When you're using a laser it sends the laser command to RRF during the job.
You can do this more manually by setting the laser manually and not having the manufacturing app do any laser setting.
There are lots of intro Youtube videos about using a laser with Fusion360.
I use MPCNC as the Fusion360 postprocessor. It's slightly out of date for RRF.
It uses these two (old RRF) lines to set the CNC Mode ->
DuetMillingMode: "M453 P2 I0 R30000 F200", // GCode command to setup Duet3d milling mode DuetLaserMode: "M452 P2 I0 R255 F200", // GCode command to setup Duet3d laser mode
In my copy of mpcnc I've got them commented out, but you could use them updated for RRF 3. The new version commands are:
// GCode command to set Duet3d milling mode M453 // GCode command to set Duet3d laser mode .. laser uses out5 pin inverted, PWM frequency 200Hz M452 C"out5" F200
I don't really understand the interaction between this setting and the 'spindle' definition.
-
@markz that's funny my setup is an MPCNC as well and I have used it for CNC work and thought I had a reasonable handle on things but getting this laser going had me stumped for sure so thank you very much for the help.
So I hadn't really thought if using the laser for cutting I was looking at it more for engraving and I didnt even really think about the fact I could use Fusion360 to create the GCode for that, while it can cut and I can see that, can it engrave? I have not found any examples of using it for that work.
Okay so I have a Macro setup now as I am using Extruder 0 to send 12volts to the laser and then the out 6 pin to control the laser so I have a Macro like this:
Laser On:;Turn On Laser and set Laser Mode M291 P"Turning on the laser standby, make sure you have saftey glasses." R"Warning" S3 ; screen message M42 P2 S1 M452 C"out6" R255 F200 ; Enable Laser mode, on out6, with max intensity being 255, and a PWM frequency of 200
Laser Off
;Turn Off Laser and set CNC Mode M291 P"Turning off the laser standby, and going back to CNC mode." R"Warning" S3 ; screen message M42 P2 S0 M453
-
@YYCSparks I've never had a laser on my CNC so don't have any idea how yours is wired nor the interaction with the M452 and MPCNC. If you'd like to post the Laser model I'll take a look at their doc, but someone with a laser would know this better.
-
@markz its alive, Thank you for your help and advice.
https://youtube.com/shorts/x23cIedPRH4?feature=share
Jesse