Laser Engraver (picture to g-code) for Repetier

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

Laser Engraver (picture to g-code) for Repetier

Post by pro9793 »

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!!!
[url=http://radikal.ru][img]http://s019.radikal.ru/i642/1712/21/f36bd91bd904.png[/img][/url]
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). [url]https://www.dropbox.com/s/ihtobq7o498457w/La ... r.rar?dl=0[/url]
Here is the video [url]https://youtu.be/JpeGIBaGrH8[/url]
[youtube]http://www.youtube.com/watch?v=JpeGIBaGrH8[/youtube]
And photos:
[url=http://radikal.ru/f/s019.radikal.ru/i631/16 ... b.jpg.html][img]http://s019.radikal.ru/i631/1601/7e/579fc1bcb73bt.jpg[/img][/url][url=http://radikal.ru/f/s017.radikal.ru/i408/16 ... 8.jpg.html][img]http://s017.radikal.ru/i408/1601/c0/f7db460c4aa8t.jpg[/img][/url]
[url=http://radikal.ru/f/s017.radikal.ru/i417/16 ... 9.jpg.html][img]http://s017.radikal.ru/i417/1601/8d/266dddfd9209t.jpg[/img][/url][url=http://radikal.ru/f/s020.radikal.ru/i711/16 ... 1.jpg.html][img]http://s020.radikal.ru/i711/1601/78/318e1d53a031t.jpg[/img][/url]
Last edited by pro9793 on Fri Dec 01, 2017 11:27 am, edited 4 times in total.
JFettig
Printmaster!
Posts: 824
Joined: Tue Nov 18, 2014 4:39 pm
Location: Minnesota

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

Post by JFettig »

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

Post by pro9793 »

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.
[email protected]!n
Noob
Posts: 1
Joined: Sun Oct 01, 2017 3:18 pm

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

Post by [email protected]!n »

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

Post by bvandiepenbos »

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

Post by pro9793 »

Hello! I've added the Laser On and Off code option. If you use repetier - just leave M03.
The new version - [url]https://www.dropbox.com/s/ihtobq7o498457w/La ... r.rar?dl=0[/url]
obsi007
Noob
Posts: 1
Joined: Sun Dec 10, 2017 11:11 am

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

Post by obsi007 »

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
Post Reply

Return to “General Tips 'N Tricks”