3D Printer Laser Engraver




For years now I've been involved in the 3D printing space both as a hobby and for making parts for my projects. As a result, I frequently see modifications people make to their printers, one of which is to convert it to a laser engraver. I've always thought this was a cool modification but I've never had a good reason to do it. You can also buy laser engraving machines but I wasn't prepared to spend the money on a dedicated engraver that I would only use once in a while. I then saw a project online where someone used a combination of 3D printing and laser engraving to make custom table numbers for their wedding which I thought was really cool. I just so happened to be getting married myself which was all the reason I needed to start messing around with lasers. So with that I set to work on designing my own table numbers.
​
Around the time this project came about I was in the process of converting one of my printers over to Klipper firmware. This process involved upgrading a number of printer components and rewiring everything internally. Doing this ahead of time made it easy for me to add in the laser wiring and connect it to the mainboard. The laser has two pins for power and a PWM enable pin to turn the laser on and off, so my original plan was to use the hotend wires for power and one of the fan ports to modulate the laser output. Unfortunately, I ended up shorting the fan port wires when checking pin voltages so the fan port became unusable which made engraving more challenging as I'll discuss later. As a substitute, I wired the enable pin to a potentiometer connected to 12V so I could turn the laser on and off manually. With the wiring now in place, all I needed to do was mount the laser. The printer I used for this modification allows you to easily remove the hotend but the process to remove the mount that holds the hotend to the gantry is a bit convoluted. I wanted to be able to swap between 3D printing and laser engraving relatively easily so I printed a holder for the laser that attaches to the gantry mount the same way the hotend does. The holder positions the laser directly over top of where the printer nozzle would normally go which meant I had access to the full X and Y range of the printer, however this required the laser to be placed higher than its ideal engraving focal length. With the build finished, it was time to figure out how to start engraving.
​
Much like a 3D printer or any CNC machine, this laser engraver requires a set of instructions on where to cut/engrave which is accomplished through a G-code file. To obtain a G-code file, I had to start by figuring out which images I wanted to engrave. The engravings are meant to be simplified versions of the real image so I ran each image through ChatGPT to generate a simplified black and white stencil. I then imported each stencil into Onshape where I further simplified the image by tracing the lines I wanted the laser to engrave. This took some practice to figure out how much detail the engraver was capable of while still maintaining the essence of the image. Once done, I exported the trace as an SVG which I then imported into Inkscape where I was able to generate a G-code file with the help of a laser tool plug-in.
​
Now that I had G-code files, I was able to start testing the engraver. It worked decently well from the get-go but there were a couple of major details that needed to be ironed out which I've outlined below:
​
-
The laser I used is meant as a replacement for a dedicated laser engraver, so being mounted to my printer means it's not set up in its ideal operating position. The focal length of the laser (or distance from the laser head to the workpiece) and the laser intensity can both be adjusted. However, as I mentioned before, the laser is mounted relatively high, and I shorted the fan port pins that would allow me to modulate the intensity of the laser which limited my operating window. To compensate for the absence of laser modulation, I instead turned the power supplied to the laser on and off when I needed to transition between engraving and traversing. This worked, however I found there was some latency between switching the power and the presence of the laser, so I had to add delays to the G-code during these transitions to prevent gaps or streaks from appear in the engraving.
-
I engraved my images into pieces of wood, which looks really nice but the wood would start to char if engraving lines were too close together or the laser spent too much time over one spot. This meant that I was limited in the level of detail I could include in each engraving. I was able to mitigate this problem by keeping the laser travel speed high enough and modifying my traces to avoid fine detail.
​
In addition to the adjustments I described above, I also made a Python script to help visualize the cut and traverse paths of the laser by plotting the X and Y points from the G-code file. This helped a lot to see exactly what the laser was planning to do before I started engraving. I was able to use it to make some manual modifications to the G-code and go back to correct some of my traces before potentially wasting some of the wood I bought. ​
​
For my first attempt at laser engraving I think everything came out really well. If I do more engraving in the future I'll take what I've learned and see if I can modify my process and setup to get better results.