Introduction: Lego NXT Laser Engraver

After seeing a few laser engravers on Instructables and their intricate results I decided it would be worth building my own machine to make some wooden signs and artwork. I also decided I wanted it to be easy to build but still relatively effective at engraving images and that other people would be able to build as well. Thus my goal was to make it cost-effective and simple enough that anyone with some basic electronics knowledge and materials could build it without much difficulty. Initially I was going to use Arduino and almost all 3D-printed parts, but after having some printer issues I figured Legos would make things much simpler and easier to work with, and it's turned out fairly well. It's not industrial-grade and it has some issues of its own, but it's a great way to get started with using and building custom CNC tools, and doesn't require any knowledge of Arduino or soldering.

So, what we have here is a fairly simple laser engraver and low-power cutter with a CNC frame built almost completely out of Legos. It uses a rack and pinion gear system, with 3D-printed gear rack bricks, and can be built almost entirely with pieces from the Lego Mindstorms NXT 1.0 and RCX sets, plus the laser and circuit components. The NXT brick controls the movements, but since I haven't been able to find a complete solution to using G-code with NXT each movement must be programmed manually. (I plan on finding a solution to this soon!)

As far as the laser goes, it is a 200mw 405nm purple/UV laser diode that was apparently salvaged from a Blu-Ray drive. The link to the exact one on eBay is in the corresponding step, but if you want to extract your own it might work as well - I can't guarantee the same results though. It is powerful enough to burn through paper and into wood, and it did manage to make a mark in metal covered in black marker.

Disclaimer: This is a laser project, meaning it involves a higher-powered laser beam (200mw) with the potential to significantly damage the human eye. As anyone who's worked with lasers will tell you, use extreme caution when dealing with lasers above 5mw (laser pointers). ALWAYS WEAR EYE PROTECTION WHEN THE BEAM IS ON, and even when off use caution - even the reflection of the laser light can still be dangerous. I am not responsible if you burn a hole in your corneas (which is a real possibility), set your house on fire (less likely), spill hot coffee on your lap, or anything else that happens while building this machine and otherwise.

Step 1: Laser Basics

Lasers are a particularly effective manufacturing tool since they don't wear out, can cut most materials with great precision, and don't need to be replaced nearly as often as traditional machine tools. Simply put, a laser burns into/cuts a work part by delivering enough energy to heat up the part in a short enough period of time to burn it almost instantaneously. For the purposes of this Instructable, the laser is only powerful enough to cut paper and burn a mark into wood.

Color also plays a role in laser cutting: a laser's effectiveness depends on the color of the beam and the work part. Lasers are calibrated to output a particular wavelength of light which we perceive as the beam's color. Since lasers are just focused light, a surface of the same color as the beam will reflect most of the light from the laser, thus reducing the amount of light and thus energy the object absorbs. For example, a 405 nm wavelength purple beam (like the one I used) will have trouble burning blue objects, and even more so purple ones. White surfaces reflect every color of light, so they are harder to burn than other colors; conversely, black surfaces absorb every color of light and are thus easier to burn. Metals reflect most light as well, making them difficult to cut or burn with most colors of lasers, so industrial-grade machines use infrared lasers whose light is not reflected by metal.

For a low-power laser like this one, a black coating on the surface of a metal object will allow the laser to burn the metal slightly. Trying to use a visible light laser to cut metal can be dangerous to the laser itself since the light can be reflected directly back into the diode, damaging or destroying it. What's important is that the surface of the object being engraved (henceforth known as the "work part") is the right color.

Step 2: Laser Safety

Even though this machine is built out of Legos, the laser in it can be quite dangerous if mishandled. Any laser above 5 mW has the potential to permanently damage your eyes, and even below that can still cause injury if misused. For comparison, most red laser pointers are about 1 mW lasers, while the laser here is a 200 mW - 200 times more powerful! Even the reflected light from this laser can still harm your eyes, so to be clear, you should never power the diode up without wearing proper eye protection!

Eye protection also depends on the laser you're using. Like I mentioned in the last step, lasers are just focused light - if you were to burn out a diode you'd end up with an "expensive LED." The light will not be absorbed by anything that reflects the same wavelength, so if you were to try to use blue or purple glasses when working with the laser I used, you would have little to no protection; on the other hand, red or green glasses will absorb most of the light and give better protection. This is also why IR lasers (like the ones many people salvage from CD drives) are more dangerous than visible light beams: you can't see the reflected or emitted light, and if your glasses aren't made to block IR you could be blinded without even knowing what happened. Therefore it's always important to check that the glasses you are using are rated for the specific wavelength of your laser.

Optical Density is another important factor. I believe Wikipedia has a detailed explanation, but basically it indicates how much light energy is absorbed by the glasses. For higher power lasers it's important to have glasses with a higher OD rating so that even if the color is correct, the glasses can still handle the amount of energy in the light.

All things considered the glasses I linked to have worked perfectly for me with the laser I used. They don't allow enough light through to cause afterimages or even any level of physical discomfort, and the laser point is still bright enough to see when wearing them.

Sidenote: If you ever happen to be working with higher-end DPSS lasers, I have read that some output IR light along with their own color of light; e.g., a green DPSS laser might shine in 532 nm as well as IR (uncertain wavelength). Make sure that if you use one of these lasers you have glasses rated to protect against both bands of light.

Step 3: The Lego Frame

The frame is by far the easiest part of this project, being made almost entirely from Legos, most of which are from the Lego Mindstorms sets - both NXT and RCX versions. The only exceptions to this are the gear rack pieces, which I only had 4 of and haven't seen much besides the RCX set. Thus, I printed all 21 of them using this file:

To build the frame, [download Lego Digital Designer and] follow the instructions in the LDD file - I had some trouble fitting the subassemblies together in the program but it's fairly obvious where they go from the pictures. You can access the building guide in the newest version of Lego Digital Designer with the mode button in the top right or with F7 (Command+M on Mac). There appears to be one gear rack piece missing (and I can't figure out where it's missing from) and the mobile track doesn't quite measure correctly in the file (due to bending I believe), but everything fits fine once built. Experienced Lego engineers can probably find some modifications or alternative designs to complete the machine with other parts or improve on it.

Since my 3D Printer doesn't make the highest quality prints I had to Kragle (glue) the printed gear rack bricks onto the track bricks (horrible, I know). Some of them took some finishing to make them fit without popping the others off while being attached or while the armature rolls across it. I also glued some of the bricks in the tracks together to prevent them from coming apart due to balance issues.

The wheel on the back of the mobile track is for counterbalance and to act as a handle for manually moving the armature back and forth - it doesn't necessarily have to be a wheel. The control center also isn't necessary but the kill switch is important wherever you end up putting it.

One thing I forgot until after I took the first picture and finished the LDD drawing is the wheel in the last few pictures. This is to allow the far end of the track to still move despite the weight being put on it; without this subassembly the far end of the track will drag too much to move reliably.

Step 4: Laser Components

Again, this laser has the potential to seriously damage your eyes, so use caution whenever the laser is powered.

Here are the parts I used:

From eBay:

Not from eBay:

  • Standard breadboard
  • Large pushbutton
  • Breadboard wires
  • 9V battery

Altogether the laser components were less than $40 including shipping and not including the breadboard, wires, and a battery from my collection. The laser module itself does act as a heat sink to some degree, but for extended use the larger heat sink may prove more practical.

The glasses I used were sufficient to block the light enough to look at the reflection of the beam, especially when it's unfocused, without any afterimages or eye pain. I bought a 2-pack of these. It's still important to avoid looking directly into the beam, since it's dangerous even with eye protection.

Step 5: Assembling the Laser Module

The laser diode must be secured in the front part of the module to prevent it from overheating; if it's powered up outside the module it will only take a few seconds for it to burn out. This particular diode is a nonstandard size (TO-38), so make sure you use the correct module size (the one I linked to fits perfectly).

Unscrew the black collimator lens holder from the front to avoid damaging it. To insert the diode into the module, I used a pliers to squeeze the edges into the module one side at a time - it does fit rather tight but they are designed to fit together. It is possible to use a vice for this step, but given the size of the diode the pliers method gives you more control and precision.

For the wires I didn't use solder for 3 reasons: primarily, the leads on the diode are quite small and I don't have much experience with soldering. Secondly, according to the listing on eBay, the diode itself is heat sensitive and could be easily damaged by the iron or possibly the solder. Finally, my soldering iron wasn't working properly and I didn't have a chance to get a new one. I ended up using electrical tape for everything, and it worked fine. If you're comfortable with soldering instead, be careful around the diode!

To attach the wires, twist them up as tight as possible then twist them around another lead (like a breadboard wire) to get a loop about as small as the diode leads, then use a pliers to squeeze the loop smaller. Additionally I used electrical tape in layers to separate the two wires to reduce the chances of them uncoiling and shorting.

To make sure the wires stay connected inside the module, I wrapped them in a strip of electrical tape towards the end of the wires so that the back part of the module puts pressure down on the wires when it's screwed down.

Note: Make sure the wires are long enough to reach out the back of the module; I didn't really take this into account until after I finished the module and it made it a bit difficult to attach the driver to these leads.

Step 6: Wiring the Driver and Attaching the Board

For the diode in this Instructable a 9V battery provides about the right amount of power. Wire it directly to the driver with the switch and then connect the driver directly to the leads coming from the laser diode - no other components are necessary. In fact, adding an LED or just about anything else will take away power from the laser and reduce its effectiveness.

As mentioned in the eBay pages, the potentiometer on the driver allows it to output up to 350 mA of current, but the laser can only handle 300 mA. Therefore it is very important to not turn the potentiometer too far. However, the dials apparently are defective in that they can be turned too far and burn out the driver. To prevent this from happening, connect the driver's output leads to a multimeter when adjusting the output and set the output to around 280-290 mA and it will remain fairly constant.

Note: the multimeter I used wouldn't show past 200 mA, so I'm still not sure how much power my laser is getting. What I did is find the spot on the potentiometer where it would be outputting 100 mA, turn it to about 200, then turn it about half again as much further. This put it to about 250 mA.

Also note: The IC on the driver and possibly the transistors will get quite hot when the laser is powered up. I've read that it is not necessary to use a heat sink for the driver, but it wouldn't hurt to have a sink for it just in case.

Once the driver is wired correctly slide the breadboard into the spot shown in the 3rd picture.

Step 7: Attaching and Calibrating the Laser Module

Despite working with Legos for over 10 years I still don't quite have the terminology down perfectly, so I hope this isn't too confusing.

On the subassembly shown, remove the 2 holders from the horizontal pins and slide the pins through the front holes on the heat sink, then reattach the holders. Then attach the flexible piece/substitute to both of the 1x2 plates with 1 stud on top, threading it through the holes in the back of the heat sink. Add the rubber band for extra support in case the flexible piece comes out.

Once the heat sink is secure slide the laser module through the longitudinal hole so that the module extends just past the bottom of the heat sink and black lens holder is accessible. Connect the leads from the back of the module to the corresponding wires from the driver board. The laser is now connected to the circuit. Use caution when working!

In order for the laser to burn an object while moving, the beam's focus must be adjusted to the distance the diode is from the work part. It is still able to burn when the beam is slightly out of focus, but to actually use it properly it should be focused correctly. To do so, while wearing eye protection, twist the lens holder until the beam narrows into as small a dot as you can get. If you're testing it on wood it will probably be smoking a bit at this point. Test that it is sufficiently focused by moving the wood around under the laser and watching for a burn mark of the path the laser takes. If it doesn't burn while moving, adjust it back and forth until you get a better result.

Safety note: Since the laser is almost certainly never focused at the lens holder it is probably relatively safe to twist the lens holder with your fingers while the laser is on. To be on the safe side though, I would recommend only adjusting it while the laser is off and testing it between adjustments, or else using a pliers to twist the holder.

If everything has gone smoothly, you're now finished with the hardware portion of this Instructable!

Step 8: Programming

Unfortunately at this point, I have not been able to find or come up with a way to upload G-Code to the NXT brick, thus each movement of the machine must be programmed manually using the Mindstorms program or another program compatible with NXT. I will be looking for a way to use G-Code in the future, or if anyone knows how to do this please let me know!

Conveniently a quarter turn of the motor under the NXT will move the mobile arm about 3/8 inches under the right circumstances. I state this condition because if the far end of the mobile arm drags too much it can become offset from the other side and the mobile arm will be at an angle. The ratio is about the same for the second axis. Slower speeds help preserve torque and keep the gears on the rack without too much resistance.

The laser is activated by turning the motor attached to the "arm" above the button on the breadboard to the point where it presses it. Whenever you want to turn the laser on in the program, rotate that motor enough so that it tries to go past the button and then hold it there. To turn it off, rotate the opposite direction or (depending on the button and strength of the rubber band) simply power the motor off. An emergency stop is also a useful feature, so include a power off function triggered by the press of the button.

For vertical and horizontal lines program the motors to rotate a corresponding portion of a rotation; for diagonal, rotate both motors at the same time at different speeds. I'm still figuring out how to do circles, but I'm thinking they'll require something like diagonal lines.

Step 9: Improvements and Conclusion

The accuracy of the engraver could possibly be improved by another drive gear and rack on the other side of the mobile arm, although this might require more pieces than included in the two Mindstorms kits. Also a G-Code interpreter for NXT would be a fabulous expansion to this project, and I will hopefully try to come up with something to that effect.

Like I mentioned earlier, this machine does have some issues. It's not terribly sturdy, can be inaccurate and takes awhile to program. But, for anyone interested in lasers, CNC and/or Lego Mindstorms, it's a great project to learn something about and get started with all three of these fields. Plus, it's Legos, which are awesome and easily expandable, so improvements are easy to make.

And that's it! Thanks very much for taking the time to read through this Instructable! I hope everything is clear for everyone building this machine and if you have any questions I'll do my best to answer them!


ninjanody made it! (author)2015-08-24

Lego & lasers. Two of my favorites grouped together.

Maximilian Rainer made it! (author)2015-07-02

I think it is possible to send g-code onto the nxt over bluetooth!

Multimaker made it! (author)2015-06-04

Awesome build! I would love to see video of it in action!

DoItOrDie made it! (author)2015-05-28

If the laser is so dangerous, perhaps it would be good to put some sort of box over it when in operation. Even one made of cloth over a wood frame would be better than nothing.

Baybren made it! (author)Baybren2015-05-29

Excellent point; that would be very useful. I was originally going to include that but I decided against it since I was going for as much Lego construction as possible. Plus, having an open design makes it easier to work with and adjust the machine and work part. As long as everyone in the room has eye protection when it's on, and the laser doesn't shine somewhere it's not supposed to, I wouldn't worry too much.

hijackgmh made it! (author)2015-05-28

Would 200MW be enough to cut thin (1/16") balsa wood?

tempt1 made it! (author)tempt12015-05-28

mW , dude milli Watt. 200 Mega Watt will get you more than balse. lol

Baybren made it! (author)Baybren2015-05-28

If it is, it would probably be a very slow process. I haven't tried cutting much with it yet but it takes some time to burn very deep into wood. It might be possible with 1/16 balsa, but this isn't the most powerful laser when it comes to cutting. I'll try to experiment with some materials and update the Instructable when I've got some results.

tempt1 made it! (author)2015-05-28

A favourite saying I read; "Do not look directly into laser beam with remaining eye"

Just4Fun Media made it! (author)2015-05-27

Very interesting design. How accurate is your NXT? I always found that the motors had a fair amount of play in them.

Have a great day and good luck in your contests!

Baybren made it! (author)Baybren2015-05-28

If the laser armature is closer to the NXT it seems to be a bit more accurate, since there's less moment pulling it off course and less resistance on the motor. The wheel on the opposite rail helps with making sure everything moves properly but it still has some issues with both sides moving at the same rate and distance. The ratio I mentioned in step 8 is fairly consistent, though.

anode505 made it! (author)2015-05-28

Just a note about material reflection: Can't go just by 'color' of beam and material.

The far IR industrial CO2 lasers, copper is HIGHLY reflective in this wavelength. Its typically frowned upon to cut copper. The mirrors are coated copper.

Aluminum is also, but to a lesser amount reflective.

They also cut clear plexiglass/lexan. Ponder that for a second. Its clear, but the light gets absorbed, and not passed through, hence it gets cut.

Raitis made it! (author)2015-05-27

I wish Legos were as cool when I was primarily occupied with them!

codeslayer made it! (author)2015-05-26

Do you think the laser engraver could be also used for cutting thin textiles?

Baybren made it! (author)Baybren2015-05-26

It might be possible on the right materials, but I'm guessing most would be singed a bit if you did manage to cut them.

About This Instructable




Bio: "I work on starships, not alien machines!" ---Isaac Clarke
More by Baybren:Modular Robotic Hand & Arm (With Extended Range of Motion) (3D Printed)Doctor Who Gallifreyan ClockThe Dream Machine or, How to Be More Awake While You Sleep
Add instructable to: