New Laser Build - raster engraving

More
09 Aug 2018 15:26 #115846 by kramdradoow
I have very recently retrofitted an old Huntron Prober into a laser engraver. I have reused the prober's hardware (steppers, timing belt drives and linear rails) and an old Xylotec board I had gathering dust. It didn't take much to control the 3 axis motion so that part is done. I bought a 5.6W 455nm laser diode with integrated ps regulation board. It came with a module to accept PWM input for control of the laser power levels.

It was pretty easy getting the laser controlled using M3/M5 and PWM output (Sxxxx) to turn it on/off at modulated power levels. Engraving vectors was pretty simple. I produced some simple engravings on wood and am pleased with that result. I then turned to raster engraving and ran into headaches.

I found that raster engraving is well outside of my comfort zone and technical experience (cnc router, mill, lathe). So far I have experimented with various photo editors (inkscape and gimp) along with some editing/postprocessing (ImageToGcode, 3dpBurner Image2Gcode, and a trial PicEngrave Pro6). The images that I have engraved all seem "overcooked". I then engraved some grayscale bars to see how my laser power control was functioning and observed some black bands at the beginning/end of each grayscale change.

It appears that physics comes into play. :-) Code to turn the laser on a a specific power level followed by a short move command (0.25") results in the laser firing and it "overcooks" until the machine can process the move instruction and accelerate to the proper feed rate. (just guessing here but this assumption seems reasonable to me) I can only imagine that for moves of 1 pixel in length it is not possible to do anything but burn too long. The machine cannot accel/decel anywhere near fast enough to prevent that burning.

I have looked at the graster solution (wiki.linuxcnc.org/cgi-bin/wiki.pl?Rastering_With_A_Laser) to synchronize the laser with the motion but I am using PWM output not a converted step/dir on an unused axis. Frankly, I don't think I'm capable of editing my HAL to successfully use that solution with my configuration. If anyone has any experience and advise to share with graster solution, I'd appreciate any help I can get.

I have read in this forum about speeds on parallel ports and MESA hardware which makes my head spin a bit. My PWM freq is 1KHz but can go up to 3KHz. (Measured with o'scope.) I can see the power levels vary with changes to the Sxxx param so I believe all of that is working properly. I used MESA hardware on my lathe and mill (LCNC) and Mach3 with Cxx/smooth stepper boards for my router. I realized that the Xylotec board is not the best choice of electronics but it was in handy and I had no idea how far I'd get so I chose the low buck route. I will likely use different electronics on my next laser machine (bigger work envelope and higher power diode) IF I can solve this raster engraving challenge.

I have not yet tried to implement M62 to synchronize the laser firing with the motion but am thinking that may be my next step.

Any help or comments would be appreciated. I can provide pics of the machine and output product. I can provide HAL and INI files if anyone is interested.

Mark

Please Log in or Create an account to join the conversation.

More
More
11 Aug 2018 07:22 #115877 by Hakan
I did some work on laser engraving (on another platform) a few years ago and recognize the issues you see.

The "overcooking" is most likely just too high intensity. Solved by lowering PWM (scaling the PWM) or traveling faster.

Black stripes when changing greyscale levels. The eye is very good at picking up and enhance such changes, but if it is more than that it is probably due to PWM reset. The PWM counter restarts the counter for the duty cycle with the ON part. That will create a subtle black bar that the eye picks up. The PWM has to change the duty cycle "on the flye" without a reset.

And then the most usual problem with this way of engraving. You want equal amount of laser energy at every pixel. Even at varying speeds. And there is nothing that compensates for the lower speed/longer time at the pixel/higher energy at acceleration. This is the real problem for everyone that tries to engrave using spindle speed as laser intensity. The only easy way to make this work, that I know about, is to make sure that the traveling speed is constant. So the engraving has to include acceleration parts where there is no engraving, All in one movement so there is no start/stop for any reason. It is probably doable. There are other solutions possible that includes making sure the intensity is at a certain level even at acceleration that includes timing the pulse length and stuff.

Either that, or have a look a graster. What I could see they have solved this.

Please Log in or Create an account to join the conversation.

More
11 Aug 2018 23:22 #115926 by Hakan
Here is an example of laser engraving (not with linuxcnc).
PWM reset is under control.
Laser pulse length is controlled to work also under acceleration.
The input is a run-length encoded image of the Lamborghini Gallardo.



It should not be impossible to do this in linuxcnc with some development.

Please Log in or Create an account to join the conversation.

More
16 Aug 2018 11:10 #116125 by andypugh
I think that LinuxCNC might pause motion momentarily on a spindle-speed change.

It might be worth trying M67 instead. That sends the new value at the same time as it sends the _next_ motion command.

linuxcnc.org/docs/2.7/html/gcode/m-code.html#mcode:m67

Please Log in or Create an account to join the conversation.

More
17 Aug 2018 11:28 #116198 by kramdradoow
Sorry to have gone silent on this but have had a series of family interruptions that are not yet over.

Last week after my initial post I did some preliminary work in my INI and HAL files to implement M62 and M63 to synchronize the laser firing with the next move. I modifed my post processor and generated some test gcode. All that done on my simulated system but I just have not had the time to test on the real laser engraver.

All worked as expected in simulation but....

Pete , My system uses PWM to control the laser power instead of analog which is why I didn't try M67. Am I thinking correctly or will M67 work with digital output also?

Mark

Please Log in or Create an account to join the conversation.

More
17 Aug 2018 11:35 #116199 by andypugh
Use M67 to set the duty-cycle of the PWM.

Please Log in or Create an account to join the conversation.

More
17 Aug 2018 11:44 #116200 by kramdradoow
Oops. Andy not Pete. I'll have to research how to do that. Thx for tip.

Mark0

Please Log in or Create an account to join the conversation.

Moderators: snowgoer540
Time to create page: 0.275 seconds
Powered by Kunena Forum