I feel it's time to share my latest project - a low cost laser engraver,. The workspace is a bit small but none the less it works and comes so cheap that most will be able to replicate the result. I did take a few shortcuts, as I feel I don't have the knowledge to do all the electronics I opted for readymade but low cost in favor of trying to make my own (and most likely fail). All parts used are however easy to find.
I am pleased with the end result even if there is room for improvements. The small size and low power is a bit limiting but I have made allot of fun things already. Paper cutouts, plant markers and stamps among some. The engraver itself might not fit in a pocket but the workspace limits what you can do with it to fit in the pocket.
A word of warning is in place . This instructable is using a ~200mW red laser. It might nut cut through chunks of wood but it will make you go blind if you are not careful. Never look into the beam, even reflections can be dangerous if focused. Please be careful.
Step 1: Acquire the Parts.
- Arduino - this is the heart of the control electronics.
- Easydrive - stepper driver.
- Two DVD-rom drivers - Maybe more if you’re unlucky, and at least one DVD-R to salvage the laser from.
- Laser housing - singles can be found on e-bay.
- Laser driver - There are lots of alternatives here, I use a simple LM317 based circuit.
- Various nuts, bolts and other building materials.
Step 2: Rip Apart the DVD-Roms.
After removal of the screws at the bottom of the drive you can lift it of like a lid. Underneath you will most likely find two circuit boards and none of them are any use to us. But remember to salvage other useful parts that can be used for other projects. For example under the front circuit board there is a small dc motor worth saving. This is when it is time to remove the front together with the front of the tray; the front comes loose after you pull out the tray (just use a hairpin and the small hole in the front). The next step can include some screws and/or mild force. Remove the two circuit boards. Be careful with the ribbon cable to the stepper motor. If you turn the DVD-Rom right side up and remove the cover, you should find what we are looking for, the stepper motor assembly. Remove the screws and just lift it out.
Now that we have the assembly out it needs to be cleaned up a bit. Remove the spindle motor, it could be useful but I feel they are hard to drive and thus don't keep them. They are usually hold in place by three very small screws but sometimes they are part of a larger assembly so be careful that removing it won’t compromise the two rods holding the lens.
The lens is another story, just remove it best possible way, we need a smooth surface to attach other parts to later. Be careful to not harm the DVDR laser diode. It can come to good use if you don't want to buy a new powerful laser later. See the next step.
Step 3: Putting a Laser Together.
Removing the laser from the DVDR is not hard but most lens assemblies look different. Locate the diodes (there will be two, one IR and one red) and remove them from the assembly. There are some optics and two magnets that can be saved for future projects. Once you have removed the two diodes you must be careful. The two diodes are very small and fragile. Remove the small connecting PCB strips from the diodes and use two AAA batteries to check for the red diode.
Now that you have the bare diode it is time to mount the diode in the housing. Place the diode in the housing and use the back of the housing to press down the diode very carefully using a vice. When you get this far you are on the home stretch. Solder the wires to the positive and negative pins, screw in the lens and you are done.
Step 4: Construct the Mechanics.
The workspace is mounted on the old laser diode assembly. Make sure it is flat and level then glue something on that will serve as workspace. I found a piece of 1/4" acrylic that worked out just fine. It made this workspace stable enough but as the laser can shine through it I was not sure if this would be a security hazard or not. Later I found the solution I think works out for the best. I cut a piece of the DVDR metal case to the same size as the acrylic and glued it on. This way it still very stable and you get a workspace that will be tough. One positive side effect is that you can secure whatever you are engraving with small magnets.
For the X axis I found some aluminum profiles in my junk bin but just about anything could be used as long as it is stable. Measure the height you feel will be right for what you want to engrave. I opted for 7.5" long pieces for the support. This would give me a little under 2" clearance.
One important thing, the mounting holes on the assembly are not symmetrical. Be sure to measure the distance from the bottom end of the supports to the linear guides. That way you will be sure to get everything aligned. Where you mount the X axis will be dependent on the laser mounting. The laser should be in the center of the work area when the Y axis is in the middle position. When you mount the axis to the base plate drill a small guide hole for the screws after you made sure that everything is square.
Now you should have the X and Y axis done and square to each other.
The laser mount does not have to be very sophisticated, mine is made from a small piece of plastic sheet and a clip then everything is glued together. Using a clip to hold the laser lets me change the focus point by simply slide the laser up and down. As with all other parts the size is not that important as long as everything is square. There are just one measurement you need to think about here, the laser should be in the center of the work area when the Y and X axis is in the center position.
Step 5: Electronics
In the schematics I have added a relay for use with a fan. This can come in handy as the engraving produces some smoke.
The Easydriver have two pins called MS1 and MS2, these sets the step sequence. Tie them both to the five volt output from the Easydriver. This sets the step sequence to micro stepping . The four pins from the stepper connect to the motor output. All steppers I have found have all had the same pinout on the small connecting PCB. Connect the pins in the same order to the Easydriver as on the connecting PCB. The control pins (step, dir, gnd) goes to the Arduino. Besides this the Easydriver needs motor power connected. I use a twelve volt wall wart that drives the motors, fan and Arduino. There is a potentiometer that controls the power to the motors, I just set this to the lowest setting and turn it up a tad if the steppers don't have enough force. I don't know the rating on the steppers, if they gets to hot you’re driving them to hard.
The fan just needs to be connected to the fan output. A small computer fan works well, just connect the positive and negative leads to the correct output.
The laser driver is an LM317 based circuit with no specials. This will work fine but it is far from optimal. I am driving the laser diode far too hard at about 300mA and if you do that you can’t expect a very long life for the diode. The best solution would be to find a stronger laser and better driver but to keep to the spirit of things I wanted to use the laser from the DVDR itself. Laser on/off is controlled by the same relay as the fan.
If you want to simplify you could skip the whole laser driver and use a readymade driver. Then all you would have to do would be to connect the power to the fan relay. Of course this would probably be a little bit more expensive.
The whole thing evolved into a new Arduino shield, the Laser Shield. I have included the schematic and board layout in Eagle format . Creating a circuit board is a bit out of the scope for this instructable, but there are lots of really good guides here on Instructables.
If you want to make your own layout with Easydrivers I have made a Eagle library with the driver, it can be downloaded here .
Step 6: Prepare the Arduino.
I have however changed the pin-out since then and here in the instructable I use the default pin-out of Grbl. This will make it a lot simpler to follow and setup. You can just download the prepared hex file from the Grbl download page .
The current version of Grbl (0.6b) has a bug in the queue system. The laser on and off (M3, M5) commands are not put in the queue and the laser will be turned on and off as soon as the Arduino receives the commands. This is resolved in the edge branch. You can download and the source from here , or grab the compiled hex I am using from here . This should resolve the issue until the next version of Grbl.
Any way you choose to do it you will end up with a .hex file that you must get into the Arduino. I have tried a couple of different ways and the one I like the most is by a program called XLoader . The programming is pretty straight forward; select the correct serial port for your Arduino. Select the hex file and type of Arduino and press upload. If you are using the new Arduino Uno the XLoader doesn’t work, you will get an upload error. In that case I recommend using ARP/Arduino Uploader but even this uploader has some issues with the Uno. When programming the Arduino select the com port and microcontroller in the respective dropdown. After that you will have to make a change in the “AVR Dude Params” text. Erase the “-b19200” (without the quotes) part and click on the upload button. In any case, a couple of seconds later you are done and are ready to try it out. Exit the XLoader and get to the next paragraph.
The Arduino needs to be set up for the job. Start your favorite serial terminal and open the port your Arduino is connected to. You should get a welcome message:
'$' to dump current settings"
If you enter $ followed by return you will get a list of options. Something like this:
$0 = 400.0 (steps/mm x)
$1 = 400.0 (steps/mm y)
$2 = 400.0 (steps/mm z)
$3 = 30 (microseconds step pulse)
$4 = 480.0 (mm/sec default feed rate)
$5 = 480.0 (mm/sec default seek rate)
$6 = 0.100 (mm/arc segment)
$7 = 0 (step port invert mask. binary = 0)
$8 = 25 (acceleration in mm/sec^2)
$9 = 300 (max instant cornering speed change in delta mm/min)
'$x=value' to set parameter or just '$' to dump current settings
You must change the steps/mm for X and Y axis to 53.333 on both. Just enter "$0=53.33" followed by return and then "$1=53.333" followed by return. Z axis can be ignored as it is not used. The acceleration can be ramped up to something like 100 ("$8=100" and return). As we move really slowly with this machine acceleration can be high. Another side effect of low acceleration can be that curves get a lot more burnt than straight lines as the controller constantly tries to accelerate and decelerate but never reach full speed. If you build this like me one of your axis might be mirrored. This is easy to fix. Option $7 lets you change direction on axis. I wanted to change direction on the X axis so I type in "$7=8" as I want to change bit 3 (8 = 00001000 binary) if you want to change direction on Y axis you type in 16 (00010000) or 24 (00011000) to change both. The complete documentation of the invert mask can be found here .
Now you are ready for the computer setup. If you want to try some movement you can type "G91 G28 X0 Y0 [return]" to zero the axis. Followed by "X10 Y10 [enter]". You should see 10mm movement on each of the axis.
Step 7: Getting the Software Ready.
Inkscape - this is open source vector editing software. (download )
Laser engraver extension - This generates the g-code needed to control the laser. (download )
G-code sender - A small windows program I wrote to communicate with Grbl. (download )(source )
Install Inkscape by following their instructions. This should be a pretty painless process. And any help on the subject should be easy to find in the documentation on their web page. Next up is the extension; this is a little harder but not much. Open the .zip file in your favorite unpacker and copy all the files to "c:\Program Files\Inkscape\share\extensions". You have to restart Inkscape for the extension to show up. The extension is a heavily modified version of "Gcodetools ". That is it for setting up Inkscape. You can leave the "G-code sender" on your desktop or any other place where you will find it later. It does not need to be installed.
One important word about the extension, I am not a python programmer and there might be some kinks in the code.
I assume you have everything installed and ready to use by now. Here is a quick screencast of the work flow.
I hope this was not too quick. There are loads of guides on how to use Inkscape out there. I will not go into any details on how to use it.
The G-code sender is another story; there is no documentation as I just made the program. All the documentation is in this instructable, but feel free to ask if you have any questions. When you open the program it should be pretty self explanatory. The only strange thing is the radio buttons "\n\r" and "\r\n". Depending on what version of Grbl you are using the line ending are different. If the one doesn't work try the other one. Choose your serial port, and if you do forget to plug in your laser engraver, plug it in and hit the refresh button and your serial port should show up. Hit the "open" button to open hailing frequencies. Once the port is open you can type in commands like any terminal software in the text box above the open button. To start engraving a file you can ether type in the file path or click on the browse button and select a file.
When you click on "print" your file transfer will begin. The file will be transferred until the buffer on the Arduino is full, about 20 rows or so. When the buffer is ready for more data another row will be transferred. When you hit stop the transfer will end but the Arduino will not stop until the buffer is empty. When you hit the "close" button or exit the program the serial port will be closed and any transfer will be stopped.
Sometimes there will be a G-code that Grbl can’t interpret and will return an error. Most of the times these errors can be ignored but they will show up in the sender. This can be comments or the start and end "%" sign. If there is a comment after a command there will be an error but the command will still be executed. For example "G21 (All units in mm)" the G21 command will be executed but the comment will give an error.
Step 8: Final Assembly and Extras.
Some small extras have been added along the build. First of is the fan that keeps smoke away from the workspace. This is a small 40mm computer fan connected to the laser relay that I wrote about in the electronics step. The fan is pointed away from the workspace and gently sucks away smoke.
Another small but very useful extra are the magnets to hold down paper and other light weight objects. I got these from an old toy . After gluing some nuts on top of them they are done.
To change the focus you can screw in and out the lens. Or you could set the focus once on the workspace and then slide the laser up and down in the mount. This is how I do it. I have a set focus when the laser is at the lowest possible position in the mount. Then all I have to do is measure the thickness of the material and raise the laser the same amount. Most times I just hold the material next to the laser mount and move the laser to the correct height.
Step 9: Final Results.
I found some paint stirrer sticks at my local DIY shop. I liked the look of the wood and they were cheap. I saw of a piece and drilled a small hole. After some sanding I engraved the Binford logo from the sitcom "Home improvement".
A normal Popsicle stick engraved with the plants name.
I'm just trying to show off ;)
Memo note holder.
A clothespin engraved and with a small neodymium magnet glued to the back makes a great way to stick a bunch of notes together on the fridge or any other metal surface. I like clothespins they are very versatile.
Cut out of a small foam sheet and glued to a piece of Masonite.
Thanks to scriptster who made the G-code for the model. Check out his model here .