Welcome to Laser Pointer Forums - discuss green laser pointers, blue laser pointers, and all types of lasers

LPF Donation via Stripe | LPF Donation - Other Methods

Links below open in new window

ArcticMyst Security by Avery

DIY Stepper based XY Scanner/Projector

Joined
Dec 11, 2011
Messages
4,364
Points
83
Hey everyone!

I've recently begun work on a project I had the parts for for quite some time, but never got started on. I salvaged this XY stepper head from a cheap chinese "laser show" which had no programmable inputs and a nonfunctional "auto sound" mode that would only repeat the same three patterns over and over again. The laser that was built into it had its pump diode die a thermal death a long time ago so I shleved it and planned on modifying it eventually.

I decided to look into stepper motors and their control schemes and found that it would be rather simple to code the subroutines for single axis movements on an arduino. Once I realized this, it was time to start work.

Now, steppers aren't particularly fast or accurate, especially at the upper limits of their speed, as they start to miss steps. I can get these cheap ones to about 3.5mS/step and no further without losing steps, but that's good enough for me.

Instead of driving the motors with an intermediary IC designed for stepper control I decided to just go discrete electronics with NPN bipolar transistors and small signal fast diodes for flyback recovery. I'm only driving one coil at a time since I don't have the pinout for the motor coils and it is a 5pin unipolar motor with common ground. It doesn't appear that it is two center tapped coils with common CT., but rather it looks to be four individual coils with tied ends. I know there are ICs that can use the two center tapped coils in a bipolar drive method to allow microstepping and such but I don't think that is possible with these steppers. The reason for the NPN BJTs is that the arduino can only sink or source 40mA maximum per I/O line and these steppers draw about 90mA @ 9V (and they're 12V steppers, but run down to 5V min).


DIY Stepper Motor XY Laser Scanner Controller - YouTube

I'm planning on working on this more today or tomorrow, so expect updates. All that is left is to do the X axis prototyping and finish the coding.
 





Joined
Apr 2, 2009
Messages
10,662
Points
113
Subbing w/ great interest-
I have a bunch of steppers- one controller and one controller kit-
I can post a bunch of pics in a new 'my albums' and for cost to ship they are free(CONUS only sry)

+5 for the OP

hak
 
Joined
Dec 11, 2011
Messages
4,364
Points
83
Thanks, Hak!

I've always wanted a projector, a real nice fast galvo RGB one.. but my wallet cries whenever I even dream of it. Plus I'm not the most artistic so I'm not sure how good I would be at making laser shows. I tend to get bored of abstract ones, so easy stuff goes right out the window for me lol.

UPDATE:
-Finished the X axis controller prototyping.
-Adjusted the base currents to keep the arduino happy.
-Wrote another >30+ subroutines.
-Debugged some code that made my eyes bleed.
-Got a simple square of the largest usable steps (16x16) and fine tuned the OnTime Pulse Width to minimize flicker.


https://www.youtube.com/watch?v=82xoPZgh8XI
 
Joined
Apr 2, 2009
Messages
10,662
Points
113
yeah^^

I try to think of them as three lasers- & cost of same as handhelds- but with no R&D cycle
Used parts can be found - lots at LEMs- tomorrow I go to AixiZ Laser in houston to see two brands of galvo scanners they are about to list ---One at least I am told is 35K AND AixiZ has a rep of finding the best of the lower cost stuff- and they went in person to China to get these-

so for not really that much money yopu can build on a Al plate a 7 color PJ- then get a soft like QS or LSX and you are most of the way hooked ....er I mean there.

I really like the matching RGBV 12V ttl labbies AixiZ now has- small footprint-
stackable drivers-or you can mount them on thier sides-

I picjked up the `180mW 635 and it steady peaked at 230mW and looked like .5 W of 650 in brightness- nice beam profile too.

Any forum member can choose 3 or more of these & I can get those CONUS free shipping-
aixiz.com

OR spend $195 and get the 7 color aixiz rgb mini SD card projector 'new item for july'
 
Joined
Jul 27, 2007
Messages
3,642
Points
63
I messed around with this a few years ago.

Unfortunately even with 200 step/rev motors, you will quickly run out of interesting things to do with the very small grid of possible beam positions. You should probably look into getting some drivers with microstepping. This should give you 256x more beam locations with 16x microstepping on a 10x10 grid. Heck at that point you can do reasonable text. (assuming they can go fast enough that is) You may also want to consider factoring in acceleration of the rotor. Steppers can go a lot faster when you compensate for rotor inertia.

Check these guys out: 1pcs A4988 Stepper Driver Module Polulu Compatible for RepRap Prusa Mendel | eBay

They're breadboard friendly, made popular from use in the reprap 3d printer project
 
Last edited:
Joined
Dec 11, 2011
Messages
4,364
Points
83
That little board looks interesting. I was actually looking at commercial stepper driver/controller units last night. With a simple single pulse to move a step and TTL for direction they look WAY simpler to program for. Incredibly so.

The way I'm doing it now I'm literally doing both the design programming and replicating the hardware and firmware functions of a typical stepper controller/driver via software on the arduino.

The code looks like this:
start Pulse coil 1
pulse width delay
stop pulse coil 1
pulse width delay
start Pulse coil 2
pulse width delay
stop pulse coil 2
pulse width delay

That's for a single step forward. A single step backwards is the same but with reversed coil numbers. To bridge between sections in a design I have to look at the last coil used by the previous segment and then manually match it to the next segment by adding/removing steps.

I'm not really planning on doing anything with this, it is more of a proof of concept and thought exercise. I'm planning on finishing the subroutine coding and programming in one somewhat complex pattern, perhaps a spiral or cross-hash. I wish I could do diagonals or blanking but I can't do two simultaneous actions and I don't have a suitable laser module for it.

If I had a budget to spend on this I would order two single axis controller/drivers and write a whole new program to control them. I'd also order parts for a TTL module (probably DIY it entirely) and implement blanking, at least in such a way as I could not illuminate the transitions from one design to another, as I still wouldn't be able to do simultaneous effects on an arduino. For that much investment it's probably more worth my time and money to get something like what Hak mentioned.


UPDATE:

Project finished and subsequently abandoned.


http://youtu.be/DCWS0BkniLI

Full write up available on my blog:
www.SigurthrEnterprises.blogspot.com
 
Last edited:




Top