gnea / grbl-Mega

An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on an Arduino Mega2560
https://github.com/gnea/grbl/wiki
Other
491 stars 226 forks source link

Add support for CO2/YAG lasers #53

Closed mikemaikaefer closed 6 years ago

mikemaikaefer commented 6 years ago

The included support for lasers is nice but somewhat rudimentary. I don't know what kind of lasers can be accessed with this mode, but industrial lasers are not usable. So I would request some changes which would make it possible to connect more professional lasers:

For CO2 lasers:

For YAG lasers:

chamnit commented 6 years ago

@mikemaikaefer : Thanks for the concise list of features needed. For sure that Grbl should support CO2 lasers and other more powerful lasers, but the AVR is definitely maxed out in cycles. I'm in the middle of a Grbl re-write for much faster ARM MCUs and will focus on improving laser performance. There are other bottlenecks that need to be addressed to make more powerful lasers possible.

I do have some questions since you seem to know a bit about CO2 lasers.

Thanks.

mikemaikaefer commented 6 years ago

@chamnit how about the new PocketBeagle? It comes with a 1GHz ARM CPU that provides a lot of interesting features and all required outputs (GPIO, PWM,...)

About your questions:

chamnit commented 6 years ago

I personally don't like programming on the Beagle PRUs. It's proprietary and limited, the last I checked. It's also overkill for what you need. There isn't much difference from using a cheap ARM chip in conjunction with something like an Raspberry Pi.

mikemaikaefer commented 6 years ago

@chamnit

chamnit commented 6 years ago

Thanks @mikemaikaefer. That clears up the requirements. The FPK signal should be easy to include.

The frequency changes probably should be something that can be changed dynamically, based on what you said. Especially if a CAM program is configured to generate and command the changes. At this point, Grbl alters the duty cycle dynamically based on speed. This theoretically keeps the energy per unit area constant. Do you have a grasp on how the PWM frequency and the duty cycle relate to speed and material? It seems like there are a lot of nonlinearities there that need to be measured and modeled.

langwadt commented 6 years ago

@chamnit somewhat off topic but, if implementing grbl on something like a Beagle would be possible that only the stepper interrupt would need to run on a PRU, the rest just need to be reasonably fast with no strict real time needs?

chamnit commented 6 years ago

@langwadt : Yes. It is possible, but I did not find the programming language used by the PRU to be conducive to porting. It also locks you into the Beagle architecture.

langwadt commented 6 years ago

I agree it shouldn't be locked to a specific architecture. I was mostly out of curiosity because it seems there are more SOCs coming out with a small controller hidden somewhere in the corner.

and I believe there is a C compiler for the PRUs now

mikemaikaefer commented 6 years ago

@chamnit TI offers a free C-compiler for the PRUs, so they are programmed in plain C.

mikemaikaefer commented 6 years ago

@chamnit you are right, speed and duty cycle should be applied to each other but may be related to each other in a non-linear way. This does not depend only on the laser but also on the material - means this is nothing GRBL really can handle. I think here is is up to the user to define suitable maximum speeds and a suitable allowed power range for the laser to work within. And when a laser/material combination does not allow faster movements, they simply have to be processed slower in order to have acceptable results. But as said, this is know how the user needs to have. Btw: the document from https://halaser.eu/e1803_manual.pdf (already mentioned above) also contains some G-Code M-commands in range 7xx for all these laser specific things (starting at page 46). I don't know if this is really an industry standard for lasers, but it seems these commands are widely used for setting/changing laser parameters!?

shamsiqbal commented 6 years ago

@chamnit i am curios that what arm mcu you have chosen for grbl port i am sure you are working on arm port since more than 2 months but did not got clue about exact mcu you have chosen to port grbl