Shop OBEX P1 Docs P2 Docs Learn Events
Simple Stepper Motor controller? — Parallax Forums

Simple Stepper Motor controller?

eagletalontimeagletalontim Posts: 1,399
edited 2011-12-26 20:20 in General Discussion
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!

Comments

  • kwinnkwinn Posts: 8,697
    edited 2011-12-26 10:22
    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.
  • Martin_HMartin_H Posts: 4,051
    edited 2011-12-26 10:45
    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.
  • ercoerco Posts: 20,259
    edited 2011-12-26 17:49
    No telling where it will go, but I need help with the circuitry

    With a stepper or servo, YOU tell it where to go! :)
  • eagletalontimeagletalontim Posts: 1,399
    edited 2011-12-26 17:58
    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.
  • ercoerco Posts: 20,259
    edited 2011-12-26 18:27
    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.
  • Martin_HMartin_H Posts: 4,051
    edited 2011-12-26 20:20
    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:

    http://forums.parallax.com/showthread.php?136319-GM8-Motor-Output-Shaft-Coupling-(Video)&p=1061845#post1061845

    I am really pleased with that driver.
Sign In or Register to comment.