Image2Gcode – Free Raster Image Laser Engraving Software – Modified for MPCNC

New Home Forum Software Development Image2Gcode – Free Raster Image Laser Engraving Software – Modified for MPCNC

This topic contains 254 replies, has 34 voices, and was last updated by Profile photo of Chris Chris 2 weeks, 4 days ago.

Viewing 30 posts - 1 through 30 (of 255 total)
  • Author
    Posts
  • #5805
    Profile photo of Leo69
    Leo69
    Participant

    With Ryan’s blessing I’m posting a newly revised version of Villamany’s awesome laser engraving software. I made some revisions including:

    1) Clean up gcode output- add whitespace and newlines to make gcode “Marlin-Friendly”
    2) Add boxes where you can select or add your own Mcodes for laser-on and laser-off commands. This will allow the software to work with ANY controller configuration. “MPCNC-Friendly”
    3) The Vicious Logo of course!

    Settings have to be entered on first run, software will retain after that. Thanks for your help troubleshooting Karl:)

    Burn ON!

    Current version – https://github.com/Uthayne/3dpBurner-Image2Gcode
    EXE is in the Bin folder – https://github.com/Uthayne/3dpBurner-Image2Gcode/tree/master/bin/Release

    #5806
    Profile photo of Leo69
    Leo69
    Participant

    Oops, forgot to zip it. Wish it would notify me BEFORE I embarrass myself:)

    #5953
    Profile photo of Leo69
    Leo69
    Participant

    I’ve received a couple of requests for the source code so here it is.

    #5963
    Profile photo of Bryan
    Bryan
    Participant

    Added a “Profiles” section under the laser profile for quick settings changes based on material.
    Program and updated source files are attached.

    Perhaps we should branch this off of the original on github to keep changes in line?

    http://imgur.com/9ASRuZr

    #5966
    Profile photo of Leo69
    Leo69
    Participant

    I love it! I agree.If we continue to improve on this then we should definitely fork it out. I’d really like to add the ability to define material stock size to see what the image placement will look like and set origin also. Just no time…

    Nice work Bryan.

    #5969
    Profile photo of karltinsly
    karltinsly
    Participant

    Great work, guys! I would really like to have the ability to set the origin. A lot of times, it’s easiest to use a center origin for easy placement of a graphic. For me, anyway.

    #5973
    Profile photo of Curt
    Curt
    Participant

    Great work!! I agree with Karl that it would be great to start at the center of the image most times.
    Curt

    #6666
    Profile photo of Bryan
    Bryan
    Participant

    Added an origin selection feature to help with centering pictures:
    It also does a quick box around the image to show you overall placement (at power M106 S5)
    http://imgur.com/L2i2eMw

    I also forked the original on GitHub, so now it will be easier to collaborate on this. (I’m learning to use GitHub along the way, so bear with me)
    https://github.com/Uthayne/3dpBurner-Image2Gcode

    I noticed that when the resolution is very small, it was really slowing down the movement. Perhaps I will look into optimizing the code when I get a chance.

    #6669
    Profile photo of Leo69
    Leo69
    Participant

    That’s awesome work! A very useful feature that some commercial offerings lack.

    #6671
    Profile photo of karltinsly
    karltinsly
    Participant

    Thanks for adding that, Bryan! Very cool!

    #6674
    Profile photo of stevan
    stevan
    Participant

    I tried latest version of your modified Image2Gcode but after built the Gcode and loaded it on Repetier Host, in print preview I got a green square which is not displaying any rendered image and if I burn that Gcode with my laser I got the same result as shown on Repetier print preview. I tried to load on image2gcode other BMP images but I always got the same result. Hope that the attached images can better describe the issue.
    Any help will be really appreciated.

    #6680
    Profile photo of Bryan
    Bryan
    Participant

    Can you upload the gcode file? Unfortunately, Repetier Host will not show any details for a raster image. Since it only shows the travel moves, and not the laser intensity, it is impossible to see a preview of the image.

    #6682
    Profile photo of stevan
    stevan
    Participant

    Thanks for your prompt replay, unfortunately the generated Gcode is too big to be uploaded on here. I’m sorry but I did’t know that Repetier can not display any detail of the raster image. I’m using a 500 mw blue-violet 405nm laser module and I guess that if the power will PWD under 50/60% it will not burn any material, may be this is the problem when I burn the Gcode generated by image2gcode and I guess It’s better for my 500 mw laser to use MAX or Anodized Aluminium profile, isn’t it? Is also useful or not to allow feed rate override?
    Thanks again for your kind help.

    #6684
    Profile photo of Leo69
    Leo69
    Participant

    I would definitely go MAX with a 500mw laser. What’s your federate?

    #6685
    Profile photo of Bryan
    Bryan
    Participant

    With a 500 mW laser you are definitely going to want to do close to MAX power, as well as slowing the feed rate down. The different profiles can be tuned to your laser, they were just set at points that I found worked with the 2.8W 445nm laser.

    The feedrate override checkbox just allows the profile to update the feedrate box on the GCODE page – nothing else. I made it optional in case you didn’t (or did) want the feedrate to keep getting changed when you switched profiles.

    #6686
    Profile photo of Leo69
    Leo69
    Participant

    Is it possible you were using the last version and are now using this one and all the settings reverted back to default values including Min and max power plus federate? You can zip the gcode file before you upload and it’ll probably be under max size.

    #6687
    Profile photo of Leo69
    Leo69
    Participant

    @Bryan – I really like the origin setting:)

    #6689
    Profile photo of Bryan
    Bryan
    Participant

    Me too 🙂 Sure makes things a lot easier

    #6771
    Profile photo of Andrew
    Andrew
    Participant

    How do I install this software? are there any instructions on how to install?

    #6772
    Profile photo of Bryan
    Bryan
    Participant

    See my earlier reply for the attached .rar with the .exe. The source code is also available from the github link i posted

    #6780
    Profile photo of Andrew
    Andrew
    Participant

    Im sorry I dont see any exe files, do I treat these files like plugins in inskape? Sorry I am not as savy as I need to be to figure this out. I feel really foolish these days trying understand something that was to be simple lol.

    #6781
    Profile photo of Bryan
    Bryan
    Participant

    I have attached the program. You will have to decompress it with a program such as winzip, 7zip, or winrar. Inside you will find the .exe file that will run it. It is a standalone program, not part of Inkscape.

    #6793
    Profile photo of Leo69
    Leo69
    Participant

    @Andrew. Probably worth mentioning that if you’re running a newer version of Windows then you’ll probably get a warning from Smartscreen filter or other antivirus when you try to run the program. It’s a generic warning that comes up anytime you try to run an unknown application. Just choose to ignore the warning, the file is safe. You can scan it at virustotal.com if you need peace of mind.

    Some aggressive antivirus programs will automatically quarantine exe files downloaded from the web so you may have to allow a exception for the download.

    #6821
    Profile photo of Andrew
    Andrew
    Participant

    Awesome guys, thank you so much. My brain is truly fried from all the stuff I have been doing since before christmas lol. I purchased the laser thinking I could handle it and I did for the most part. The build was challenging, but not impossible. My background in RC hobbies greatly helped in the electronics modification. I did not however factor in the image or graphic design element. Which is what makes all this possible, not being able to generate images into code that can be read or recognized by laser controller has been a complete nightmare. On the plus side, I have learned several new skills lol.

    That all said, I am hopeful this will work for my setup. I am using a cheap and cheerful k40 40watt laser which I modified with ramps 1.4 + Arduino Uno + LCD + SD card reader on board. Ive also added air assist and lighting. I have burnt several test pieces of MDF 1/4 inch with various shapes, images, text, and graphics, none of which came out exactly as I planned lol. I have been stuck at this point trying my best to learn graphic design, vector graphics, image coding, as well as learning all these different plugins in a program(inkscape) That sometimes works and sometimes doesnt, while other times locking up my systems all together. I work now on win8 and win7, win 7 is directly connected to laser to run a program like laserweb, pronterface, repteir, pic sender, or whatever is to work best. I currently have laserweb up and running if this is the best way, but for now I use only the SD card to print from.

    If nothing else works for me then I may just rewire my laser following jtech design, where fan control is modified for laser. I am certain that whatever I do will someway involve revisiting and modifying my marlin config.h file to enable my controller to understand the code generated for each individual print job(graphic/image). Ok, I feel a bit better and I am done with my rant lol. Please feel free to offer any insight, direction, or criticism, I very humbly accept all lol.

    #6826
    Profile photo of Bryan
    Bryan
    Participant

    Don’t worry, I’ve had my fair share of headaches with every new element. As long as you’re willing to learn, there are many people here and in the community that are glad to help you along the way.

    I am unfamiliar with the K40 lasers, but I do give you this word of caution: understand what input voltage your laser driver expects, and do not blow it! The D9 pin for the fan connector on the RAMPS 1.4 supplies a TTL signal from 0 to 12V. So make sure that your driver can handle this before you switch it. Leo69 has a well written guide that is on the front page that may be of use.

    #6833
    Profile photo of Andrew
    Andrew
    Participant

    Bryan, are you referring to the x and y drivers? When I set them up in the begginning they were taking on 24v. This is my setup and yes I have looked into the fact that there is 0-12v out of fan control on ramps and I dont believe that me moving my current laser pwm control to fan location will work. http://4.bp.blogspot.com/-84-8KpcR0vY/U-UAoggAaII/AAAAAAAAEp4/aYj0-6NZ8HY/s1600/CO2LaserRampsHookup.jpg and http://3dprintzothar.blogspot.com/2014/08/40-watt-chinese-co2-laser-upgrade-with.html.

    Last test I ran using piclaser demo here is the code it spit out. the laser comes on completes a very small sqaure, tiny, then stays on while continuing to fire at the given intensities being fed into controller, but will not move correctly. I can see movement after the little square, but only if I watch the teeth on the timing belt of x axis, in which x is moving .01 up to .04 and then back down then repeats??? All I want is to take an image to gcode and print why is this so hard? After looking at this software I dont think it will work for my set up either and they guys over at pic laser have all but given up on me haha.

    ( File: 20130401_162956 Resized Dithered.bmp )
    ( 01-31-2016 at 21:37:07 )
    ( PicLaser v. 2.1.1)
    ( UNREGISTERED DEMO VERSION )
    ( AUTOMATIC SKIP LINES ENABLED )
    ( J-Tech 3D )
    ( FeedRate = 3000 )
    ( Pixel Resolution = 0.0100 )
    ( Max. Laser Value 75.0000 )
    ( Min. Laser Value 15.0000 )
    ( Engraving Angle = Horizontal )
    M80
    G28
    G20
    G01 F3000
    G01 M05 S0
    G01 X0.00 Y0.00
    M03
    G01 X0 Y0
    M03 S69.5882
    G01 X0.01 Y0
    M03 S65.8235
    G01 X0.02 Y0
    M03 S63.4706
    G01 X0.03 Y0
    M03 S65.8235
    G01 X0.04 Y0
    M03 S66.0588
    G01 X0.05 Y0
    M03 S66.5294
    G01 X0.06 Y0
    M03 S68.4118
    G01 X0.07 Y0
    M03 S66.7647
    G01 X0.08 Y0
    M03 S65.5882
    G01 X0.09 Y0
    M03 S62.2941
    G01 X0.1 Y0
    M03 S67
    G01 X0.11 Y0
    M03 S64.6471
    G01 X0.12 Y0
    M03 S64.4118
    G01 X0.13 Y0
    M03 S63.9412
    G01 X0.14 Y0
    M03 S68.1765
    G01 X0.15 Y0
    M03 S63.9412
    G01 X0.16 Y0
    M03 S66.5294
    G01 X0.17 Y0
    M03 S67
    G01 X0.18 Y0
    M03 S67.2353
    G01 X0.19 Y0
    M03 S67.9412
    G01 X0.2 Y0
    M03 S67
    G01 X0.21 Y0
    M03 S62.5294
    G01 X0.22 Y0
    M03 S66.7647
    G01 X0.23 Y0
    M03 S66.5294
    G01 X0.24 Y0
    M03 S65.8235
    G01 X0.25 Y0
    M03 S66.5294
    G01 X0.26 Y0
    M03 S69.5882
    G01 X0.27 Y0
    M03 S65.5882
    G01 X0.28 Y0
    M03 S66.2941
    G01 X0.29 Y0
    M03 S67.7059
    G01 X0.3 Y0
    M03 S65.8235
    G01 X0.31 Y0
    M03 S65.5882
    G01 X0.32 Y0
    M03 S66.2941
    G01 X0.33 Y0

    #6860
    Profile photo of Andrew
    Andrew
    Participant

    Ok got this to work seemingly ok so far, still a bit to hot in intensity of laser. Is there are way to set origin in the program? or set x,y home all? In the one image I saw that it could be selected from a dot matrix in program, but cant find the modified version to install. Here is test code I generated and ran for a few mins again I have to play with intensity.

    ( File: 20130401_162956 Resized Dithered.bmp )
    ( 01-31-2016 at 21:37:07 )
    ( PicLaser v. 2.1.1)
    ( UNREGISTERED DEMO VERSION )
    ( AUTOMATIC SKIP LINES ENABLED )
    ( J-Tech 3D )
    ( FeedRate = 3000 )
    ( Pixel Resolution = 0.0100 )
    ( Max. Laser Value 75.0000 )
    ( Min. Laser Value 15.0000 )
    ( Engraving Angle = Horizontal )
    M80
    G28
    G20
    G01 F3000
    G01 M05 S0
    G01 X0.00 Y0.00
    M03
    G01 X0 Y0
    M03 S69.5882
    G01 X0.01 Y0
    M03 S65.8235
    G01 X0.02 Y0
    M03 S63.4706
    G01 X0.03 Y0
    M03 S65.8235
    G01 X0.04 Y0
    M03 S66.0588
    G01 X0.05 Y0
    M03 S66.5294
    G01 X0.06 Y0
    M03 S68.4118
    G01 X0.07 Y0
    M03 S66.7647
    G01 X0.08 Y0
    M03 S65.5882
    G01 X0.09 Y0
    M03 S62.2941
    G01 X0.1 Y0
    M03 S67
    G01 X0.11 Y0
    M03 S64.6471
    G01 X0.12 Y0
    M03 S64.4118
    G01 X0.13 Y0
    M03 S63.9412
    G01 X0.14 Y0
    M03 S68.1765
    G01 X0.15 Y0
    M03 S63.9412
    G01 X0.16 Y0
    M03 S66.5294
    G01 X0.17 Y0
    M03 S67
    G01 X0.18 Y0
    M03 S67.2353
    G01 X0.19 Y0
    M03 S67.9412
    G01 X0.2 Y0
    M03 S67
    G01 X0.21 Y0
    M03 S62.5294
    G01 X0.22 Y0
    M03 S66.7647
    G01 X0.23 Y0
    M03 S66.5294
    G01 X0.24 Y0
    M03 S65.8235
    G01 X0.25 Y0
    M03 S66.5294
    G01 X0.26 Y0
    M03 S69.5882
    G01 X0.27 Y0
    M03 S65.5882
    G01 X0.28 Y0
    M03 S66.2941
    G01 X0.29 Y0
    M03 S67.7059
    G01 X0.3 Y0
    M03 S65.8235
    G01 X0.31 Y0
    M03 S65.5882
    G01 X0.32 Y0
    M03 S66.2941
    G01 X0.33 Y0

    #6861
    Profile photo of Leo69
    Leo69
    Participant

    This thread is specifically about image2gcode software which DOES allow origin setting, thanks to Bryan’s revision. The code you posted is specific to pic laser which i believe does NOT allow origin setting. That’s a Jtech software package so maybe someone here uses it and can answer otherwise maybe Jtech forum? Also, why dithering? Does your laser support regular raster/TTL engraving? If it does then give image2gcode a try.

    #6862
    Profile photo of Leo69
    Leo69
    Participant

    Do you mind sharing pics of your setup? The k40 laser is co2 right? I’d like to see how that looks on the mpcnc. Might have to try that myself some day.

    #6863
    Profile photo of karltinsly
    karltinsly
    Participant

    I was under the impression that he wasn’t using a MPCNC at all, but rather one of those blue and white laser cutters from ebay. At least that’s what I get when I google K40 laser.

Viewing 30 posts - 1 through 30 (of 255 total)

You must be logged in to reply to this topic.