stepper motor
bea
Posts: 9
I connected a stepper motor to a basic stamp II and·· a ULN 2803 and ran a example program from parallax to make the motor move, but nothing happen.· Can any help me in maybe giving me suggestions in what I can be doing wrong.· Thanks
Comments
·· Details are a little vague.· You didn't say which wires were connected where or how you connected the ULN to the BASIC Stamp.· What power supply is running the Stepper Motor?· How about the BASIC Stamp?· Can you post your code?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
I connected the motor in pins 18,17,16, and 15 of the ULN2803 and the ULN2803 to pins 4, 5, 6, and 7 of the Basic Stamp II.· The power supply was 12volts.
this was the program I tried
' {$STAMP BS2}
' {$PBASIC 2.5}
Phase VAR OUTB ' phase control outputs
StpsPerRev CON 48 ' whole steps per rev
idx VAR Byte ' loop counter
stpIdx VAR Nib ' step pointer
stpDelay VAR Byte ' delay for speed control
Steps DATA %0011, %0110, %1100, %1001
Setup:
DIRB = %1111 ' make P4..P7 outputs
stpDelay = 15 ' set step delay
Main:
FOR idx = 1 TO StpsPerRev ' one revolution
GOSUB Step_Fwd ' rotate clockwise
NEXT
PAUSE 500 ' wait 1/2 second
FOR idx = 1 TO StpsPerRev ' one revolution
GOSUB Step_Rev ' rotate counter-clockwise
NEXT
PAUSE 500 ' wait 1/2 second
GOTO Main
END
Step_Fwd:
stpIdx = stpIdx + 1 // 4 ' point to next step
GOTO Do_Step
Step_Rev:
stpIdx = stpIdx + 3 // 4 ' point to previous step
GOTO Do_Step
Do_Step:
READ (Steps + stpIdx), Phase ' output new phase data
PAUSE stpDelay ' pause between steps
RETURN
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Black to pin 18 of ULN2803
orange to pin 17 of ULN 2803
brown to pin 16 of ULN 2803
yellow to pin 15 of ULN 2803
red to the 12 volts
I don't think·I connected the 12 volts to the ULN 2803.· Is that how much I need to connect to the ULN 2803.·
What about the program was that correct and what about the way I connected it to the Basic stamp II.
Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
·· The +12V common (Red wire) would connect to PIN 10 on the ULN 2803 as well as the +12V supply.· Pin 9 of the ULN2803 must be connected to the Vss on the BOE (Yes, you can use it).· P4-P7 should be connected to Pins 1 through 4 on the ULN2803.· I haven't tested the code, but it look s like the demo code, so it should work.· What exactly is happening?· Is the Stepper Motor doing anything?· Humming?· Is the ULN2803 getting warm?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Post Edited (Chris Savage (Parallax)) : 10/10/2005 5:29:09 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com