I have been tring to get a stepper motor going from a circuit out of David Lincoln's "Experiments in mechatronics using the picaxe controllers"
The circuit uses an L293d to supply the two coils with 12v
I have made the circuit up exact to the diagram and the code is exactly the same but the stepper just seems to judder, get hot, and not really rotate consistently.
Is there a particular order the four wires from the stepper are meant to go high
heres the code supplied with the schematic
ca (pin 1) and nca (pin 0) are two wires from the same coil and cb (pin 4) and ncb (pin 2) are from the other coil
----------------------------------------------
symbol ca = 1
symbol nca = 0
symbol cB = 4
symbol ncb = 2
symbol delay = 50
symbol counter = b0
Main:
for counter = 1 to 50 'forward
gosub an
gosub ab
gosub nb
gosub nn
next counter
pause 500
for counter = 1 to 50 ' backward
gosub nb
gosub ab
gosub an
gosub nn
next counter
pause 500
goto main
an:
high ca
low nca
low cb
high ncb
pause delay
return
ab:
high ca
low nca
high cb
low ncb
pause delay
return
nb:
low ca
high nca
high cb
low ncb
pause delay
return
nn:
low ca
high nca
low cb
high ncb
pause delay
return
----------------------------------------------
I have tried all the combinations (i think) of an ,ab ,nb ,nn with much the same results
Any help would be appreciated
The circuit uses an L293d to supply the two coils with 12v
I have made the circuit up exact to the diagram and the code is exactly the same but the stepper just seems to judder, get hot, and not really rotate consistently.
Is there a particular order the four wires from the stepper are meant to go high
heres the code supplied with the schematic
ca (pin 1) and nca (pin 0) are two wires from the same coil and cb (pin 4) and ncb (pin 2) are from the other coil
----------------------------------------------
symbol ca = 1
symbol nca = 0
symbol cB = 4
symbol ncb = 2
symbol delay = 50
symbol counter = b0
Main:
for counter = 1 to 50 'forward
gosub an
gosub ab
gosub nb
gosub nn
next counter
pause 500
for counter = 1 to 50 ' backward
gosub nb
gosub ab
gosub an
gosub nn
next counter
pause 500
goto main
an:
high ca
low nca
low cb
high ncb
pause delay
return
ab:
high ca
low nca
high cb
low ncb
pause delay
return
nb:
low ca
high nca
high cb
low ncb
pause delay
return
nn:
low ca
high nca
low cb
high ncb
pause delay
return
----------------------------------------------
I have tried all the combinations (i think) of an ,ab ,nb ,nn with much the same results
Any help would be appreciated