Stepper Motoring With The Propeller
PJAllen
BannedPosts: 5,065
Here's how to run stepper motors with the Propeller.
I used a SpinStamp (The Best!), a ULN2803, and the commonly available Howard Industries 1-19-4200/SM4200 (it's a unipolar).
I've attached a SPIN program and a schematic and, lest any despair, here's a vid of it all.
What's in the OBEX? I don't know and I don't care.
Don't talk - Do!
If you have questions, hit me up.
Keywords: How do I connect stepper motors? How do I drive stepper motors? How fast can I run stepper motors? SPIN code for stepper motors. Stepper motors and the Propeller. How do I interface a stepper motor with the Propeller.
Post Edit -- Found a bug, didn't want to leave bad code. Please see #8's SPIN attachment.
Updated schematic, see post #12.
I used a SpinStamp (The Best!), a ULN2803, and the commonly available Howard Industries 1-19-4200/SM4200 (it's a unipolar).
I've attached a SPIN program and a schematic and, lest any despair, here's a vid of it all.
What's in the OBEX? I don't know and I don't care.
Don't talk - Do!
If you have questions, hit me up.
Keywords: How do I connect stepper motors? How do I drive stepper motors? How fast can I run stepper motors? SPIN code for stepper motors. Stepper motors and the Propeller. How do I interface a stepper motor with the Propeller.
Post Edit -- Found a bug, didn't want to leave bad code. Please see #8's SPIN attachment.
Updated schematic, see post #12.
Comments
Good show! That's about as clear and succinct a demo of unipolar stepping as I've seen. Please add some keywords to your post so it will be easy to find down the road when a beginner asks, "How do I ... ?"
-Phil
And, bonus, no optoisolators!!!
I didn't declare any stack space, because it hasn't yet become "second nature" for me to do so and I don't have a "good feel for that" either.
I let my contraption run overnight and saw that it had konked out when I got up this morning, which gave me pause for concern, and after lunch it hit me - Stack[x]
-- http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol7/col/NV136.pdf
Maybe I'm missing something.
Go with whatever, till it seems like it's OK, Stack[100] ought to do it?
("Yeah, 120... 121, whatever it takes.")
Ja, I am being recursive.
I keep doing that, too. And those RETURNs [eh]. :zombie:
Life with the Propeller is a PUB crawl. Non?
I'll leave her run and see what happens.
Post Edit -- That was it. The konking-out never happened the several hours that I'd had it running originally, or I'd turn it off to re-arrange this & that or whatever and back on, so I never knew. Now, I know.
I have things so that I can advance to the disk to any arbitrary position by clicking a pushbutton, "adv/jog"; select that as "home" with a separate pushbutton "ent", and then advance 60deg (using "adv/jog").
A likely story but for the demo.
My adv/jog isn't as snappy as I'd like it to be, but fat chance getting anyone to talk about SPIN around this place.
Nope. It's 100% accurate.
If it was "wrong" then it wouldn't work.
Stepper motors are funny that way.
I'm half-stepping, it's right or it'd blow chunks.
I guess you missed the hotlinks to the demos?
Have a good day.
Your post (#10) has been stuck in my craw like an unbuttered Triscuit.
My depiction of the stepper motor itself was inaccurate, specifically the colours/names.
The order of the coils' actuation is BRN, GRN, RED, WHT,...
Since the center-taps of both windings are tied together, my simply checking the ohms was inadequate to the task. I found the answer that I was looking for that way, but that was a hasty, superficial conclusion.
I went looking for and found an old N&V article that I'd stashed away ("Build a 3-axis stepper motor controller", Feb '97) and pored over it exhaustively. I got out the ac signal generator and did a lot of probing, voltage and phasing observation.
Consequently, I have edited my schematic. I have highlighted the corrections (the colours/names of the wires and their relationship to the coil windings.)
I omitted the original.
So, now there is harmony between my practice and operation, and the depiction of the stepper diagram.
Hit me up if you have any questions or substantive comments.
I think if you tried to get some help writing it in C# there are plenty of people who'd jump in to give advice.
BTW We all make mistakes, except for those who don't and they have never done anything