-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add laser support #113
Add laser support #113
Conversation
hi @MagoKimbra , have you check the @HakanBastedt thread , ? we intend to adapt the laser or plasma THC ready module in Marlin, I really appreciated to have your comments on those notes |
@mkeyno just take care that i'm working on it, it's working enough well right now, but there is an issue for the water cooling PWM that will make me move probably the LASER_FIRING_PIN from D5 to another pin on RAMPS, so, be carefull if you want to try it |
As i'm adding also support for water cooler on the laser patch , i'm thinking about the Mcode to set the PID for it. Actually we have 2 Mcodes for setting PIDs: M301 for extruders, and M304 for bed. For the laser cooler i have many options:
I asked the very same question also in this issue on Marlin firmware, so, we can find a large consent on this for future compatibility with possible Marlin laser support patches: MarlinFirmware/Marlin#3208 (comment) @mkeyno maybe you can be interested too. Has anyone suggestions about that? |
Hello, good that TurnkeyTyranny's code finds a home. I have ported it myself, and I have some comments regarding the original code
Regarding the cooler temperature. On my diode laser there is a fan going all the time the power is on, can't control it. On the Co2 the water pump is going all the time and the cooling fan is operated with a switch. For the Co2 I would like to see a) monitoring of waterflow to make sure there is water flowing all the time, b) temperature monitoring of the tube itself if this is at all possible due to the high voltage noise or on the exiting water tube and c) as a convenience to keep the noise level down from the cooling fan I could consider closed loop operation of the cooling fan. On top of that there is a need to operate the air assist (pneumatic air valve), and have switches to detect open lid/case (important for Co2), perhaps some laser pulsing dedicated for mirror alignment, table height adjustments with perhaps four individual motors, static autofocus, dynamic autofocus. A much better operator panel is needed and sound feedback (piezo beeper?) is needed. For the Due it is the same work, just the pwm part is different, you can check my code at the end of HAL.cpp it comes from analogWrite() code. Don't use the pwm generator, it will conflict with analogWrite on pin 6-9 and it isn't possible to separate their use even of there seems to be one clock available. |
Hello @HakanBastedt, thanks for your suggestions: 1- i agree, make sense to apply your suggestion, i will do that For the temperature: my setup ( on a K40 co2 modified machine ) i have, other than the pump as you have:
I will soon add also Z axis support and i'm investigating also auto-focusing tools. |
hi @nextime franco, also as well as @HakanBastedt I suggest to move to ARM core board such as Due , I built the 100watt CNC laser machine with capability of cutting thin sheet metal but when I compare it with chines cnc machine , it is not reliable or fast as those , I bind the laser fire pin to the peripheral auxiliary unite such air pressure & cooling water , but right now focusing to add ready-to-use Tools Height Control (THC) module in Marlin |
@mkeyno regarding the "arm is faster", except for border line use i really think is a non issue at all, with my old good 8 bit mega and ramps i'm able to raster images very fast on my chinese machine, and it's fully reliable. I found that 100% of the "sloweness" issues with those machines using mega2560 by many people was not the MCU speed, but the serial buffer size instead: just by enlarge the buffer to 256 byte instead of the default 64 bytes has solved any speed issue to me, and i'm able to raster images at more than 2000mm/s without losing a bit on my mega based ramps controller. Anyway, in any case, of course, arm support is a "must have", no matter if i will use personally or not :) For the focusing, i tend to be an "experimental guy", i will try different solutions, and then, having numbers on which to discuss, we, as anyone want to contribute/is interested, will choose the best one :) |
your probably right dear @nextime but I'm referring to pulse rate compare to industrial controller whereas all of them use ARM or DSP core and actually in my new 180 watt laser I've plan use the AC stepper motor and driver which is need much higher pulse rate for optimum performance , I have bad experience with tinny driver such as DRv8822 hence move to reliable industrial drive for any CNC |
@mkeyno your arguments make sense. As usual, different configurations needs different things, so, the best way is to implement both :) |
The only difference in code between Mega and Due is the PWM, and that is already taken care of. It is not really a choice between one or the other, it is a matter of having two codes in sync for laser, just like any other functionality. |
Laser support has been merged |
This pull request add laser support for machines like the K40 chinese laser cutter modified to use a RAMPS 1.4 controller board.
It fully support both vectorial and rasterized images for both cut and engrave, and it's fully compatible with https://github.com/openhardwarecoza/LaserWeb, pronterface and other gcode-host software for laser cutters.
It also fully compatible and support https://github.com/TurnkeyTyranny/laser-gcode-exporter-inkscape-plugin, an inkscape plugin to produce gcode for laser machines.
The patch is a port of the modifications done by TurnkeyTyranny on an old marlin firmware here: https://github.com/TurnkeyTyranny/buildlog-lasercutter-marlin, updated and adapted for MarlinKimbra.