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

by ThingEngineer in Workshop > Laser Cutting

64223 Views, 310 Favorites, 0 Comments

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

Laser XY Scanner Featured.png
xygalvo.jpg

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!

Gather Your Components

700-00012_sml.jpg
758_sml.jpg
71L-W3dKugL._SL1001_.jpg
71szrRmAsNL._SL1000_.jpg
SS-01GLT, SS-5GLT_sml.jpg
61ufLIyMloL._SL1200_.jpg
61MbTmMxYkL._SL1120_.jpg
51Nqnt01U5L.jpg
71yd9KCG3-L._SL1500_.jpg

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.

Print the Scanner Base

Laser XY Scanner 1.png
Laser XY Scanner 2.png
Laser XY Scanner 3.png

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.

Assembly the Laser and Heatsink

IMG_2996.JPG

  • 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.

Mount Laser Assembly

IMG_2998.JPG

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.

Mount Stepper Motors

IMG_2977.JPG

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.

Mount Home/Minimum Switches

IMG_3003.JPG
IMG_3002.JPG

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.

Prep the Mirrors

IMG_3014.JPG

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.

Update:

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.

Wire the Laser Driver

IMG_3004.JPG

  • 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.

Wire the Stepper Motor Drivers

IMG_3005.JPG
IMG_3006.JPG
  • 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.

Wiring It All Together

Laser XY Scanner.png
IMG_3007.JPG
  • 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

Prep the Laser Driver

laser-driver.jpg
laser-driver-dummy-load.png
IMG_3010.JPG
IMG_3011.JPG
IMG_3012.JPG

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.

TLDR;

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!

Program the Arduino

IMG_3013.JPG
arduino.png

Download the Arduino sketch from the GitHub project repository.

https://github.com/ThingEngineer/Laser-XY-Scanner

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.

Laser Scanner in Action - Video!

3D Printed Laser XY Scanner - Draw, Cut, Engrave, or Scan
IMG_2964.JPG
IMG_2977.JPG
IMG_2976.JPG
IMG_2978.JPG
IMG_2979.JPG
IMG_2980.JPG
IMG_2974.JPG
IMG_2973.JPG

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

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).

Laser

  • 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.

Expanding Capabilities (Imaginationz!)

trig.jpg
  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.