Laser Projector

This project started when I saw someone online that had built something similar; a very simple laser projector using stepper motors and a laser pointer controlled through an Arduino. Using cheap stepper motors and drivers this individual was able to project basic shapes onto a wall. I liked the idea but thought it would be very cool to be able to project a clock on the wall so I started prototyping.

Initial prototype

I made the initial prototype using spare stepper motors and an Adafruit motor driver board. Everything on the prototype was held together with hot glue and solder. Although the prototype worked, I could only project a very skewed looking square. After this proof of concept I had more or less abandoned the project, tore down the prototype and moved on.

Rebirth

A few months later in my Introductory Embedded Systems course, we were assigned to make a final project using the TI launchpad microcontroller development board. The project goal was to make a model embedded system using this board. I remembered my mild success with the laser projector and decided to build a much more finished prototype.

Electronics

This time for the motors I used 0.9° stepper motors from a surplus store. They would provide much finer steps than the 1.8° stepper motors I had used previously.
To drive the motors I used the ubiquitous allegro a4988 stepper motor driver due to its low cost and extreme ease of use.
For the laser I just used a 5v laser pointer module found on amazon; this would be easy to power and control using just a MOSFET.
To connect the stepper motor drivers and laser pointer to the MCU as well as add buttons for user input, I laid out a PCB and had it manufactured for me:

PCB schematic
PCB layout
The finished PCB mounted to the projector

The PCB features the two stepper motor drivers, DIP switches to set the step size, buttons for user input and a MOSFET to control the laser pointer.

Hardware

To house everything and provide mounting for the motors, I built a box out of scrap ¼” polycarbonate:

Polycarbonate chasis of the projector
The fully assembled projector

The motors originally had screw threads to be used for linear motion. I cut off these shafts and made mounting adapters for mirrors out of plastic rods.

Software

The software for this project was overall quite simple, but I had to overcome a few challenges. The general idea was that I would store an array of coordinates for the image I wanted to display, then a function would move the motors to each of the coordinates as fast as possible. Moving the motors was trivial; the motor drivers simply have a direction and step pin, which can be toggled every time the motor was to move. The hardest challenge in the software was an algorithm for linear interpolation. I did not realize I needed this until I started to program in images to be displayed. Linear interpolation is required to draw any kind of diagonal, as moving one motor x steps, then the other motor y steps will not create a diagonal. They must be stepped in the correct order. In addition to this there was an interrupt handler for the button inputs, which allows the user to scale and translate the displayed image as well as switch between different images.

In addition to displaying fixed images, I also added a analog clock display. This worked using a timer interrupt with a 1 second period, then some calculations were made to find the correct vectors to draw second, minute and hour hands.

Results

I was able to produce recognizable images of a clock, my school’s initials, my departments initials and my own initials. By tuning the chop current on the motor drivers I was able to minimize “bounce” from the motors stopping. Here are the images I was able to produce:

Images coming soon!