Arduino Laser Projector + Control App

Introduction: Arduino Laser Projector + Control App

About: I am a 24 years old student from Slovakia currently studying Masters in Computer Science and Engineering (Embedded Systems) in Denmark. In my free time I like working with electronic projects, Arduino, progr...
  • XY - 2 dimensional laser scanning
  • 2x 35mm 0.9° stepper motors - 400 steps/rev
  • Automatic mirror calibration
  • Remote serial control (via bluetooth)
  • Auto mode
  • Remote control app with GUI
  • Open Source


Step 1: Theory

Laser projectors can be divided into two main categories. Either they use a diffraction glass/foil to project a pattern or they have a system which moves laser beam in XY axis directions. The second option usually looks much better because it is possible to program the pattern to be projected. While in the first case, the laser beam is being diffracted and projects a static image, in the second one, the laser still consists of just one beam, that moves very fast. If this movement is fast enough, we perceive it as a pattern because of persistence of vision (POV). This is usually done by having two perpendicular mirrors, each capable of moving the laser beam in one axis. By combining them, it is possible to position the laser beam to the exact location.

For professional applications, galvanometer scanners are usually used. Some of these scanners are capable of doing 60kpps (kilo point per second). That means, they can position the laser beam to 60000 different locations during 1 second. This creates a really smooth projection without the stroboscopic effect. However, they can be really expensive. I have used the stepper motors, which is the cheap, not so fast, alternative.

The laser draws the pattern by orbiting the lines over and over at really high speed. Sometimes there are multiple parts of the pattern that are not connected together. In this example, each letter is separated, however when the laser moves from one letter to another one, it creates an unwanted line. This is solved by a technology called blanking. The whole idea behind is, that the laser is switched of when moving from one, to another pattern. This is done by a high-speed controlling unit, which needs to be synchronized with the scanning system.

Step 2: Obtaining Components

In the list bellow you can find the components I used and the links where I bought them.

    And then some material and tools you can find at home. Hopefully ;)

    • Mirror (the best is a metallic mirror like HDD Platter)
    • Aluminium sheet
    • Snips
    • Hot Glue (or Pattex Repair Express )
    • Wires
    • Pliers
    • Drill (or scissors in my case :D)
    • Box (e.g. Junction Box)

    Step 3: Mounting Steppers

    Aluminium sheet needed to be cut and bent into the proper shape. Then holes were drilled and steppers attached.

    Step 4: Laser Blanking + Mirror Calibration

    Motor Shield has a small prototyping area that was used for two small circuits.

    Laser Blanking

    We want to control our laser with an Arduino. However we need to limit current flowing into the laser and also driving it directly from a digital output pin is not a good idea. My laser module already had a current protection. Thus I've built just a simple circuit where transistor is switching the laser on and off. Base current can be regulated by trimmer and controls the brightness of the laser.

    Mirror Calibration

    Photodiode was placed in the hole in the central axis right above the X-axis stepper. Pull-down resistor circuit was necessary to obtain exact measurements. When calibrating, we are reading values from the photodiode and when the value exceeds a specific value (laser directly shines into it), steppers stop and return to the home position.

    pseudo code for calibration
    // 1step = 0.9° / 400steps = 360° = full rotation
    for (int a=0; a<=400; a++) {
    for (int b=0; b<=400; b++) {
    photodiodeValue = readValue();
    if (photodiodeValue >= photodiodeThreshold) {

    Step 5: Final Assembly

    The whole circuit was put into the plastic junction box and tightened by screws. The whole projector is really portable, just plug the power supply, switch the toggle and we have laser show.

    Step 6: Laser Control App

    The controlling app was made in C# and allows to switch between patterns, adjust the speed and see current actions. It is free to download together with the Arduino code (see Intro).

    Step 7: Video

    2 People Made This Project!


    • Metalworking Contest

      Metalworking Contest
    • Fix It! Contest

      Fix It! Contest
    • Water Contest

      Water Contest

    36 Discussions

    help me please...

    i can't compile to arduino uno..

    i have problem with library

    " AFMotor.h" and


    i have library at arduino but not work...

    what wrong ???

    1 reply

    Yes it is. Or you can use in-built pull-up resistors inside Arduino and modify the code. By the way, please use the "Reply" button so we won't start a new conversation every time.

    Hello. Can i make laser drawing smaller? Maybe problem is in motors, i have very old motors from 5,25 FDD

    Hello again!

    Where i must write microstepping code and steps per revolution?

    You can find all the information here:

    More steps per revolution = smaller single step. You can even use microstepping.

    Both of them to the ground through a pull-down resistor. To switch on, apply 5V.
    Even easier way would be to initialize those pins as INPUT_PULLUP and then just short them to ground as you switch the toggle.

    The problem is pretty self-explanatory. You are missing the AccelStepper/MultiStepper.h library.

    By the way, when you download a library, make sure to put in the the right folder structure, Documents\Arduino\libraries\xxx, where xxx will be the name of the library, and it will directly contain all the necessary files. It is always better to use the libraries folder located in Documents, in case of you will reinstall or update your Arduino IDE. You can always delete the .github folder to remove the warnings.

    1 reply

    Hello. Can you help me? ArduinoIDE says Error compiling for board arduino Mega or Mega 2560. What can i do?

    1 reply

    It can be caused by many things. Try to post here the full error log.

    Yes. As far as I know, motor shield v2 is compatible with Arduino Mega. Basically, it should not be a problem with anything, as far as it is capable of controlling stepper motors and providing modulated output signal for laser blanking. Of course in that case, only the concept of this project should be used, not the exact same code.

    RC 44

    1 year ago

    I`m having a problem with the softare. I`m using windows 10, 64-bit and I click to open the app but it simply doesen`t wanna open. It shows the loading cursor for 4 seconds and stops, with no sign of the app.


    1 reply

    Try to right-click it, go to properties, and if there is an option called "Unblock", then check it and click apply.