As one one of my first projects with my new Arduino I thought I would try to hook up a stepper motor. I had a few laying around from old computer hardware I had taken apart and now I finally have the resources to hook them up.
I have a couple of bipolar motors, but I started with this unipolar since it requires fewer components to hook up. since I didn’t have a driver chip I used some 3904 transistors to provide more current to the coils.
Each line has an LED to show the sequence of which coils are being activated. There is also a diod on each one to drop the feedback from each coil when it is turned off.
And here’s the video:
I have it running a program that picks a random number of steps and either forward or backwards then moves in that direction. There is a library included with the Arduino software that makes using stepper motors pretty easy once you get them wired up. You can check out more here: http://arduino.cc/en/Reference/Stepper
Update: Here is a better illustration of what’s going on. This is missing the LEDs I added as a visual aid, but it has everything you need to make it work. I’m using 2n3904 NPN transistors and I added some diodes (1n4000 series) to prevent kickback from the motor.
Here is a simple sketch to see if your stepper motor is working: random_stepper2.pde