Some time ago I started building an Arduino based laser “scanner”. It’s not truly a scanner, since it doesn’t use galvo motors for mirror movement. I couldn’t get a hold on any of these easily and on the cheap, and since I was itching to get started (this was my first Arduino project, and first more advanced electronics project) I choose to set out for some alternative solution. I picked up some old and used stepper motors from a local electronic supplier. Here’s the first prototype I slapped together. It’s an Arduino Duemilanove, an Adafruit motor shield, and the perfboard thing is a voltage regulator and NPN transistor switch for the laser module.
These were, well, disappointing to say the least. I guess this is why you’d normally use high-speed galvo motors in laser scanners. The steppers only had a resolution of 15º, or 24 steps for a full revolution. You can’t really make a lot of cool stuff with that, and the motors also got unstable at higher speeds. A lot of tweaking in software was needed to get them running smoothly, but ultimately, they would always go out of sync after a while. For the sake of experimentation and learning, I decided to go ahead with the motors anyway to see what I could achieve. With some gearing to get higher resolution, and a lot of fine tuning of timings in software, some pretty cool effects could be achieved.
Pretty nice, but it was quite limited. So I opted for getting some better steppers to see what could be done with them.
After the initial experimentation with the laser setup, I went and got myself a pair of 1.8 degree steppers (able to go down to 0.9 degrees in interleaved operation). These proved to be much more useable for the laser scanner than the previous ones, and a lot faster as well. I also decided to get a proper casing to mount the motors and electronics in, and with a little dremeling, everything fitted nicely.
So here we’ve got basically the same hardware as in the last version, apart from motors. I also added a small fan to keep the motors cool, since they warm up a bit while operating. This setup was a big improvement from the first prototype, and with both mirrors mounted, it was possible to make 2D patterns as well. Much cooler! Here’s a video of the first test of this version. Apologies for jittering camera, we were having a little party.
At this point it still had some pretty significant shortcomings though. Most annoying was the need to start it over serial connection from a computer. Also, the mirrors needed to be positioned manually with each start, since no method of calibrating the mirrors was implemented at this point.
The next logical step in building the Arduino laser was to make it a bit more autonomous, so a computer wouldn’t be necessary to start it every time the need to fire ze lazerz would arise. I added a simple control panel on the front of the assembly to solve this problem.
The control panel can toggle the laser from standby to operational mode, and activate/deactivate automatic running. In auto-mode, patterns and shapes will be randomly cycled to create a nice show.
This version can also automatically calibrate the mirrors. A photovoltaic diode was used to add this functionality. When the laser is powered up and put into operational mode, the mirrors will start running a scanning sequence, pulsing the laser on and reading the voltage from the photo-diode with each step, until the beam is positioned directly on the diode. When this position has been found, the mirrors are moved to project the beam to the exact center of the projection area. If the laser was shut down properly (the y-axis will be centered on proper shutdown), the calibration takes about a second. If the laser can’t calibrate with this first sequence, an extended sequence is activated, which takes a bit longer, but ultimately calibrates the mirrors.
This makes it much easier to operate than the previous versions. Just plug it in to a power outlet, flip the standby switch, and it’s ready to go. Pressing the button on the front toggles auto-mode. Here’s a video of it running in auto-mode.
I’d like to add an internal power supply system in the next version. Some LithiumPolymer batteries would be nice as well so it can run when mains power is not available. Outdoor parties ahoy! (Un)fortunately, it’s way to cold for outdoor parties for a long time still, so there’s plenty of time to get that implemented
The source code is available on GitHub.