5804 and Stepper Motor help
Ceeter
Posts: 4
I have a ucn5804 that I am trying to use with a BS2. I searched google and the forums trying to find some sample code but I can't seem to find any. If someone could point me in the right direction or post some sample code to get me started I would appreciate it. Thanks.
Hardware being used-
29STP5 Unipolar Stepper Motor
UCN5804 Stepper motor driver
Schematic
Hardware being used-
29STP5 Unipolar Stepper Motor
UCN5804 Stepper motor driver
Schematic
Comments
The outputs will advance one sequence
position on the high-to-low transition of the STEP
INPUT pulse.
So I would imagine if you did something as simple as
This should make the motor turn continually (or jerky). If not, try a different pause time for pause 10. more/less
pulsout might be your next way to go if above didn't work.
After reading your data sheet again... I saw this
Minimum Step Input Pulse Width . . . . . . . . . . . . . . . . . . . . . 3.0 μs
So pulsout would work if set right. But the above code should work also.
If all you are doing with your BS2 is generating a pulse for your stepper motor, then you might want to look into other
ways of generating a pulse, ways that don't take up such a valuable microcontroller.
Like using a 555 timer. However if you plan to controll the stepper motor based on other inputs ( sensors or the like, then the BS2 would be a good thing to use.
P.S. ALWAYS make sure if your circuits are connected with a different power supply than your STAMP, that the GROUNDs of each power supply are wired together.
Post Edited (BPM) : 10/27/2005 11:32:46 AM GMT