Intro: DIY Laser Etching Machine
I recently built a laser etching machine, and this Instructable covers the process I followed while making it, as well as some basic usage tips!
I've entered a couple contests with this Instructable, so if you like what you see, I'd greatly appreciate your vote! and be sure to check out all the other fantastic projects in the contests!!
BUT, First off, Some safety information.
USE EXTREME CAUTION WHEN ATTEMPTING THIS PROJECT! IT INVOLVES MODERATE-TO-HIGH-POWER LASERS THAT CAN BLIND YOU INSTANTLY, EVEN WHEN SEEN REFLECTED ON A DARK SURFACE, AS WELL AS DO SERIOUS DAMAGE TO YOU AND YOUR EQUIPMENT. DO NOT ATTEMPT IF YOU ARE NOT FAMILIAR WITH WORKING WITH LASERS!
I cannot stress enough how important it is to BE CAREFUL with these! Even while following all proper safety procedures, I have gotten several small burns on my hands as well as a couple tiny blind spots where a reflection glanced across my face.
I TAKE NO RESPONSIBILITY FOR ANY HARM CAUSED BY THIS PROJECT. UNDERTAKE IT AT YOUR OWN RISK.
Now that all that is out of the way, we can get on with the more interesting stuff! Then again, It's worth saying again: Don't be ignorant, if you aren't sure if you're doing something right, post a comment and I'll try to help, but at the end of the day, this is an advanced project, so be aware of the risks and take the appropriate precautions!
This is a VERY text heavy Instructable, I will be adding more pictures soon, but when I write these, I err on the side of over-explaining!
WOW, got featured on Hackaday!!! http://hackaday.com/2014/01/07/delta-laser-engraver-uses-inkscape-for-g-code/
Step 1: Materials / Tools Needed
To build this machine, I used several things:
A SeeMeCNC Rostock Max 3D printer. (available at SeeMeCNC)
This was used both for the manufacture of components (the brackets and connectors) as well as being the movement frame used for positioning the laser.
The Rostock Max could be substituted out for any other 3D printer, but a different custom bracket would have to be designed to mount the laser
A WickedLasers Spyder Arctic 3 2-Watt handheld laser (available at WickedLasers)
This is a BEAST of a laser. It's not cheap, but it is built to a very high quality standard, and WickedLasers stands by their products and is more than happy to help out if any issues do occur!
Lower wattage lasers will still work, but will take longer to burn material - this however, can be helpful in that it allows finer control of the look of the burn!
Side note: the above link to WickedLasers is my Zferral link, if you use that link to get to the site when buying a laser, I'll get a commission! Thanks!
I'm going to take another moment to say BE CAREFUL! This is not your average laser pointer. Laser pointers are generally around 5mw, that's MILLIWATTS. this laser can put out up to 2.5 WATTS. that is SEVERAL orders of magnitude more power. Where a laser pointer might annoy you, this laser could instantly blind you! Also, no, I won't shut up about it. Safety is important.
WickedLasers Spyder 3 Expanded Lens Kit (see above)
This kit comes with the burning lens I use on my laser for this project. While not strictly necessary, it definitely makes for a better quality burn!
Inkscape Vector graphics editing software (available at Inkscape)
Inkscape is a great free vector editor, and works very nicely to prepare images for burning. Along with some plugins, it is also used to generate the GCode for burning!
GCodeTools Inkscape Plugin (available at GCodeTools)
GCodeTools is a pretty easy to use plugin that allows a user to generate GCode that matches the paths in a vector image. There are some tricky bits that arise with certain printers, and those will be discussed later.
EggBot Inkscape Plugins (available from EvilMadScientist Wiki)
The EggBot is a pen plotter designed to draw on spheroids. They use inkscape to generate the code! They have posted a lot of really handy plugins on their wiki, specifically the Hatch Fill plugin, which is what I used to do filled areas in my etching.
3D Printed Parts! (design files attached!)
I designed a quick-disconnect extruder coupler for my Rostock, the details of which are posted here: Thingiverse
I then designed a mount for the Rostock Max that clips into the coupler I designed, details here: Thingiverse
That's about it in terms of materials and tools, of course, a regular toolbox will come in handy, but if you're building a laser etching machine, that's kind of a given!
Step 2: Prepare the Machine!
First off, you'll need to prepare the machine to receive the laser. In my case, that meant designing and installing the quick disconnect extruder coupler, and running through a lot of iterations. In your case, it should be a simple matter of printing and bolting on the "Top Coupler" of the mounting system.
Relevant parts and instructions can be found on my thingiverse page
I suggest also printing out the extruder mount itself, as that will make it easier to switch back and forth between the laser functions and the printing functions!
Step 3: Prepare the Laser
First off, the best part about this project is that it requires NO modifications to be made to the laser!
The pictures attached to this step show how to connect the parts, but here's an explanation as well!
First, print the laser mount parts from my design on Thingiverse: Rostock Laser Mount
Then, after cleaning up the print as instructed on the Thingiverse page, screw a tube fitting into the hole in the one part (only one has a hole) as shown in the pictures, this is sized to use the fittings that come with the Rostock Max.
Snap the two parts onto the laser, they both engage the fins of the front heatsync, and should hold fairly securely! If they feel loose to you, there is a safety collar included in the print file.
Step 4: Set Up the Machine and Host Software (plus First Strike!)
As part of the premise of this project, I'm going to assume a basic knowledge of the Rostock Max 3D printer, as well as the Repetier Host software. As such, I may reference functions without directly explaining them. If any explanation is needed, let me know and I'll add it!
First, attach the laser with coupler to the mount on the printer, you might have to take off the tail cap to do this, but it should fit in nicely.
FROM NOW ON, LASER SAFETY GLASSES SHOULD BE WORN AT ALL TIMES WHEN IN THE VICINITY OF THE LASER! EVEN THE REFLECTIONS CAN CAUSE PERMANENT, NEAR INSTANT BLINDNESS!!
Next, power on the laser into its "momentary" mode, this is a mode available on the latest generation (as of the beginning of 2014) of Spyder 3 series lasers. It is activated as described in the Spyder 3 manual. It may be necessary to use a piece of extra filament to poke the button!
Power on the printer, and connect the host software. In the "Manual Control" tab, Home the machine, then type "G0 E3" in the manual send box, and send the code to the printer. This will enable the filament drive and extend the filament by 3 mm.
Press the release lever on the extruder and push filament manually through the tube until there is some filament sticking out the end of the tube, neatly trim the end, and manually pull it back into the tube.
Enter the command "G0 E0" in the manual box, but don't hit send yet, instead, connect the extruder tube onto the laser, and make sure it is fit snugly in place.
Here is where things get interesting, press the filament release lever, and then push filament into the tube until the laser turns on, release the filament lever, and the laser should remain on! now press enter on the computer (quickly!) to retract the filament. This should immediately power off the laser. If it does not, manually release the filament, and repeat the whole process, but use a little less pressure at the start of this step.
At a certain point, you will achieve control of the laser. When a G0 E3 command is sent, the laser will turn on, when a G0 E0 is sent, it will turn back off.
The last part of the machine set up is to find the focal point of the laser. Put a piece of cardboard on the platform, and place the folowing code into an empty "script" slot in Repetier:
This code tells the printer to turn on the laser, wait 50 miliseconds, and turn it back off
Run the script once with the printer at it's home location to make sure it works properly, you should see a brief blink.
Move the laser down until the tip is about 2 inches above the cardboard and run the script again.
You should see a dot appear on the cardboard!
Use the Z jog commands to move the z axis up and down to find the spot at which it produces the crispest smallest dot. This, is the focal position. Write down the current Z axis position of the machine, we'll need it in the next part of the instructable!
At this point, you can turn off the laser, we won't need it again until later, and it's always a best practice to completely power off the laser when not in use.
You can take off your goggles now too, the laser is completely off, so they aren't needed. Or you can wear them, I think mine look pretty cool!
Step 5: Prepare the Software
For this project, I used Inkscape for much of the processing of images to burn.
I used one main plugin to prepare files for burning, and it's called GCodeTools. While it has some issues, it is fairly effective, and does what I need it to do.
Download both Inkscape and GCodeTools and install them.
Let's walk through the steps of making our first test burn.
- Open a new document in Inkscape
- Click "Extensions" then "Gcodetools" then "Orientation points"
- The window that pops up is how you add the coordinates to your drawing.
- "Orientation Type" should be 2-points mode
- "Z-Surface" should be the focal height that we found earlier
- "Z-Depth" should be that same focal height, minus 0.00001 (as close as we can get while still making the software thing it's different, this is because GCodeTools is made for milling, and we're doing laser work)
- Units MUST be mm for use with most common 3D printers!
- The window that pops up is how you add the coordinates to your drawing.
- This should have added a new "tool" to the doccument! this tool is how we define movement speeds and the like! It will be explained in the next step!
Step 6: Tool Definition
In order for it to to generate useable code, we need to give GCodeTools some information about our machine!
My settings are as follows:
- id: default tool
- diameter: 10 (not sure what this does, it seems not to have an effect on the generated code)
- feed 1000 (this is the speed in mm/min that the machine will move while the laser is ON. Larger values make light burns, smaller values make heavy burns. Start with a big number, say 5000, and work your way down until the burn looks good)
- Shape:10 (10 should be cylindrical, but the setting seems not to have an effect)
- Penetration angle: 90 (this is important, it means the lead ins and outs will be vertical)
- Penetration feed: 5000 (irrelevant, the moves that actually use this speed will be commented out later)
- Depth Step: 1 (Not sure what this does)
- In Trajectory (None) (not used by us)
- Out Trajectory (None)
- gcode before path: G0 E3 F5000 (this tells the printer to push the button as fast as possible)
- gcode after path: G0 E0 F5000 (this tells the printer to let go of the button as fast as possible)
- sog: (none) (not sure what this is)
- spindle RPM (None) (not used by us)
- CW or CCW (None) (not used by us)
- tool change gcode (None) (not used by us)
- 4th axis meaning (none) (not used by us)
- 4th axis offset 0.0 (not used by us)
- 4th axis scale 1.0 (not used by us)
- fine feed 1000 (Possibly used when doing small details, should be set to match feed)
That's the basic tool setup
Step 7: Image Preparation
Now that you have orientation points, and a defined tool, it's time to draw something!
As a first test, I suggest a spiral, as it incorporates many steps you'll need to do for lots of designs.
Select the "create spiral" tool on the inkscape sidebar and draw a spiral somewhere on the page.
What you have just created is an "Object" in inkscape, not yet a vector path, so the first step is to, with the spiral selected, click the "Path" menu, and select "Object to path" - note, nothing changed, or at least, that's how it looks! The spiral is now a path!
Next, We'll need to remove any curves, but don't worry, there;s a tool for that that will keep the spiral nice and spiraly! The reason for removing curves is that the Gcodetools plugin will try to use G2 and G3 commands to draw them, and Repetier does not support those commands!
To remove the curves, keep the spiral selected, and click "extensions" then "Modify Path" then "Flatten Beziers" A box will pop up with a "flatness" value, I tend to use 0.1 . Hit apply, and then close, and the image should look roughly the same. The difference is that now, the spiral is made of line segments instead of nice vectored curves!
The final step here is to position the spiral in the printable area of the machine. The easy way to do this is to set the coordinates of the spiral path in Inkscape to 0,0 which is the same set of coordinates as the orientation points.
NOTE: 0,0 of the orientation points corresponds to the center point of the machine. this means that an object positioned at 0,0 will actually be above and to the right of the center of the machine. (the bottom left corner is the positional anchor for things in Inkscape)
Step 8: Code Generation
Finally! it's time to create the GCode!
Select all the paths in the image that you want to generate code for
From the "Extensions" menu, choose "Gcodetools" then "Path to Gcode"
In the "preferences" tab, set the "File" item to the desired file name, and the "Directory" item to the location you want the file placed in.
Set the "Z safe height for G00 move over blank" to the focal distance we found earlier!
Set "units" to mm
Now back to the "path to Gcode" tab.
"Biarc interpolation tolerance" and "Maximum splitting depth" are no longer relevant, since we have no arcs.
"Cutting Order" should be left as "subpath by subpath"
"Depth function" should be just "d" since we won't actually be using this part of the control.
"Sort Paths to reduce rapid distance" is VERY handy!! and I strongly recommend setting it to true!
We are now ready to generate the code!
Click "Apply" and a new file should appear wherever you told the plugin to put the file!
Step 9: Post-Processing of Code
Unfortunately, the code created by GCodeTools isn't immediately ready for printing, and needs a touch of clean-up work.
I do the following to each file before I print it:
Run a "find" for G2 and G3 commands, there should be NONE, if there are any, go back and make sure you ran "flatten beziers" on ALL curves!
I then get rid of the top 6 lines, since they are all comments (for our purposes)
The first command in the file should be a G00 Z(insert focal position here)
The next thing I do, is comment out ALL other commands starting with G00 Z or G01 Z (replace all G00 Z with ;G00 Z) etc
This removes any extra Z moves which could cause potential delays and glitches (I can go into detail here if needed, just ask)
Next, I find and replace all open parenthesis symbols "(" with ";(" this is because the Repetier and Marlin comment indicator is ";" and "(" alone causes issues in the parser that can cause delays
I created a macro in UltraEdit (a text/hex editor I use) to do this for me, it is as follows:
Key DOWN ARROW
Key DOWN ARROW
Key DOWN ARROW
Key DOWN ARROW
Key DOWN ARROW
Find "G01 Z"
Replace All ";G01 Z"
Find "G00 Z"
Replace All ";G00 Z"
Replace All ";("
it's a pretty simple macro, but it gets the job done. Doing it by hand is fine too, just make sure not to get rid of that first Z command (since it's the one that will position the laser!
Step 10: Test Run!
Next, copy the code out of your text editor, and paste it into the "Gcode" tab of Repetier
For this step, DO NOT power on the laser!
Press "Run" but keep a finger on the kill switch (power off the bot if anything goes wrong)
If all is well, the machine should lower itself to the focal height, and trace the pattern that you drew!
Place a sheet of cardboard on the platform now.
IT IS NOW TIME TO PUT YOUR LASER SAFETY GOGGLES BACK ON!
Now, Power on the laser! (you may need to disconnect the bowden tube to do so, but leave the filament alone, that way it will stay at the proper position for button poking!)
Home the laser, and run the blink test script we wrote earlier, the laser should blink!
If all is well, press "Run" again!
This time, the laser should drop down, and etch the drawn pattern into the cardboard!
The pictures attached to this step are the first three decent sized patterns I etched!
Step 11: Congrats!
You now have a laser etching machine!
One last time: BE SAFE, Wear your safety goggles, Don't look into the beam, Don't put your hands in the way of the beam, and if you do get hurt, don't blame me, I WARNED YOU!
If you have any questions, feel free to comment on this Instructable and I'll reply as soon as I can!
I'll also be adding more pictures soon, once I get the chance to take some with a good camera (and laser-safe lens)!
- Multiple burn levels could in theory be used by creating several patterns at different feedrates, and combining them!
- There may be a way to use the variable "Z" height function (usually depth of cut for milling) in GCodeTools to generate Feedrate values, thus allowing for variable speed over a larger range
- An enclosure could be built for the laser, to prevent stray reflections, however, this enclosure would need to be opaque to 445nm light, and as far as I have found, this would be quite expensive.