I adjusted my laser engraver’s controller to the MKS 1.4 RAMPS Board (originally intended for a 3D printer so I can have more options available to me than the original software/firmware allowed for. Well that turned out to be a double-edged sword in that yeah, I sure do have lots more options available to me on the firmware side, but I needed a whole different way of creating the GCODE files. Fortunately I knew about the resources prior to redoing the my board and 305 Engineering’s Inkscape Extension was prime among them. It’s an awesome extension they put up on Github as a “Beer-Ware License” which is hilarious and awesome. I first found it from their post on Hackaday.io.
After using the extension for a while I found a couple pieces of functionality that I missed from my previous GCODE creator software. So I started investigating the underlying code to see how complicated it would be to adjust the code to do the extra couple things I wanted to do. Well it turned out to be a python file doing the majority of the heavy lifting. While I am nowhere near an expert at python (nor any other language for that matter), I have some familiarity from playing with my Raspberry Pi/s. It is what I used for the greyscale test. It’s taken some real trial and error to get to do what I’ve wanted and it didn’t help terribly that the 305 Engineering dudes must be in Italy because most of the comments are in Italian, but I was able to do some of what I wanted to do.
The first thing I missed was the ability to preview the extents of the image. I created a portion of code to create a separate GCODE file (if you choose). So if the image I’m going to be engraving is 100mm x 50mm the dimension text GCODE will outline the 100mm and 50mm a specified number of times in a specified laser value. I like to have this so I can make sure that my work piece is square and centered where I want it. I got this one to work pretty easily and cleanly.
The next thing that I wanted was the ability to adjust the max laser output level. I made it so that it would scale the output level down (i.e. if you wanted 200 as the max output level it would scale the laser outputs by 80% [200/250]).
For some reason the fine folks at 305 left it such that “.txt” is appended to the GCODE filename which meant that I had to rename the file each time so I changed that and haven’t had any issues with that. I’m not sure why it was like that in the first place. I also added my starting and ending GCODE for my LEDs and my exhaust fans.
I added a couple extra inputs to do what I described above. The “Dimension Test Laser level” input is to input a laser level that will make the laser light visible but not actually burn into your workpiece. Then of course, “How many tests?” does exactly what it says. If there is a 1 or more in this section you will get a fourth file output from the script: the original image, the adjust image based upon your conversion and threshold etc, the dimensional test GCODE file and the GCODE for the file itself. The “Desired Laser Max” portion is what ratios the outputs of the laser level which only works for “Grayscale”. (I’ve only use the grayscale functionality of the extension so far.)
From their disclaimer on their code they say I can adjust it in share it as long as I keep their disclaimer in it, which I did so if you’d like to try my version you can download it here. My anticipation is that if you were to want to use my version you would have to download and install the original version and then add my version into your extension folder, which you can find under Edit => Preference and then under the System button you can find the “User Extensions Folder” . (Since I already have it installed I can’t recreate the process to verify, if I get anybody to try it or I try myself on a different computer I’ll update accordingly.)
For this project like all of my other projects I feel like I am standing on the shoulders of giants with using tools that they have created and adding my small little mods to it get it to do what I want. Thanks 305 Engineering!