JayAuckland
New Member
I'm helping friends create some small animated figures and have sourced some very small, very cheap bipolar stepper motors (see
pic) which will be ideal to create movement of arms, etc. However I am having difficulties successfully driving them.
I'm trialing them using an existing combination of 14M2, code and an L293D H-bridge. While this combination works fine with a slightly larger bipolar stepper, enabling controlled movement clockwise and anticlockwise, when I replace that stepper with this new miniature one it is a little erratic and will move in one direction (CW as viewed from the shaft) only, regardless of the 'direction' of the pulses. Even when I parallel up this mini stepper with the slightly larger one the larger one still works fine while the mini one only moves clockwise. ie when pulsed to move clockwise they both move clockwise. When pulled to move anticlockwise the larger one moves anticlockwise but the small one moves clockwise. Hmmm. I've tried this with three of the mini steppers and they all exhibit the problem so am assuming it's not a dud motor. And the problem is evident at fast and slow rotation speeds.
This is the clunky but easy to fiddle around with bit of test code I've been running for these trials:
While looking for ideas or even a solution I found this YouTube clip LINK of much the same mini stepper being run directly (seemingly without an h-bridge!) from an Arduino and doing exactly what I wish to achieve. So I know it should be possible, but having limited Picaxe knowledge and not a shred of Arduino knowledge or experience I am hoping someone can shine some light on my problem(s).
Such as:
How come the mini stepper won't play nice like the slightly larger one does?
How should I adapt my code if necessary?
Or what would be a Picaxe code approach to emulate what the YouTube guy is so successfully doing with Arduino?
With or with an h-bridge?
Hoping someone has got their head around this better than I can!
Jay
pic) which will be ideal to create movement of arms, etc. However I am having difficulties successfully driving them.
I'm trialing them using an existing combination of 14M2, code and an L293D H-bridge. While this combination works fine with a slightly larger bipolar stepper, enabling controlled movement clockwise and anticlockwise, when I replace that stepper with this new miniature one it is a little erratic and will move in one direction (CW as viewed from the shaft) only, regardless of the 'direction' of the pulses. Even when I parallel up this mini stepper with the slightly larger one the larger one still works fine while the mini one only moves clockwise. ie when pulsed to move clockwise they both move clockwise. When pulled to move anticlockwise the larger one moves anticlockwise but the small one moves clockwise. Hmmm. I've tried this with three of the mini steppers and they all exhibit the problem so am assuming it's not a dud motor. And the problem is evident at fast and slow rotation speeds.
This is the clunky but easy to fiddle around with bit of test code I've been running for these trials:
Code:
setfreq m8
b0 = 30 'rotation min ttl pause @ m8 = 7
b1 = 0 'loop counter
Running:
for b1 = 0 to 50
gosub CW
next b1
for b1 = 0 to 50
gosub ACW
next b1
goto Running
CW:
gosub Step1
pause b0
gosub Step2
pause b0
gosub Step3
pause b0
gosub Step4
pause b0
return
ACW:
gosub Step4
pause b0
gosub Step3
pause b0
gosub Step2
pause b0
gosub Step1
pause b0
return
Step1:
high B.1: low B.2: high B.3: low B.4 'rotate cw one step (1)
return
Step2:
high B.1: low B.2: low B.3: high B.4 'rotate cw one step (2)
return
Step3:
low B.1: high B.2: low B.3: high B.4 'rotate cw one step (3)
return
Step4:
low B.1: high B.2: high B.3: low B.4 'rotate cw one step (4)
return
end
Such as:
How come the mini stepper won't play nice like the slightly larger one does?
How should I adapt my code if necessary?
Or what would be a Picaxe code approach to emulate what the YouTube guy is so successfully doing with Arduino?
With or with an h-bridge?
Hoping someone has got their head around this better than I can!
Jay