3D Printed Laser XY Scanner - Draw, Cut, Engrave, or Scan




About: Thing Engineer

Laser XY Scanner is an open source stepper motor based scanner. The components used are low cost and very accessible. This type of laser scanner is not extremely fast and has a fairly low resolution, especially with this driver, but it can still be used in a variety of applications. Draw, cut and or point with laser X and Y control.

There are many types but the traditional laser scanner is made with mirror galvanometers. These are very expensive and require even more expensive and complex controllers. You can think of them as high-speed servos. This XY Scanset in the photo above is currently $300+ and that does NOT include the controller.

This laser scanner is much simpler and slower but depending on your application it can still be very suitable. The simple 3D printed mount brings all these low-cost part together into something you can experiment with.

Happy lasering!

Step 1: Gather Your Components

Laser XY Scanner - BOM

I usually like to source my parts from DigiKey, but the low-cost options on Amazon are hard to beat sometimes. This list is just one of many sources for each component in the BOM. There are of course higher quality parts to choose from, but I am aiming for the lowest cost providing the required function here.

Other Supplies:

  • Paint Stripper, the stronger and faster the better.
  • Glue or Contact Cement for the glass to metal & plastic to metal bonds.
  • A 12 volt DC power supply.
  • A small screwdriver to adjust potentiometers.
  • Soldering iron and small hand tools if your Arduino does not have its headers pre-soldered.
  • ---SAFETY--- If you are using a high power laser, then you will need REAL laser goggles. If they are less than $20, they probably aren’t real. Don't fry your eyes. You only get two of them.

Step 2: Print the Scanner Base

You can find the .STL file for the base on the Thingiverse project page here: https://www.thingiverse.com/thing:2710048

The Sketchup file is also there in case you want to modify it.

I printed mine at 0.3mm layer height with PLA. It was sturdy and worked great for experimenting.

Step 3: Assembly the Laser and Heatsink

  • Slide the laser module into the heatsink.
  • Make sure the set screw is good and snug, this ensure good thermal contact between the laser and heatsink bodies.

You could go a step further and add some heatsink compound if you plan on running your laser for long periods at high power levels.

Step 4: Mount Laser Assembly

Using two small hex head screws and nuts attach the laser assembly to the scanner base facing the direction shown. The laser power wires will exit out the back.

Step 5: Mount Stepper Motors

Using four small hex head screws and nuts attach each stepper motor to the scanner base facing the direction shown. Pay close attention to the position of the stepper motor shaft. The X stepper shaft should be closest to the laser and the Y stepper shaft should be on the top.

Step 6: Mount Home/Minimum Switches

Using the glue of your choice attache the X and Y home/minimum lever switches to the locations shown. Note that you want the face of the lever to be nearly parallel with the mirror when the mirror is near that position. There is no right or wrong position, but this location sets a good out of bounds minimum or home location.

Install jumper wires on the switches normally open contacts. One on each switch will connect to ground and one to the Arduino input pin.

These switches are necessary because when our code starts up, we need to establish a reference point for all future movement of the stepper motors. Since stepper motors do not have positioning feedback, we will use dead reckoning based on this home location. This method is how your 3D printer "knows" where it's print head is.

Step 7: Prep the Mirrors

The mirrors will work as is but they will work better if we use the back side. But wait the backside is grey and umm, not a mirror. The back side is indeed a mirror. It is just painted grey to protect the delicate metallic coating on the glass. Place the mirrors grey/paint side up in a dish and pour paint thinner on them, enough to cover them completely. Let them sit for long enough that the paint can be washed off with hot water. If you rub them, you will scratch the delicate metal film.

When you shine a laser at an ordinary mirror, it passes through the glass, then reflects off the back surface, then back through the glass again. Each time it passes through the laser is degraded by partial reflection, refraction, and impurities in the glass to name a few. By bouncing the laser off the back surface of the mirror, we get a near perfect reflection with no loss in power or beam divergence.

Once you have a couple of nice looking mirrors glue them to the flat side of the stepper motor shaft.


Instructables user e.ma.niak pointed out this excellent source for front surface mirrors: https://www.surplusshed.com/pages/item/L10754.html This is a great option, and I would say even preferred if you don't want to mess with paint stripper.

Step 8: Wire the Laser Driver

  • Hook your laser module up to the terminals marked for laser output.
  • Install two jumper wires for the 12 input so we can send power to the driver later.
  • The TTL control is optional and can be used for turning the laser on and off without interrupting the driver's power limiting features. This allows for very fast on/off switching, useful for scan type engraving or drawing graphics.

Step 9: Wire the Stepper Motor Drivers

  • Plug each stepper motor into a driver board to the corresponding jack.
  • Install power wire jumpers on each driver board
  • Install four jumpers on each board to IN1, IN2, IN3, & IN4. These are the ULN2003 control inputs that will go to the Arduino output pins.

Step 10: Wiring It All Together

  • Install the Arduino on the breadboard (if you are using that type).
  • Connect the 5V and GND pins on the Arduino to the breadboard + and - bus.
  • Connect the home switch commons to the breadboard ground/negative bus.
  • Connect the X stepper motor home switch to the Arduino digital pin 10.
  • Connect the Y stepper motor home switch to the Arduino digital pin 11.
  • Connect the stepper motor driver board power jumpers to the breadboard bus.
  • Connect the stepper motor driver board control jumpers to the Arduino like this:
    • X Driver Board
      • IN1 > D2
      • IN2 > D3
      • IN3 > D4
      • IN4 > D5
    • Y Driver Board
      • IN1 > D6
      • IN2 > D7
      • IN3 > D8
      • IN4 > D9

Step 11: Prep the Laser Driver

Lasers diodes are very sensitive. I won't go into the specifics here. There are plenty of resources on that topic that you can google. But I will show you how to correctly setup your laser driver.

Our M140 laser diode has a forward voltage around 5 volts which means the output voltage of our driver needs to be at a minimum, slightly above this. It also has an absolute maximum current draw of about 1.8 amps.

To set up the driver I used a dummy load made from a Darlington transistor mounted on a heatsink, a resistor, and an LED as seen in the photo. If you can do this, I recommend it to ensure you do not blow your laser diode before it emits a single photon.

  • Turn the blue potentiometer counter-clockwise until it clicks.
  • Set the low profile potentiometer to the position shown in the image.
  • Connect the dummy load to the laser driver output.
  • Connect a voltmeter to the laser driver output.
  • Connect a variable power supply with current readout or use an inline amp meter.
  • Set the power supply to 12 volts with a maximum of around 1 amp.
  • Slowly turn the blue potentiometer clockwise until the current begins to rise.
  • Watch the voltage and be sure it stays between 5-6 volts as you sweep the current up near an amp.
  • If your voltage holds as the current raises you can go ahead and lower it to around 0.05-0.1 amp, this is plenty bright enough for testing.
  • You may now connect your laser diode to the driver and test it out.


If you do not have access to the materials to make a dummy load, the meters set it up properly, or just don't wanna...

  • Turn the blue potentiometer counter-clockwise until it clicks.
  • Set the low profile potentiometer to the position shown in the image.
  • Connect the laser diode to the driver board output.
  • When you power the laser driver on, slowly turn the blue potentiometer clockwise to increase the power output level to the diode.
  • Be very careful because if you allow the laser diode to draw too much current or let it get too hot, it will burn out!

Step 12: Program the Arduino

Download the Arduino sketch from the GitHub project repository.


Download and install the stepper motor library. Details are in the sketch.

Double check that your port assignments are correct as they are shown in the sketch.

Step 13: Laser Scanner in Action - Video!

P.S. No sharks were harmed in the making of this Instructable.

Step 14: Trouble Shooting

Stepper Motors

  • One or both of stepper motors are having trouble moving.
    • The 5 volt USB supply may not be supplying enough current. Try powering the stepper motor drivers from an external source.
  • One or both of the stepper motors homes in the wrong direction
    • Try flipping the jumpers from the Arduino to the stepper motor driver board IN1<>IN4 & IN2<>IN3
  • One or both of the stepper motors knocks the home switch off during calibration.
    • Make sure the mirror is pushing the lever in a way that triggers the switch.
    • Make sure the common is hooked to ground/negative, and the normally open contact is connected to the Arduino input pin (D10 & D11).


  • No matter how high I turn up the power the laser only outputs a very dim beam.
    • You probably blew the laser diode. It either got too hot, drew too much current, or both.

  • It was working then just stopped working.
    • You probably blew the laser diode. It either got too hot, drew too much current, or both.

Step 15: Expanding Capabilities (Imaginationz!)

  1. Couple the laser scanner with a camera or other sensor to measure the speed of reflected light. Do some maths and make a stationary 3D scanner.
  2. Similar to the above make a simple lidar implementation for robot obstacle avoidance or environment mapping.
  3. Add a NodeMCU (the entire thing could run off this instead of the Nano) and control your laser scanner remotely.
  4. Add a camera to track objects, say a small indoor drone with a light sensor that shut it down when hit. Once the camera locks onto the drone, it aligns its laser mirrors, aims, and fires at the drone shutting it down.
  5. You can experiment with changing the speed of each axis, the range each axis moves and the looping to create some cool looking effects.
  6. Use a stepper motor with a higher resolution and a micro-stepping driver to increase the overall resolution of the laser scan trace. This, of course, would raise the cost, complexity, and size of the design which was contrary to its original intent.



    • Toys Contest

      Toys Contest
    • Big and Small Contest

      Big and Small Contest
    • First Time Author

      First Time Author

    25 Discussions


    26 days ago

    I have lots of the small mirrors if anyone needs them contact me!


    4 months ago

    i want to use this with grbl to make laser 3D printer is there away to do that ? i need help please

    4 replies

    Reply 4 months ago

    Hey Mostafa,

    Yes, it would be possible to write a gcode interpreter for this rig but I have not done so yet. A grbl fork to move the steppers with gcode could be a future project but it's resolution would be very limited with these drivers/steppers. Still it is completely doable if you wanted to keep it in the "super low cost" category. Otherwise I would swap to more standard stepper drives and at least a 200 step/1.8 degree stepper motor. I would also recommend designing a better setup for the home switches or use some other method besides the switches hot glued to the steppers as I did in this example.


    Reply 4 months ago

    the problem with marlin they dont say any info about hardware or how to connect or anything other than the software please check it and if you could help i would be super happy


    Reply 4 months ago

    well i have nema 23 around 3 nm torque and leadshine drivers , so i dont think those would be problem to me


    12 months ago

    Nice instructable. Using stepper motors has it downs tho, they are slow and the resolition is small. Have you considerred using galvos?

    5 replies

    Reply 12 months ago

    Thank you! Yes, they are slow and this stepper motor with this driver, in particular, has a low resolution. I talk about that fact in the instructable. I also open up talking about the high cost of traditional galvanometers. It's true that stepper motor laser XY scanners have been done before and they aren't that great, but they can serve a purpose depending on your application. I just wanted to put together something that was a bit more step by step and included everything you needed to make it happen.

    I am looking at building a low-cost encoder or resolver of some type and controller for this and writing an instructable about how to make your own "real" galvanometer. I have a few of these, and they work great, but they are bare bones, no feedback sensors at all and no controller.

    Reply 11 months ago

    I also wanted to post this link, which was referenced off my earlier link on DIY galvos:


    It's pretty much the best work I've seen - approaching that of pro-level manufactured galvos. Whether something like that can be simplified or somehow distilled into an instructable is debatable, as the level of fabrication expertise needed is pretty high.


    Reply 11 months ago

    Thank you for sharing those impressive project examples! They have been at the top of my galvo bookmark list for some years now. I do indeed believe that much of this process can now be simplified. Many things help make this a possibility. Such as the availability of better processing platforms, continued improvement of sensing hardware and techniques, and as open source projects like openlase. I have another project I'm working on that takes precedence at the moment, but I will continue work on realizing precisely this. There are many parts of the galvo/sensor/amplifier schema can be handled in software or firmware to significantly reducing external component count and complexity. So this isn't an if, it's a when!

    Stuffing another laser into a module I'm 3D printing a small water-cooled jacket for. This is the one I'll be using for testing at low power, then eventually higher power with the water cooling in the above "part 2" project. Although I don't think it will actually be a part 2 since it is its own thing.


    Reply 11 months ago

    Alternative could be the use of steppers with pololu drivers. You could get a better resolution with microstepping and it's cheper than those galvos. For my projects i use pololus capable of 1/16 step, and i think the make now 1/32.


    Reply 11 months ago

    This is one of the better write-ups on DIY'ing a laser galvo:


    Google "DIY laser galvo" and similar, and you can find more out there. In short, it isn't easy to build one, at least to gain the high-speeds needed for animation and graphics reproduction. The difficult part is the high-speed servoing and sensing of position.

    The two main ways this is accomplished in a "homebrew" manner tend to be capacitive sensing using a capacitive quadrant encoder, or optically, using a gradient optical disc (which can be made via printing a radial grey scale on overhead transparency plastic in a printer), plus a photo-transistor or similar.

    To gain the high speeds, your galvo needs to have as little mass as possible; a coreless winding is best. You'll also need dampening, similar to the galvos in analog meters which use small springs. Plus low friction bearings. Then the driver circuitry, of course...

    It gets difficult really quickly, which you'll notice as you read about similar serious DIY efforts like the write-up link above.


    11 months ago

    Here's a source for inexpensive good-quality front-surface mirrors, so you don't need to mess around with paint stripper etc.:


    Surplus Shed has lots of great mechanical, optical, and electronic pieces and parts. I'm not affiliated, just a happy customer.

    1 reply

    Reply 11 months ago

    Oh wow, those are great! I had looked a little but did not find anything even remotely "low cost". I'll add this to the project as a suggested alternative, or really the way I have listed should be the alternative to this! Great find!


    Reply 11 months ago

    Ha, that is pretty funky looking. It's just a lens flare and/or ghosting from the very bright laser spot. You can see the same thing if you point your phone camera at the sun but not directly, just slightly off angle/focal point. If I would have had the focal point centered and at a camera plane parallel to the plane the laser spot was on they would have lined up and you wouldn't see this.

    It probably raises the questions like, is that stray laser light sneaking around?! Well it's not, it's just the lens artifact. Good eye though! ;)


    11 months ago

    I love this instructable! It will be very interesting to make a controller, like a grbl fork to move the galvo with gcode.
    There are a lot of plugin and OpenSource software to convert text or images in gcode

    1 reply

    Reply 11 months ago

    Thank you! Exactly, that would be really cool. Even though it's not super fast or extremely high resolution it could be used as low cost a low-cost laser cutter/etcher. Run it on an ESP8266 then drop it anywhere!


    11 months ago

    I drove the voice coil from a speaker output from my stereo. It probably would have been better if I had used an impedance matching transformer, but I was careful not to overdrive the amp.

    1 reply

    Reply 11 months ago

    Nice! I like the random effects.

    Great song too, Lindsey Stirling can tear up some violin!