Forum
 
 
 
Home Forum Project Image Album Movie Album Shop
 
      Guide to Building a Homemade XY Scanner

   
Author Project
BoomDog
Wicked Lasers God


Joined: 14 Dec 2005
Projects: 2
Comments: 1
Location: OH, USA
 Posted: 8/20/08, 1:36 AM

Build Your Own Homemade XY Scanner Laser Show

So you want to build your own XY scanner? After testing out multiple techniques and trying to spend as little money as possible, I've come up with a reasonable solution to create a scanner that you can program yourself.

Can I Really Build My Own Scanner?


Well, that's a question you have to ask yourself. This is not an easy project, and requires a lot of patience and a little bit of luck, and even then, not everything is 100% guaranteed. I'll try to help every step of the way, but in order to keep up you need to understand everything I am doing. Please make sure to read everything in this tutorial. Missing even a paragraph, even if it is only a description, can cause drastic problems down the road. If you are interested in more basic effects that can be done much easier, please go to my BYO Basic Laser Effects Project at this site.

This project requires a great deal of soldering, particularly if you order the OEM microprocessor (see supplies below). Also, some metal or plastic fabrication is required for mounting the galvos, which can become very tedious. Programming experience is recommended but is not required if you purchase the student version microprocessor and try a couple of the experiments included in the kit before attempting any galvo integration.

Please read through the procedure before deciding to purchase the supplies and starting this project. If you have any questions, you can PM
me at this site. Please do not send me direct emails.

Part 1. Supplies

Laser of your choice: I am using a 115mw DPSS 532nm (green) laser from http://www.wickedlasers.com for this project. This particular model is no longer available but comparable lasers are for sale there.
(2) Symbol Technologies Scanner Galvo: THIS is the tough one to find. I used galvos from a handheld barcode scanner. More details are below. The rest of the project will be using the pin setup described below; if your galvos are wired differently then please change accordingly. Please DO NOT ASK ME where to find these galvos- their availability changes all the time; use the schematics below as comparison. I don't mind taking a look if you have the schematic of a possible match, but do not ask me to find these for you. Any PMs about possible galvos must have links to the wiring layouts.
Metal/Plastic Angle Bracket or Project Box: I use a Radioshack aluminum project box, but any firm frame with a 90 degree angle will work.
Parallax BASIC Stamp 2 Microcontroller:
~$70* - Student version at Radioshack, comes with manual, software, has starter electronic pieces, and is pre-assembled. There are a ton of variations of the Basic Stamp. Any are generally usable.
~$30* - OEM version at Parallax.com, comes with software and PDF manual, requires soldering
(2) 10 kOhm Digital Potentiometers: One comes with Parallax student pack, but 2 are required. Can be ordered at Mouser.com. If you purchase from somewhere else, please view below to match the schematic.
(2) 2N3906 PNP Transistors: Available at any Radioshack, or online. NPNs can also be used with a little bit of rewiring, if you know how to use them.
(2) 470 Ohm Resistors Available at any Radioshack, or online. Yellow-Violet-Brown
Project or Soldering Circuit Board: Available at any Radioshack, or online.
Various wire, soldering equipment, power adapters as listed, etc. Available at any Radioshack, or online.

*prices and availability subject to change

An In-depth Look: Symbol Technologies Scanner Galvo/Stepper Motor



I chose these because they were very inexpensive and come with pre-mounted front-sided mirrors. These are really called stepper motors. If you are not familiar with stepper motors, now is a good time to look at the included demo-schematic (note this is NOT the schematic we will be using), shown here:



This is a schematic on how to create a laser show that is based only on sound that is inputted through it a.k.a. stereo music. This is an XY Scanner, but you have practically no control over the designs it produces.

Anyway, the important part of this schematic for use here is the layout of the stepper motors, shown on the right side of the drawing. These work after activating two electromagnets inside the motor, and based on the voltage applied through these coils, the mirror will change positions. Only one coil needs to be activated for the galvo to be in a position. In this project, there will be a always-on coil and a variable-voltage coil.

These run off of a 5v supply. I do not recommend running it at neither the 14v max that is suggested in the instructions, nor the 9v that is suggested in the sound schematic above. Mine work just fine under 5v, and these are normally not designed to run greater voltages.

You have 8 poles circling 360 degrees (I don't see why the instructions say there are 10 poles, but then again I am only using 5v). They are:
Pos Pins 1&2 Pins 3&4
1____+5v____+5v
2_____0_____+5v
3____-5v____+5v
4____-5v_____0
5____-5v_____-5v
6_____0_____-5v
7____+5v____-5v
8____+5v_____0
(pardon the formatting; this used to be an html table)

Connecting and changing voltages in this order will rotate the mirror 360 degrees, and will rotate it in the opposite direction if you do it backwards. The position numbers are themselves arbitrary, but do indicate order.

You can get positions between the ones above by varying the voltage from 0-5v, which is how we will control movement.

While using these galvos, you probably don't need to go 360 degrees. In fact, I don't even change the polarity like suggested above because I think the laser moves in its range enough without it. If you feel that you need to do it, you will need to add a voltage swap circuit and have it triggered by your microcontroller, which would make this even more difficult. Please do not ask me how to do this. If you can't figure it out then it's best not to do it.

It is not recommended that these galvos are fed ON-OFF or HIGH-LOW signals constantly. They are designed to use variable voltages that move smoothly up and down. Although these smooth motions happen VERY FAST, using just ON-OFF signals may damage or shorten the life of the galvo, as well as limiting the movement of it.

An In-depth Look: Parallax BASIC Stamp 2 Microcontroller


Basic Stamp 2 Student HomeWork Board (Left) and OEM version (Right)

The microcontroller is the brain of this project. It will send commands to the digital potentiometers, which control the position of the mirrors. Without this, there is no easy way to control the mirrors. Programming the controller to send certain commands at different times causes different effects with an XY scanner.

This was my very first experience with microcontrollers, so there was a slight learning curve for myself, but I have had 5 years of programming experience in C++ and Java. If you have never had experience, this may be a difficult project for you, but you can probably get by after trying a few experiments in the Student version of this microcontroller, as well as analyzing some of the examples provided later in this tutorial. If you have had any experience, programming will not be a concern, as PBasic is a very simple language in comparison to others out there.

I use a 9v 300mA adapter on my board so I do not have to concern myself with a battery. Do not use an adapter if you plan on using the servo that is included in the Student kit (not used in this tutorial) as it will destroy the gearbox inside. Also, be very careful that Vin (+9v) never goes into any of your pins, as this will damage your EEProm (memory).

These have many uses beyond this tutorial, and are very fun and useful. I recommend checking out some of the experiments in the manual, either the book for the Student version, or the PDF file for the OEM version. Make sure your computer has a serial (9-pin) hookup.

An In-depth Look: 10 kOhm Digital Potentiometers

The digital potentiometers (often referred to as digi-pots) receive the digital signal of the microprocessor, and convert it into increments of resistance that are then applied to one of the magnetic coils of the galvos.

Make sure that that if you purchase from places other then the link above, the layout is the same as below. If it is not, you will have to adjust my instructions to fit your IC's. Below is the configuration that I will be using. The digi-pot included in the Parallax Student kit has the same configuration.

You will need one digi-pot per galvo.



Part 2. Construction

After the supplies are gathered, it's time to get building. If you want to see my completed setup, look at the bottom of the page. To make alignment as easy as possible, figure out a way to mount your laser. You may want to do this as a permanent thing, or only temporary, so I won't go into detail. However, I personally glued some acrylic I had laying around in the box so that the laser could sit on it, and cut a little aluminum elbow to help keep it from wobbling around. Anyway, secure your laser first. It will be easier to align your mirrors. Remember which angle the beam needs to come from. Since I wanted to keep my projector compact, I took a front-side mirror I had and mounted it onto an aluminum plate bent 45 degrees, which then aims the beam directly at the galvos.

Also, rig up your laser so you can turn it on and off from outside the box. I used gator clips to attach to the battery spring and casing, and then have those wired directly to a 3v 700mA adapter, and then I tape down the button using packaging tape.

If you purchased the OEM microprocessor, put the kit together now.

Mounting the Galvos

The hardest part about the construction is mounting the galvos in the proper orientation. It is recommended that you follow the template that is provided with the galvos, as follows:



The manufacturer recommended mounting and layout

To be honest, I went through 2 plastic Radioshack project boxes and never got the results I wanted. So, instead, I took the metal that came with the boxes (it's practically sheet aluminum), and cut them into very small elbow pieces that I could screw the galvos straight on. If you look at the back of the mirrors, you will find little set screws. If you have a bit that can remove these, this will make your job a lot easier. I believe they are hex, but I used a 5-point star bit that was just a little too big, and just applied more pressure. Also, it is good to remove the mirrors while working with mounting because they are front-sided, making it easy to scratch or chip off the reflective silver.

I still had some problems with the galvos not being close enough to each other, so I took a Dremel cutter and removed the screw-tabs I wasn't using. The nice thing about this configuration is that you can move the mounts all around the box until you get the position that you want. When you find the position, use a clamp or superglue to keep the mounts in place, and then drill or screw down as you see fit. Personally, I just rely on the superglue. It is a little more delicate, but it is a lot easier to reposition if you find that you have made a mistake or need to make an adjustment to alignment.

Digital to Analog Circuit


My Digital to Analog Circuit

This circuit converts the signals from the microprocessor into variable resistance that changes the voltage that the galvos use. This is nothing but tedious, but if you have had any electrical/soldering experience at all it should be tolerable. Basically, make TWO of these on one circuit board (one for each galvo). The diagram on the right of this drawing is a galvo, and the IC is the digital potentiometer discussed earlier. Inputs P1 and P2 are pins from your microcontroller. For the second circuit you build, place the inputs on 3 instead of 1 and 4 instead 2.


Digital to Analog Circuit Schematic

Quick Explanation about the pins:

P1 (and P3) - Wiper Direction - If this receives a high signal, it will change the direction the resistance wiper towards terminal A1, and will move towards B1 if it receives a low signal.

P2 (and P4) - Clock Pulse - When this receives a pulse, it moves the wiper in the direction indicated by P1/P3

Past that, everything should be self-explanatory. You can use the same 5v supply that is converted from your microcontroller (Vss is GND, Vin is +9v, and Vdd is +5v).

Construction Wrap-up

Now you should have the elementary pieces together. Once you connect everything as shown above, you have all you need to make the show. I wanted to make mine look nice so I mounted the serial port of the processor to the box, as well as a 9v input line to power the processor. Your galvos should run on the 5v supplied by the processor circuitry. I also cut the top so it would fit my laser, and cut a hole in front of the mirrors for an aperture. You may want to approach all of this in a different manner, at your choosing.


My XY Scanner

For a true look inside, watch this video.

Part 3. Programming

PLEASE NOTE: There may be issues with my code- I've had questions about my code that correctly dispute some non-essential issues. I've since lost the copy of the code I had edited to fix these logical errors. Everything in this code works for me, but it may not be perfect.

The BASIC Stamp 2 module uses PBASIC language, which is very easy to learn if you have any programming experience. Even if you do, however, I recommend trying a few experiments first, just so you understand how the processor works.

The following configuration is set up as the schematic was before, with P1 through P4 set up EXACTLY as shown. Any change of this needs to be taken into account. Also, the following is for reference only. If you don't understand what I am doing, try to figure it out, because otherwise you will not be able to troubleshoot in case there are problems. I only open the door, you need to go through it.

Calibration and Testing

The following is a basic layout that should provide a square. There is a calibration call that throws the galvos at their maximums, which is important if you want to get the same results every time. If the mirrors jump positions (so the laser isn't aligned anymore) turn "cycle" down from 32767.

MXHigh should move the laser in the X direction to the right, MYHigh should move the laser in the Y direction up. If they do not, swap your commands. Also, in order for your laser to look right, you may need to raise after-calibration cycle up and down.

' {$STAMP BS2}
' {$PBASIC 2.5}
counter VAR Word
cycle VAR Byte


'Do not change the following lines (Calibration and settings)
'**************************************************************************
cycle=32767
GOSUB calibrate
'**************************************************************************
cycle=70


DO
GOSUB MXHigh
GOSUB MYHigh
GOSUB MXLow
GOSUB MXLow

LOOP

Calibrate:
FOR counter = 0 TO cycle
GOSUB MXHigh
NEXT
FOR counter = 0 TO cycle
GOSUB MXLow
NEXT
FOR counter = 0 TO cycle
GOSUB MYHigh
NEXT
FOR counter = 0 TO cycle
GOSUB MYLow
NEXT
RETURN

MXHigh:
HIGH 1
FOR counter = 1 TO cycle
PULSOUT 2,1
NEXT
RETURN

MXLow:
LOW 1
FOR counter = 1 TO cycle
PULSOUT 2,1
NEXT
RETURN

MYLow:
HIGH 3
FOR counter = 1 TO cycle
PULSOUT 4,1
NEXT
RETURN

MYHigh:
LOW 3
FOR counter = 1 TO cycle
PULSOUT 4,1
NEXT
RETURN


For a copy of my actual code that is executed during the videos on this site, please go to http://www.musicfoxaudio.com/lasers/XYscannercode.html

If you have an understanding of this, you are able to make any designs you want. The galvos are not the greatest so your circles may seem crooked, but that doesn't take away from the fact that this is a great introduction into scanner systems.

Enjoy your scanner!
Rating: 0.00/5.00 [0]

Author Comments
iVO
Phoenix Laser


Joined: 23 Feb 2008
Projects: 0
Comments: 1
Location: USA
 Posted: 8/30/08, 10:29 PM  Post subject: Thanks for doing this!

I've been looking forward to some type of a tutorial involving a lasershow using galvanometers, thanks Boomdog!
Rating: 0.00/5.00 [0]
lauradrop
Annoying As Heck


Joined: 22 Dec 2009
Projects: 0
Comments: 1
 Posted: 12/23/09, 3:45 PM  Post subject: Great forum

Hello Everybody,

I happy to come here. It is a great forum

teen ass
Rating: 0.00/5.00 [0]
marklikeslasers
Elite Laser


Joined: 25 Mar 2006
Projects: 0
Comments: 3
Location: Naperville, Illinois
 Posted: 2/01/10, 4:23 AM  Post subject:

I was looking for a tutorial on this, thanks Boomdog.
Rating: 0.00/5.00 [0]
 

Page 1 of 1
All times are GMT - 5 Hours

Jump to:  
You cannot post projects in this chapter
You cannot edit your projects in this chapter
You cannot delete your projects in this chapter
You cannot rate projects in this chapter
You cannot approve projects in this chapter

You cannot post comments in this chapter
You cannot edit your comments in this chapter
You cannot delete your comments in this chapter
You cannot rate comments in this chapter
You can approve comments in this chapter

You cannot attach files in this chapter
You can download files in this chapter
 
 
 
|Home | Forum | Projects | Images | Videos | Shop | Register | Sitemap |
Copyright @ 2009 Lasercommunity All rights reserved