Running a Further Laser Y1200 from DUET2 ethernet
-
Hello All,
This is my first post on this forum, but I will try to do my best to make the post as good as possible. Maybe first a little introduction about myself, I'm an electronics engineer with a big maker heart! In the past I have build myself two 3D printers with an arduino and Marlin, but never a DUET before.
Currently I'm busy building with a CO2 laser cutter, in more detail a Further Laser Y1200. This is a laser cutter designed by a youtuber and the building plans are sold on his website, in my opinion a very good opensource guide to build the mechanical part of the CO2 laser cutter. But the electronics used by him are not my favorite choice, it is not customizable... .
Research done:
Now I'm researching how to use the DUET2 ethernet that I bought to control the CO2 laser. It is the first time for me using a DUET or RRF based board, so this will be all a bit new to me. I will try to use this forum post to document how I did it and to ask questions about things I don't understand, is this allowed?
I have already researched some info of DUET3D itself:
- Configuring RepRapFirmware for a laser engraver/cutter
- Duet 2 WiFi and Ethernet Hardware Overview
- Pin names
Laser tube control:
The first thing I wane figure out is how to control the intensity of the CO2 laser. In my Y1200 build I'm using a "VEVOR MYJG80W" high voltage supply. According to it's documentation it has an input pin "IN / Control input (DAC)" that controls the laser intensity based on a analog voltage between 0 and 5V.
The power supply manufacturer asks a PWM pulse generator with a PWM frequency between 20 to 50 kHz. According to this DUET forum post it should be possible to use the PWM outputs of the DUET2 in the range of 20 to 50 kHz range, can someone comfirm this is possible for both the FAN as heater PWM's?
If I understood the DUET3D information correctly the DUET2 can only do 12V PWM for a laser on the heater / heated bed pins, they also provide a schematic to build a circuit on how to use the DUET2 still to controll the analog input of sush a high voltage supply, this can be found here.
As far as I understand the circuit it is two times a NOR gate in series, this will convert the 12V input PWM to a 5 PWM signal + an inversions. The voltage conversion is logical, the laser supply can only except 5V after all. The inversion is used because the heaters are switched low side and the laser is using high side logic.
If I was reading the documention it catched my eye that there are 3 PWM fans on the DUET2 board, these can be used both on 5 or 12V according to this schematic. Also I read in the documentation that the M452 GCODE take an argument C"name" to specify on what pin the PWM signal should be outputed.
Now I'm wondering myself, should it also be possible to configure the PWM of the fans to 5V and use one of these output with an extra software inversion to steer the "IN / Control input (DAC)" of the high voltage supply?
I can find that the "I1" argument can be used with the M106 GCODE to invert the PWM of a fan, is this also possible with the M452 GCODE?
Can anyone give me some feedback on the questions above?
Open topics:
Other topics I still wane research / figure out in the next weeks are:- Water flow sensor
- Water temperature sensor
- Safety contact in the casing (detecting an open casing and shut down laser automatically for eye safety), based on this forum post
- Bed probing / Z-height calibration
- Turning on/off LED lights
- Turning on/off air assist
- Turning on/off red laser dot
- ...
I will update this post everytime I touch on a new topic.
Already many thanks!
Br, Nico
-
@nico_1994 said in Running a Further Laser Y1200 from DUET2 ethernet:
I can find that the "I1" argument can be used with the M106 GCODE to invert the PWM of a fan, is this also possible with the M452 GCODE?
The inversion takes place in the C"name"- part of the command.
An ! before the pin name inverts the logic:C"!name"
-
@nico_1994 said in Running a Further Laser Y1200 from DUET2 ethernet:
As @o_lampe says, use
!
in the pin name to invert the pin, with the caveat that this works in RRF 3.x, but not RRF 2.x. You don't say which version of RRF you are using, but I would advise you to use the latest release version of RRF 3.x.Open topics:
Other topics I still wane research / figure out in the next weeks are:Water flow sensor
See https://docs.duet3d.com/en/User_manual/Tuning/Triggers#water-flow-sensor-failsafe
Water temperature sensor
Add another temperature sensor using M308
For supported temperature sensors see https://docs.duet3d.com/User_manual/Connecting_hardware/Temperature_choosingBed probing / Z-height calibration
See https://docs.duet3d.com/en/User_manual/Connecting_hardware#z-probe
Safety contact in the casing (detecting an open casing and shut down laser automatically for eye safety), based on this forum post
Create an input with M950, then use triggers to control what happens when the input is triggered, as described in that thread.
Turning on/off LED lights
See https://docs.duet3d.com/User_manual/Connecting_hardware/IO_Neopixel_DotStar
Turning on/off air assist
This can either be controlled as a tool fan, so behaves like 3D printer's part cooling fan, or as a manually controlled fan using a macro. See https://docs.duet3d.com/User_manual/Connecting_hardware/Fans_connecting
Turning on/off red laser dot
Configure a GPIO output with M950, then control it with M42. See https://docs.duet3d.com/User_manual/Connecting_hardware/IO_GPIO
...
The extra one is probably how to fire the laser when stationary, so you can align the mirrors. RRF 3.x generally doesn't allow for the laser to be fired without a G1 move, as a safety feature. There is a However, there are a number of workarounds. Probably the easiest is to create a dummy axis (e.g. U) using M584, and send a movement command which will fire the laser e.g.
M584 U6 ; define U axis G92 U0 ; set U axis position to zero G1 U1 F60 S255 ; turn the laser on for one second at full power
Adjust the G1 F parameter (feedrate, which is in mm per minute, so 1mm of movement at 60mm/min = 1 second) and laser power (G1 S parameter) for suitable time and power.
There is a feature request for better control over this, rather than using the workarounds: https://github.com/Duet3D/RepRapFirmware/issues/697Another subject that comes up is framing, where the area to be cut is outlined by the laser toolhead (or the red laser dot), without actually cutting, so you can check the material is in the right place. This is usually controlled by the laser software, and the laser controller is connected by USB, so the laser software can send the movement commands directly to the controller. Duet/RRF controlled machines can be connected over USB, but running jobs this way misses out on many RRF-specific features. RRF doesn't have framing built-in. However, it may be possible to do something like the Only probe where part is to be printed script, run at the beginning of a job, and then have the option to cancel before proceeding with the job.
If you're planning on using Lightburn, see https://forum.duet3d.com/topic/34581/frame-job-boundaries/6; hopefully this feature will come soon.Ian