2-axis mirror controller

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
dodell
Posts: 6
Joined: Tue Jun 10, 2003 1:01 am
Contact:

2-axis mirror controller

Post by dodell »

A couple friends of mine and I are interested in building a controller for 2 stepping motors, which would steer a couple of mirrors for laser lighting effects. Any pointers on kits/parts for this kind of project would be highly appreciated.<p>Thanks,<p>Devon O'Dell
User avatar
Bob Scott
Posts: 1192
Joined: Wed Nov 20, 2002 1:01 am
Location: Vancouver, BC
Contact:

Re: 2-axis mirror controller

Post by Bob Scott »

Devon,<p>You might look into pico motors (piezoelectric) if you are looking for any good beam aim accuracy. At work we use them to align LASERS in our manufactured products (scanning silicon wafers for defects).<p>Here is a link not affiliated with us:
http://www-rfi.fnal.gov/global/technotes/TN/TN035.pdf<p>Bob<p>[ June 10, 2003: Message edited by: Bob Scott ]</p>
-=VA7KOR=- My solar system includes Pluto.
dodell
Posts: 6
Joined: Tue Jun 10, 2003 1:01 am
Contact:

Re: 2-axis mirror controller

Post by dodell »

Bob,<p>Thanks for the link!<p>We're not doing something as precise as scanning wafers; we're trying to build a programmable device to control a couple of mirrors for LASER lighting effects (i.e. parties and dj stuff). <p>We're wondering if there may be lists of parts for this kind of project, perhaps kits, etc.<p>Software development isn't a problem, we're more wondering where we can get the parts for this and if there are any available schematics for the mirror controllers.<p>Thanks again,<p>Devon
User avatar
Chris Smith
Posts: 4325
Joined: Tue Dec 04, 2001 1:01 am
Location: Bieber Ca.

Re: 2-axis mirror controller

Post by Chris Smith »

Don’t forget the small mirror glued to a speaker trick for a good "sound effect to light show". If you place a cheap equalizer to that speaker, you can control the light quite a bit to reflect the sound in different ways. You might find Piezo controlled mirrors easier than servos, as they take a direct voltage input proportionally to their movement. And remember, a thousandth of an inch deflection in a mirror, is a dozen yards wide a deflection at a distance. And remember Front surface mirrors only.
fsdenis
Posts: 90
Joined: Tue Mar 25, 2003 1:01 am
Location: San Manuel, Arizona
Contact:

Re: 2-axis mirror controller

Post by fsdenis »

You might look into radio controlled servos that
go into "toy" cars and airplanes. Available cheaply from Tower Hobbies and others.<p>If you don't want to use a radio for control, It is not hard to design a 555 circuit for local wire
connected control. <p>I haven't yet gotten into the small basic stamp or
similar computers but these would seem a natural for your low precision entertainment application.
grant fair
Posts: 184
Joined: Sun Feb 23, 2003 1:01 am
Location: Toronto
Contact:

Re: 2-axis mirror controller

Post by grant fair »

If you are willing to use an old PC as a controller, then a simple parallel port interface to run up to 3 separate steppers is at:<p>http://www.luberth.com/plotter/ditwasplotter.htm<p>Look on the left for <Schema uln2803> for a version which will give you about 1 amp per phase max for a 5 or 6-wire (unipolar) stepper. Software and the pcb pattern is available free at that site. Along with the right voltage power supply for your steppers, it will power 3 separate steppers.<p>If you need more amps, there is a schematic and pcb layout for a version for the TIP120 further down on the left. It is the same circuit as above except it is a higher current version. I have used this at up to 4 amps, but that required a fan on the TIP120's, (or lots of heat sinking - fans are cheaper).<p>I built the first version for under $10, and the second under $20. They worked fine as soon as I tried them.<p>Grant
Grant
dodell
Posts: 6
Joined: Tue Jun 10, 2003 1:01 am
Contact:

Re: 2-axis mirror controller

Post by dodell »

Grant,<p>Thanks a lot for the schematics. I have a couple of questions about them:<p>1) What is the precision to which they can control these motors - or, if more applicable, <p>2) What is the precision of control regarding the motors they *can* control.<p>This is really great being able to control it via serial; this would allow for really neat dynamic effects capability in the software :) (assuming a certain precision). I'd like to clarify that we are looking for a precise solution.<p>Please forgive my electronic stupidity, I'm the software designer/programmer, not the electrician :) .<p>Thanks for all the help and ideas you guys have given so far.<p>Kind regards,<p>Devon O'Dell
grant fair
Posts: 184
Joined: Sun Feb 23, 2003 1:01 am
Location: Toronto
Contact:

Re: 2-axis mirror controller

Post by grant fair »

Hi Devon-<p>You asked about the precision these boards provide. In fact, precision is a function of the motors themselves, as well as software, to some extent.<p>I understand that on average stepper motors can be out up to 5% for one step. The good news is that the error is not cumulative. Also, apparently some steppers have less error per step, this I believe is due to more careful construction. It is rare in my experience to see this advertised in surplus sources. Stepper motor makers could help more with providing that information.<p>The number of steps a motor will provide is basically set by the motor. Steppers which move .9 degrees per step (400 steps per revolution) are available if you look on the internet. Larger steps are more commonly available. Your software merely is a sequence output to the stepper controller (through the parallel port with these boards). One sequence=one step, 400 of these = one revolution with a .9 deg/step motor.<p>It is possible for these motors to drop a step, since they are operated open loop, that is there is no feedback to the controller to confirm the motor has done as instructed. However, dropping a step(s) usually happens when the motors are driven too fast, or too close to their torque ability. It is possible to add an encoder wheel to a stepper to make it closed loop, some steppers are sold with an encoder included. With the right software you can ensure that steps are not dropped. However I suspect your application will not be prone to losing steps since it sounds relatively low mass.<p>If you are operating the steppers at a high speed then dropped steps can be reduced by accelerating up to speed, that's simple to do in software.<p>Software can result in "half stepping" which I think doubles the number of steps, however I am not sure about that. It can easily be done with these boards. It's simply a matter of a different coil sequence output to the parallel port.<p>Microstepping is another method driving the stepper, but I do not know much about it. I believe it may allow positioning to positions less than a step, others here will know for sure. These boards do not support microstepping. Kits/pcbs for a microstepping unipolar controller are available on the web, let me know if you want details.<p>Good luck,
Grant
Grant
dodell
Posts: 6
Joined: Tue Jun 10, 2003 1:01 am
Contact:

Re: 2-axis mirror controller

Post by dodell »

Our application just needs to let people see that we're drawing something with a LASER and make them think "cool" and dance harder. :) . The electronics guy hasn't worked in this sector before, but it sounds to me like all the problems (or features) are going to be found in the software I've got to write.<p>May you happen to have a URL with information referencing how I might control one of these things to do half stepping (just for the fun of it :) ? Or perhaps also URLs with information about usage of the encoder to ensure that the motor's made it's (semi-)revolution?<p>My friend would be more interested in schematics, I believe, but any information on the subject is greatly appreciated.<p>Sorry to be asking the stupid questions; as I said, I'm not the electronics guy (but it does sound to me like this will be mostly my work ;) . Google is also not very helpful on this subject (or I'm just searching for the wrong thing).<p>Thanks for all your help so far, Grant! Any other information would be deeply appreciated as well.<p>Kind regards,<p>Devon O'Dell
grant fair
Posts: 184
Joined: Sun Feb 23, 2003 1:01 am
Location: Toronto
Contact:

Re: 2-axis mirror controller

Post by grant fair »

Here's some QuickBasic code to half-step a stepper with the controller described previously here:<p>'from <hobby plotter> website animation example
'for 1/2 stepping with 5 or 6 wire unipolar 'steppers
'with Luberth's output card<p>port = &H378
DO
CLS : INPUT "Delay="; d
PRINT : INPUT "Forward <f> or Reverse <r>?"; d$
INPUT "N="; n
FOR i = 1 TO n
IF d$ = "r" THEN GOSUB RStep
IF d$ = "f" THEN GOSUB Fstep
NEXT
LOOP<p>RStep:
OUT (port), 1
FOR j = 1 TO d: NEXT
OUT (port), 3
FOR j = 1 TO d: NEXT
OUT (port), 2
FOR j = 1 TO d: NEXT
OUT (port), 6
FOR j = 1 TO d: NEXT
OUT (port), 4
FOR j = 1 TO d: NEXT
OUT (port), 12
FOR j = 1 TO d: NEXT
OUT (port), 8
FOR j = 1 TO d: NEXT
OUT (port), 9
FOR j = 1 TO d: NEXT
LOCATE 20, 20: PRINT x$
x$ = STR$(i)
RETURN<p>Fstep:
OUT (port), 9
FOR j = 1 TO d: NEXT
OUT (port), 8
FOR j = 1 TO d: NEXT
OUT (port), 12
FOR j = 1 TO d: NEXT
OUT (port), 4
FOR j = 1 TO d: NEXT
OUT (port), 6
FOR j = 1 TO d: NEXT
OUT (port), 2
FOR j = 1 TO d: NEXT
OUT (port), 3
FOR j = 1 TO d: NEXT
OUT (port), 1
FOR j = 1 TO d: NEXT
LOCATE 20, 20: PRINT x$
x$ = STR$(i)
RETURN<p>A copy of QuickBasic is available on the website mentioned in this thread.<p>The delay needed depends on the speed of the computer you are using, the faster the computer the longer the delay needed.<p>The parallel port output sequence for the FStep or RStep subroutine produces 4 steps.<p>Windows can interfere with timing so more reliable timing is available with DOS. And some versions of Windows do not support writing to the parallel port without a DLL (or at all). Look for Jan Axelson's parallel port site; it has lots of good info.<p>For a good overview of steppers Google on "Jones on Steppers". Yahoo has a group where stepper questions are answered, CAD_CAM_EDM_DRO <p>Grant
Grant
dodell
Posts: 6
Joined: Tue Jun 10, 2003 1:01 am
Contact:

Re: 2-axis mirror controller

Post by dodell »

Ah, I'd probably be using Linux to control this thing anyway, so QBasic isn't going to be useful for me. I've done electronics programming though a serial port in C before for a (I think) more difficult project.<p>Thanks for all the information!<p>Kind regards,
Devon
grant fair
Posts: 184
Joined: Sun Feb 23, 2003 1:01 am
Location: Toronto
Contact:

Re: 2-axis mirror controller

Post by grant fair »

Hi Devon - I know nothing about Linux, does it support software talking with the parallel port?
I know there is public domain CNC Linux software, and you are building what is a CNC machine.<p>I thought the QB code would show you what you needed to do, (even if you were using a different OS and language), which is just writing 1's and zeros to the parallel port.<p>I trust you have noted that I am talking about the parallel port, not the serial.<p>The parallel port is most often used with printers, at least until recently. It has 8 data lines out which are writtten to by the above code. <p>Since posting it, I came across some information. The most common drive modes are:<p>- wave drive (1 phase (coil) on for each step) <p>- full step drive (2 phases on) - this is what the QB code above does, I think)<p>- half step drive (1 & 2 phases on)<p>- Microstepping (continuously varying coil currents)<p>The controller board is essentially 4 transistors per stepper. Each transistor acts as a switch. You turn each transistor on or off in various sequence, for wave, full step, and half step, with the parallel port driving the transistors.<p>EXCITATION SEQUENCES FOR DIFFERENT DRIVE MODES<p> NORMAL
WAVE FULL STEP HALF-STEP
Phase 1 2 3 4 1 2 3 4 1 2 3 4 5 6 7 8<p>A * * * * * *<p>B * * * * * *
_
A * * * * * *
_
B * * * * * * <p>Does that help?<p>Grant
Grant
grant fair
Posts: 184
Joined: Sun Feb 23, 2003 1:01 am
Location: Toronto
Contact:

Re: 2-axis mirror controller

Post by grant fair »

Oops - all my careful ascii positioning got lost in the translation.<p>Grant
Grant
grant fair
Posts: 184
Joined: Sun Feb 23, 2003 1:01 am
Location: Toronto
Contact:

Re: 2-axis mirror controller

Post by grant fair »

To see what the chart really looks like, go to:<p>www.solarbotics.net/library/pdflib/pdf/motorbas.pdf<p>The chart is on page 4.<p>Grant
Grant
grant fair
Posts: 184
Joined: Sun Feb 23, 2003 1:01 am
Location: Toronto
Contact:

Re: 2-axis mirror controller

Post by grant fair »

Do a search on Peter Anderson and parallel port. He has an excellent and inexpensive book on programming it with C.<p>Grant
Grant
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 30 guests