View Full Version : Simple Stepper Motor controller?
12-26-2011, 12:56 AM
I have a stepper motor from an Oki printer that is rated at 7.2V and 12.9 ohms. I am wanting to simply spin the motor with an SX28. There are 4 leads on it so I have plenty of pins on the SX to do other things with it as well. No telling where it will go, but I need help with the circuitry and possibly some simple code to run the stepper. I am bad with interrupts so any advice is helpful!
12-26-2011, 05:22 PM
That sounds like a bipolar stepper motor. There are many chips available for driving stepper motors, and you need to select one based on the motor you have. Not sure what is available for the SX in the way of stepper motor drivers, but there are several drivers in the OBEX ( http://obex.parallax.com/objects/category/7/ ) that can be used as examples to help with writing your own driver for the SX if that is necessary.
12-26-2011, 05:45 PM
I also pulled some stepper motors out of some old printers. I am using the Pololu a4988 and it should seems to be working. You can also use an L298, but then you will need to manually switch the current through the coils.
Have you identified the leads yet? You have two coils forming coils 1 and 2, and using a DMM you can find which leads go to coils 1 and 2. I think you can just call one coil's leads a and b, but figuring out coil 2's a and b is something I am not sure of.
No telling where it will go, but I need help with the circuitry
With a stepper or servo, YOU tell it where to go! :)
12-27-2011, 12:58 AM
I have identified the leads and have found a site that explains the steps on polarity on the lead. Problem is, I have no way to reverse the polarity on the poles when they need to be. Not sure what to use there.
PJ had a neat thread on steppers at http://forums.parallax.com/showthread.php?131553-Stepper-Motoring-With-The-Propeller&highlight=stepper+motor
If you need to reverse polarity, you'll likely need H-bridges.
12-27-2011, 03:20 AM
PJ's thread is helpful for a unipolar stepper, but four leads usually means bipolar and his technique won't work with them. I have found a few four lead motors with a central tap that was unused, and it looked possible to convert it to unipolar operation.
BTW this thread has a video of a stepper being driven by the Pololu driver I mentioned:
I am really pleased with that driver.