SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By wperko
#162786
Hi,

I'm using Parallax.com PBASIC and a BS2 based HomeWork Board, an Easy Stepper Motor Driver board and a stepper motor … but although I am able to make the motor turn at different speeds (fast 'n slow stepping) I can't get the motor to reverse direction because PIN 0 on the HomeWork board can't go 5V HIGH ???

I'm using 6VDC 800ma ac adapter to power the BS2, the Easy Stepper Motor Driver and the motor … a Stepper Motor -

These were originally intended for use in ATM machines. New Old Stock.
Diebold Part Number: 49-006172
Dimensions: Shaft: 0.25 x 0.94 in.
Faceplate: 2.22 x 2.22 in. Length without shaft: 2.19 in.
Steps: 200 Holding Torque: 83.3
3.0 V 2.0 A DC
Continuous Duty
80 C Rise Class B
Connector is 2 rows by 6. Pin 1=x, 2=x, 3=BK, 4=W, 5=x, 6=x, 7=BL, 8=Y, 9=Gr, 10=R, 11=x, 12=x

I moved the blue wire to pin 11 so the yellow/green are one winding and the blue/red are the other winding ... there is no apparent connection to the black and white wires ???


There are only four wires for the two motor windings and a black wire and a white wire that don't seem to be connected to anything …


When the BS2 HomeWork Board is not connected to the Easy Stepper Motor Driver PIN 0 will toggle HIGH and LOW as 5V DC and 0V DC ... but when attached to the Easy Stepper Motor Driver PIN 0 HIGH = 2.15V DC ... NOT high enough to toggle the motor direction. I tested motor direction using the 5V DC output on the Easy Stepper Motor Driver to the DIR pin and that does toggle the motor direction with the HomeWork Board driving the Easy Stepper Motor Driver.


Image


' Lines with the ' in front are commented …
' EasyStepperDrive-06.bs2
' PIN 0 - DIR
' PIN 1 - STEP
' PIN 2 - MS1
' PIN 3 - SLP
' PIN 4 - MS2

' {$STAMP BS2}
' {$PBASIC 2.5}

' Declare Variables
i VAR Word

' Main Body
DO
GOSUB forward
PAUSE 300
GOSUB back
PAUSE 300
LOOP

' Subroutines
forward:
DEBUG CR, "forward", CR
FOR i = 1 TO 300
HIGH 0 ' Direction
' HIGH 2 ' MS1 Commented OUT
' HIGH 4 ' MS2 Commented OUT
PULSOUT 1, 1000 ' STEP
PAUSE 5 ' Larger pauses here seem to slow the thing down to near zero movements
NEXT
RETURN

' PIN 0 - DIR
' PIN 1 - STEP
' PIN 2 - MS1
' PIN 3 - SLP
' PIN 4 - MS2

back:
DEBUG CR, "back", CR
FOR i = 1 TO 300
LOW 0 ' Direction
' HIGH 2 ' MS1 Commented OUT
' HIGH 4 ' MS2 Commented OUT
PULSOUT 1, 1000 ' STEP
PAUSE 5 ' Larger pauses here seem to slow the thing down to near zero movements
NEXT
RETURN

END
By EmbeddedMan
#162812
Quick update on this -wperko and I have been corresponding via e-mail about this issue. Looks like there was a partial short on the DIR pin of the EasyDriver, and so the BS couldn't get it to 5V. Another ED solved the problem.

*Brian