#Picaxe 08m2
'Stepper motor driver test
'Boris Burke May 2012
setfreq m8
dirs=%00010111
do
b1=b1+2 max 3//3 'b1 is direction control, 2=CW 0=CCW
for w1=1 to 2060 'seems to be about the right number of steps for 360 degrees
b0=b0+b1-1//4 'b0 cycles from 0 to 3 for CW and from 3 to 0 for CCW
lookup b0,(%00011,%00110,%10100,%10001),pinsC
pause 1
next w1
pause 4000
loop
I've had a couple for several months and they are fine - takes about 3-weeks to arrive in UK
Ditto - I have used BuyInCoins about 8 times - everything fine for meNever had a problem with them....remember the negative feedback represents only 0.8% of sales
steps:Toggle 1 ; Toggle pin 1
pause 200 ; Wait 200 ms
toggle 2 ; Toggle pin 2
pause 200 ; Wait 200ms
goto steps ; Loop
[code/]
Nothing moves, but I can see current pulsing on my PSU, so something is alive somewhere, but where?
#picaxe 14M2
; B.1 Blk B.2 Brn B.3 Yel B.4 Ora
; Red to V+
DirsB = %11111111
Symbol rest = 5 ; change as required
Symbol degstep = 100 ; change as required
Main:
gosub Clockwise
pause 1000
Gosub Anti
Pause 1000
goto main
Clockwise:
for b0 = 1 to degstep
let PinsB = %00001010 '1
pause rest
let PinsB = %00010010 '2
pause rest
let PinsB = %00010100 '3
pause rest
let PinsB = %00001100 '4
pause rest
next
return
ANTI:
for b0 = 1 to degstep
let PinsB = %00001100 '4
pause rest
let PinsB = %00010100 '3
pause rest
let PinsB = %00010010 '2
pause rest
let PinsB = %00001010 '1
pause rest
next
return
You CAN change the four coloured wires around safely.Many thanks, something worked.
I watched the motor move clockwise, but then nothing more happened apart from feeling the motor vibrating a little.
I don't know why, but I have 2 AXE-117 boards, and both do not bring out Pins 1 and Pin 16 to pads?
My motor is a 28BYJ-48 5 VOLT Stepper, having a blue and a pink.
The configuarion is :
PICAXE B.1 - Pin 14 ULN chip Blue wire
B.2 - Pin 13 ULN chip Pink wire
B.3 - Pin 12 ULN chip Yellow wire
B.4 - Pin 11 ULN chip Orange wire
Red wire + 5volts
I would try swapping wires around but would rather avoid a fire.
Hope someone can make sense of what I have setup. Thanks again
I use a 22mm plastic pipe clip for testing - push fitHaving got the motor from Ebay, does anyone know where to get an equivelent to a servo horn fitting to go on the shaft. Seen lots of flexible straight couplings twice the price of the motor!! but need to fix the shaft to a plate. Thanks