Shop OBEX P1 Docs P2 Docs Learn Events
New Stepper Driver Need advice/help — Parallax Forums

New Stepper Driver Need advice/help

mctriviamctrivia Posts: 3,772
edited 2010-09-22 18:19 in Propeller 1
I have written a stepper motor driver since there aren't any for bipolar stepper motors. There are a few bugs in it though that I have not been able to iron out and can't figure out why.

Bugs:
1) when motor is spinning and position control request is set to a position it properly decelerates, and reverses directions but it pauses in steps at one point before decelerating to the correct spot.
2) position seems to wander when using analog input in for speed control.
3) example code should advance 90 deg each time c button is pressed but some times it does 180deg

I am using 4 io lines and a driver IC(A3967SLB)
1) Direction
2) Step
3) Enable(pulled high)
4) Zero (not yet implemented)

the enable pin must be pulled high because I am using it as a semiform to let me sleep the cog until the motor is needed to save power.



Please take a look at my code and make any improvements and suggestions. I will be adding to the obex once it is bug free.



test.spin and "stepper driver.spin" are the files I wrote.
Sign In or Register to comment.