Laser Engraver (picture to g-code) for Repetier

User-Generated tips and tricks for the Rostock Max, Orion, H1.1, or H1 Printers
pro9793
Plasticator
Posts: 12
Joined: Thu Mar 13, 2014 5:02 pm

Laser Engraver (picture to g-code) for Repetier

Postby pro9793 » Fri Jan 29, 2016 1:29 pm

Hi everyone. I've written the program to convert images to g-code for Repetier. Tested with 2w 450nm laser on Rostock max with 0.92.8 firmware. Now I've got good prints on leather, pcb(painted with black paint), paper and other materials!!!
Image
Well. The program vars:
Laser---------------------
Diameter - the diameter of laser spot in mm(I use 0.1 to 0.05)
On offset and Off offset – the vals in mm which are added to the x-coordinate to compensate the delay of laser on and off
PWM checkbox – checked (switch the laser intensity every time the color is changed between 0 and 255) this requires the laser with TTl connected to the PWM pin of your board and properly configured in firmware(untested); unchecked (switch the intensity to 0 when the color is from white and light grey and to 255 when the color is black and dark grey)
Moves------------------
Travel speed – travel speed
Engrave speed – engraving speed (recommended to set equal)
Travel offset – extra travel move in mm from the edge of the picture (usually 5-10 mm depending on speed)
Start position--------
X, Y, Z – start coordinates (the left bottom corner of the picture)
Center checkbox – checked (the center of the picture will be in the x0 y0 and z of your printing area); unchecked – manually define the center by the X-axis Y-axis textboxes
Picture-----------------
Width and Height – the real dimensions of the picture in mm(you may change them)
Fill angle – the angle by which the picture is rotated
Invert checkbox – inverts the colors from black to white
Start g-code- g-code added at the start of engraving
Finish g-code – g-code added after the engraving is finished
Just open the laser_engarver.exe file, load the picture with the button (…), change the vals that you need and press >>GCODE button, wait and you’ll get the output.gcode file in the folder with the program.
Code-------------------
I've added the Laser On and Off code option if you use M106 or M107 command to turn on\off the laser. If you use repetier - just leave M03.

Here is the program(.NET Framework 4.6.1 required). https://www.dropbox.com/s/ihtobq7o498457w/Laser_engraver_Repetier.rar?dl=0
Here is the video https://youtu.be/JpeGIBaGrH8

And photos:
ImageImage
ImageImage
Last edited by pro9793 on Fri Dec 01, 2017 11:27 am, edited 4 times in total.

JFettig
Printmaster!
Posts: 821
Joined: Tue Nov 18, 2014 4:39 pm
Location: Minnesota

Re: Laser Engraver (picture to g-code) for Repetier

Postby JFettig » Fri Jan 29, 2016 1:47 pm

Awesome! What kind of output does it require and will it work with pwm to adjust the intensity?

pro9793
Plasticator
Posts: 12
Joined: Thu Mar 13, 2014 5:02 pm

Re: Laser Engraver (picture to g-code) for Repetier

Postby pro9793 » Sat Jan 30, 2016 6:45 am

JFettig wrote:Awesome! What kind of output does it require and will it work with pwm to adjust the intensity?

I've added the information to the first message. sorry for my bad English - I'm from Russia.

R@b!n
Noob
Posts: 1
Joined: Sun Oct 01, 2017 3:18 pm

Re: Laser Engraver (picture to g-code) for Repetier

Postby R@b!n » Mon Oct 02, 2017 9:22 am

wow, I'm really a big fan of your written software.
Thank you in advance for the work you have done. I use your software with the latest version of Marlin firmware, the only thing i have to do is find a M03 value in a txt editor and replace it with M106 values. Do you think it's possible to change the software to M106 values ​​instead? That would be fantastic!
let me know....

Grtz,

Robin

User avatar
bvandiepenbos
Printmaster!
Posts: 927
Joined: Thu Apr 05, 2012 11:25 pm
Location: Goshen, IN
Contact:

Re: Laser Engraver (picture to g-code) for Repetier

Postby bvandiepenbos » Wed Oct 04, 2017 11:18 pm

Very cool.
I have a 2watt laser, and putting together a super shorty Rostock MAX from odd spare parts laying around for the laser. Now I need to find the time to finish it.
Your software looks very interesting!

Any recent developments on this?
~*Brian V.

RostockMAX v2 (Stock)
MAX METAL "ShortyMAX"
MAX METAL Rostock MAX Printer Frame
NEMESIS Air Delta v1 & v2 -Aluminum delta printers
Rostock MAX "KITT" - Tri-Force Frame
GRABER i3 "Slim"

pro9793
Plasticator
Posts: 12
Joined: Thu Mar 13, 2014 5:02 pm

Re: Laser Engraver (picture to g-code) for Repetier

Postby pro9793 » Fri Dec 01, 2017 11:23 am

Hello! I've added the Laser On and Off code option. If you use repetier - just leave M03.
The new version - https://www.dropbox.com/s/ihtobq7o498457w/Laser_engraver_Repetier.rar?dl=0

obsi007
Noob
Posts: 1
Joined: Sun Dec 10, 2017 11:11 am

Re: Laser Engraver (picture to g-code) for Repetier

Postby obsi007 » Tue Dec 12, 2017 3:20 am

Hello

I have several problems and wishes.
If you have not enough time I also would like to try to do it myself, but your program would be a fine base for the thing.

Known Sideeffects:
-At the start- end endpoints of x-line a small line is lasered along y-axis.

Wishes:
-Draw Shapes (f.e. circles) on the direct way (not line for line) before filling them line to line to get a prettier result.
-Following: Posibility to only draw the shapes (useful for pcb-etching)
-Possibility to set PWM-Pin to another G-Code as Laser-On.

Thank you for the very cool program! It already helped me a lot. :)

Best regards,
Christoph


Return to “General Tips 'N Tricks”

Who is online

Users browsing this forum: Google [Bot] and 2 guests