Help driving motors
beye6976
Posts: 2
I am a Mechanical Engineering student who has recently undertaken an EE's problem. I am using a basic stamp II board of education to try and drive two applied motion step motors. I need to run one motor out a distance, run the other out and back in, and finally return the original motor to its starting point. I am able to run the motors in one direction using the example program:
' {$STAMP BS2}
' {$PBASIC 2.5}
counter VAR Word
DEBUG "Counterclockwise 10 o'clock", CR
FOR counter = 1 TO 2500
PULSOUT 14, 200
PAUSE 20
NEXT
DEBUG "Clockwise 2 o'clock", CR
FOR counter = 1 TO 2500
PULSOUT 14, 200
PAUSE 20
NEXT
DEBUG "All done."
END
But I can not get the motors to toggle and run in the opposite direction. I have tried using the HIGH/LOW command but have had no result. Could this be the result on not powering the BOE with the same supply as the motors. Any help with this would be great.
Post Edited By Moderator (Chris Savage (Parallax)) : 4/18/2007 9:23:25 PM GMT
' {$STAMP BS2}
' {$PBASIC 2.5}
counter VAR Word
DEBUG "Counterclockwise 10 o'clock", CR
FOR counter = 1 TO 2500
PULSOUT 14, 200
PAUSE 20
NEXT
DEBUG "Clockwise 2 o'clock", CR
FOR counter = 1 TO 2500
PULSOUT 14, 200
PAUSE 20
NEXT
DEBUG "All done."
END
But I can not get the motors to toggle and run in the opposite direction. I have tried using the HIGH/LOW command but have had no result. Could this be the result on not powering the BOE with the same supply as the motors. Any help with this would be great.
Post Edited By Moderator (Chris Savage (Parallax)) : 4/18/2007 9:23:25 PM GMT
Comments
Most stepper motor drivers have a step and a direction input.· It looks like you have the step input of some kind of driver attached to pin 14.· Somewhere there's a direction signal.· You'll have to find it, find out how it's controlled, and use it to reverse the direction of the motor steps.· Most likely, it's another logic signal like the step signal and could be connected to another Stamp pin, then changed with a HIGH <pin> and LOW <pin> statement.
At some point your stepper motor will run out of torque and will just sit and whine at at you.
Also, if you go to a motor with larger degrees/pulse, a given pulse stream will give you faster rpm.
There are also stand alone controllers which work independent of the Stamp processing speed. You send them a command for distance ,speed and direction and they do the whole job. See the Parallax site under motor controllers.
Cheers,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
·