Stepper Motor Control
From Wiki
Simple Bipolar Stepper Motor Control
NOTE: This is a fairly old article from ~2003, but still contains some useful links
I went to Weird Stuff Wherehouse on Saturday and picked up a bunch of stuff. Namely, 3 old IBM Tandon 5.25" floppy disk drives, and 3 used 4x24 LCD displays. I'm pretty sure the LCD's are the ones that can connect to the AVR. More on that later. Took apart the disk drives and got the stepper motors out.
Went to Fry's Electronics, and bought a few ULN2003 chips to drive the stepper motors, as well as some other soldering tools.
Here are the resources on the web I used to start buildng:
- The directions I followed, as well as circuit diagrams.
- Ian Harries Stepper Motor Page.
- Tomi Engdahl's: "How to use disk drive stepper motors"
- Towanda L. Malone's: "Interfacing a junk 5.25" Drive with a parallel port"
So, I built a board with 2 ULN2003 chips hooked up to the 8 data pins of the parallel port interface. I wrote/copied the software to run the motors under Windows, and learned how much Windows sucks.
Why windows sucks for stepper motor control:
- No microsecond accurate time functions. (i.e. gettimeofday())
- No usleep() function.
- No priority control.
- No realtime O/S control.
But, nonetheless, IT WORKED. I can't stress this more. It really friggin worked. I have simultaneous dual-axis stepper motor control. My friend Jeff used his lathe to build some pulleys that we hooked up from the stepper motors to the control knobs of an Etch-A-Sketch and I wrote some software to draw pictures. Did I say it worked? It worked! This is the first successful electronics and mechanical project I've ever done. What an inspiration! Pictures will be forthcoming. Total cost?
Weird Stuff: $30 (Drives, $5 each, plus misc other stuff) Fry's Electronics: $30 (ULN2003, cables, connectors, soldering tools, etc.) Radio Shack: $5 (board to solder all the stuff to) True Value Hardware: $5 (belts and o-rings for pulleys) Toys-R-Us: $10 (Etch-A-Sketch)
Total: $80 and two full days work.
Future work:
Linux source code and "turtle graphics" routines for "EAS Robot." (EAS=Etch-A-Sketch) Connecting the stepper motor controller to an Atmel AVR instead of to the parallel port.
further reading
- Pminmo wiki discusses stepper motors
- RepRap wiki has a stepper controller card
