Duet as Laser Cutter Controller? June 01, 2015 06:39AM |
Registered: 9 years ago Posts: 299 |
(Start cutting path id: path3457) (Change tool to Default tool) G00 Z5.000000 G00 X5.653829 Y4.380786 G01 Z-0.125000 F100.0(Penetrate) G01 X5.629136 Y4.380786 Z-0.125000 F400.000000 G00 Z5.000000 (End cutting path id: path3457)
Re: Duet as Laser Cutter Controller? June 01, 2015 07:05AM |
Registered: 9 years ago Posts: 14,659 |
Re: Duet as Laser Cutter Controller? June 01, 2015 07:43AM |
Registered: 9 years ago Posts: 299 |
Quote
dc42
The Duet firmware already has an option to drive the cooling fan output whenever extrusion is taking place. So you could use the extrusion commands in the gcode to turn the cutter on/off. See [reprap.org].
Re: Duet as Laser Cutter Controller? June 01, 2015 08:49AM |
Registered: 8 years ago Posts: 177 |
Re: Duet as Laser Cutter Controller? June 01, 2015 06:16PM |
Registered: 9 years ago Posts: 299 |
Quote
M571 This turns an output on whenever extrusion is being done, and turns it off when the extrusion is finished. The output could control a fan or a stirrer or anything else that needs to work just when extrusion is happening. The S parameter sets the value of the PWM to the output. 0.0 is off; 1.0 is fully on.
Re: Duet as Laser Cutter Controller? June 01, 2015 06:57PM |
Registered: 9 years ago Posts: 14,659 |
Quote
Radian
I expected the "output" for M571 to be the Fan0 output but it's not switching...
Quote
M571 This turns an output on whenever extrusion is being done, and turns it off when the extrusion is finished. The output could control a fan or a stirrer or anything else that needs to work just when extrusion is happening. The S parameter sets the value of the PWM to the output. 0.0 is off; 1.0 is fully on.
Is there some other output it relates to?
Re: Duet as Laser Cutter Controller? June 02, 2015 06:12AM |
Registered: 9 years ago Posts: 299 |
Re: Duet as Laser Cutter Controller? June 02, 2015 06:25AM |
Registered: 9 years ago Posts: 665 |
Re: Duet as Laser Cutter Controller? June 02, 2015 06:57AM |
Registered: 9 years ago Posts: 14,659 |
Re: Duet as Laser Cutter Controller? June 02, 2015 07:01AM |
Registered: 9 years ago Posts: 299 |
M106 S0 ;fan off M571 S1.0 ;fan 100% on extruder moves G1 E5 F200 ;extrude
Re: Duet as Laser Cutter Controller? June 02, 2015 07:12AM |
Registered: 9 years ago Posts: 665 |
Re: Duet as Laser Cutter Controller? June 02, 2015 07:31AM |
Registered: 9 years ago Posts: 299 |
Quote
zombiepantslol
I've just looked at the code (of my fork) and it looks like the fan value is toggled only when a new move starts. This means you must either send a (valid) non-extrusion move or M107 to turn it off again.
Re: Duet as Laser Cutter Controller? June 02, 2015 07:34AM |
Registered: 9 years ago Posts: 14,659 |
Quote
Radian
Quote
zombiepantslol
I've just looked at the code (of my fork) and it looks like the fan value is toggled only when a new move starts. This means you must either send a (valid) non-extrusion move or M107 to turn it off again.
So it does! I've got to think about how that affects things - I can't see a print (cut) move stopping at the end and just sitting there so I guess it will be OK. There's always a bit of paranoia involve with laser cutting though.
Re: Duet as Laser Cutter Controller? June 02, 2015 07:48AM |
Registered: 12 years ago Posts: 1,611 |
Quote
shadow651
I do find the lack of open source laser stuff bizarre. For the most part laser cutters/engravers hardware is a 3D printer without the Z axis and extruder drive, and a laser in place of the nozzle. Since the duet supports this I wonder how much work it would be to have a laser cutter head that could be swapped out for the hot end....
Re: Duet as Laser Cutter Controller? June 02, 2015 07:54AM |
Registered: 9 years ago Posts: 2,472 |
Re: Duet as Laser Cutter Controller? June 02, 2015 08:02AM |
Registered: 9 years ago Posts: 299 |
Quote
dc42
I'll change the code in my fork so that if the Move module runs out of moves, and M571 has been used to turn the fan output on, the fan output is turned off again.
Re: Duet as Laser Cutter Controller? June 02, 2015 08:06AM |
Registered: 9 years ago Posts: 2,472 |
Quote
shadow651
I'd be interested in seeing your setup.
I do find the lack of open source laser stuff bizarre. For the most part laser cutters/engravers hardware is a 3D printer without the Z axis and extruder drive, and a laser in place of the nozzle.
Since the duet supports this I wonder how much work it would be to have a laser cutter head that could be swapped out for the hot end....
Re: Duet as Laser Cutter Controller? June 02, 2015 08:10AM |
Registered: 9 years ago Posts: 299 |
Hi Ian, it's not just the controller, I find it's the whole workflow. The similarities to 3D printing are considerable, so much so it's looking to me as though the Duet is perfect for this application. Not only is the price keen, but the features are way ahead of the dedicated laser controllers I've found so far.Quote
droftarts
Quote
shadow651
I do find the lack of open source laser stuff bizarre. For the most part laser cutters/engravers hardware is a 3D printer without the Z axis and extruder drive, and a laser in place of the nozzle. Since the duet supports this I wonder how much work it would be to have a laser cutter head that could be swapped out for the hot end....
Me too! About the only one I can find is Lasersaur: [www.lasersaur.com]
Also, Smoothieboard supported laser cutters before 3D printers, I think.
Ian
RepRapPro tech support
Re: Duet as Laser Cutter Controller? June 02, 2015 08:16AM |
Registered: 9 years ago Posts: 299 |
Quote
dmould
I should think that a trial cutter could be made simply by duct-taping a laser to the hotend and unplugging the Z-motor and extruder motor (with power off!). Connect the laser so that it is controlled by the fan0 output, cover the bed with a mat that can take the laser burn-through (maybe the glass will be OK), manually adjust the Z screw so the laser is focussed on the material to be cut, disable the "do not extrude when cold" function and slice a part that is 1 layer high with 0 bed & hotend temperature, 1 perimeter, no skirt and no infill.
Dave
Re: Duet as Laser Cutter Controller? June 02, 2015 08:38AM |
Registered: 9 years ago Posts: 14,659 |
Quote
Radian
Quote
dc42
I'll change the code in my fork so that if the Move module runs out of moves, and M571 has been used to turn the fan output on, the fan output is turned off again.
Excellent, that's very good of you. It seems to be a sensible precaution... especially when testing things "by hand"
Noddy question: I'm assuming that the extruder drive rate is matched to the velocity of the combined XY move to lay an even bead - if so how complicated would it be to scale this to the PWM value of Fan0?
This would be the ultimate Laser control adaptation (PWM controlled cutting power to match cutting head verlocity).
Re: Duet as Laser Cutter Controller? June 02, 2015 08:55AM |
Registered: 9 years ago Posts: 2,472 |
Quote
Radian
Semiconductor laser heads up to a couple of Watts are available that would fit that bill - but I wouldn't personally risk strapping one on an Ormerod out in the open!
Re: Duet as Laser Cutter Controller? June 02, 2015 08:56AM |
Registered: 9 years ago Posts: 299 |
Re: Duet as Laser Cutter Controller? June 02, 2015 09:08AM |
Registered: 9 years ago Posts: 299 |
Quote
dmould
Quote
Radian
Semiconductor laser heads up to a couple of Watts are available that would fit that bill - but I wouldn't personally risk strapping one on an Ormerod out in the open!
Why not? I don't see that it presents any significant risk so long as you take reasonable precautions. Ensure the laser is attached well enough that it cannot fall off and will always be pointing down, wear suitable goggles that filters the laser in case of chance reflections before switching on and don't do it when there are other people or animals around. There is perhaps some risk of fire, but use a suitable bed mat, have the power switch and an extigushant within easy reach and no highly inflammable materials close, and I do not see it being a significant risk at those sort of powers/temperatures. I was not thinking about attaching a 2000W laser and cutting steel!
IIUC the laser beam is not particularly dangerous (except to eyesight) far outside its point of focus, so no risk of a reflection setting the curtains alight (BICBW).
Dave
Re: Duet as Laser Cutter Controller? June 02, 2015 09:19AM |
Registered: 9 years ago Posts: 2,472 |
Re: Duet as Laser Cutter Controller? June 02, 2015 10:25AM |
Registered: 9 years ago Posts: 299 |
Re: Duet as Laser Cutter Controller? June 03, 2015 08:15AM |
Registered: 9 years ago Posts: 299 |
; Ormerod 1 config file for dc42 Duet firmware M111 S0 ; Debug off M550 PLaser Cutter ; Machine name (can be anything you like) M551 Preprap ; Machine password (currently not used) M540 P0xBE:0xEF:0xDE:0xAD:0xFE:0xEE ; MAC Address ;*** Adjust the IP address and gateway in the following 2 lines to suit your network M552 P192.168.0.25 ; IP address M554 P192.168.0.1 ; Gateway M553 P255.255.255.0 ; Netmask M555 P2 ; Set output to look like Marlin G21 ; Work in millimetres G90 ; Send absolute coordinates... M83 ; ...but relative extruder moves M574 X1 Y2 Z0 S1 ; set endstop configuration (x low endstop, Y high endstop, active high) M906 X400 Y400 Z400 E400 ; Set motor currents (mA) M563 P0 D0 H1 ; Define tool 0 G10 P0 S0 R0 ; Set tool 1 operating and standby temperatures M92 E400 ; Set extruder steps per mm (calibrated when built) ;*** If you have a modulated IR probe without on-board microcontroller, change P1 to P2 in the following M558 P4 X0 Y0 Z0 ; No Z probe E stop. X,Y use own endstops ;*** If you have a Duet board with 4.7K thermistor series resistors, change R1000 to R4700 to the following M305 commands M305 P0 R1000 H0 L0 ; Put your own H and/or L values here to set the bed thermistor ADC correction M305 P1 R1000 H0 L0 ; Put your own H and/or L values here to set the first nozzle thermistor ADC correction M305 P2 R1000 H0 L0 ; Put your own H and/or L values here to set the second nozzle thermistor ADC correction M201 X800 Y800 Z1000 E1000 ; Accelerations (mm/s^2) M203 X15000 Y15000 Z15000 E3600 ; Maximum speeds (mm/min) M566 X600 Y600 Z600 E20 ; Minimum speeds mm/minute M208 X320 Y220 ; set axis maxima (adjust to suit your machine) M208 X0 Y0 S1 ; set axis minimum (adjust to make X=0 the edge of the bed) ;*** Laser additions to Ormerod standard M571 S1 ;Set output on extrude to enable laser PSU M92 X160 Y160 ;steps/mm G92 Z0 ;fake Z homed
Re: Duet as Laser Cutter Controller? June 03, 2015 10:24AM |
Registered: 9 years ago Posts: 14,659 |
Quote
Radian
The X axis is configured to be 320mm long but X homing only completes properly if the head is <=246mm from the homing switch. i.e. as soon as it has moved -246mm from wherever homing was initiated it stops - doing the little dance as though the switch was tripped.
Quote
Radian
Also, as there is no Z (yet) I'm not sure what to do with the axis. Firstly, while I can always issue G92 Z0 to satisfy the software that Z is homed, I though it might be possible to use M558 P4 to enable the extruder endstop homing. By default, the open input reads high so I assumed this would satisfy the software that Z was homed. In practice, while it seems to spend no time moving Z it fails to set the homed status.
Re: Duet as Laser Cutter Controller? June 03, 2015 02:15PM |
Registered: 9 years ago Posts: 299 |
Duh. Of course - I forgot all about those files!Quote
dc42
[The maximum amount it moves during homing is set by the corresponding G1 command in homex.g and homeall.g. So you need to edit those files.
OK, I misinterpreted the documentation for M558. It made it sound as though we were selecting the use of the Z probe IR input vs. Extruder endstop.Quote
dc42
M558 P4 is for a switch used as a Z probe, but you have told it in your M558 command that the Z probe is not used for homing Z.
Re: Duet as Laser Cutter Controller? June 03, 2015 02:28PM |
Registered: 9 years ago Posts: 14,659 |
Quote
Radian
I will use M574 Z1 instead as you suggest. Thanks.
Re: Duet as Laser Cutter Controller? June 03, 2015 05:02PM |
Registered: 9 years ago Posts: 299 |
Quote
dc42
It's just occurred to me that if you use M574 Z1, you will also need to change homez.g and homeall.g to perform homing using a G1 command (as for X and Y axes), instead of a G30 command.