Is there a "plug-and-play" object somewhere in the OBEX for running stepper mot
ElectricAye
Posts: 4,561
I've been looking for some SPIN code examples similar to what's provided for the Stamp for driving stepper motors, something that would demonstrate the various types of stepping, microstepping, etc. but much to my disbelief I can't find anything on the OBEX when I search for it. Might an object like that be buried somewhere in some other file or has nobody bothered to post a demo like that?
thanks,
Mark
thanks,
Mark
Comments
sorry, I don't know the stamp examples. Are you looking for a pulse generator that generates the steps and you want to handle the motor driving externally, for examle with a TQ8435 that can do full to microstepping with a single chip? This would take travel distance and maximum pulse rate as input and would generate the desired frequencies including accelleration and decelleration ramps.
Or are you looking for a driver that takes pulses as input and outputs analogue values for the nominal currents of the two coils (for use with an external chopper driver like the L298), or even PWM to directly drive the power stage transistors?
Cheers
Graham
http://www.rayslogic.com/propeller/Programming/Programming.htm
Ray
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
www.parallax.com/Portals/0/Downloads/docs/prod/motors/Stepper_Motor_27964.pdf
Although I've used stepper motors in the past, I've never tried to control one with the Propeller so, as usual, I like to start at the very bottom and work my way up toward the fancy stuff you gurus do. Right now I'm just converting the aforementioned stuff into SPIN, but I was wondering if there was already something hidden somewhere in the OBEX that I could use as a reference.
thanks,
Mark
Jim
Hey Ray,
I just downloaded your code and had a glance at it and it looks like precisely what I was hoping for.
I bet it would make a good addition to some sort of Propeller education module working with steppers, etc.
Thanks very much!
Mark
Excellent! Here's the link for it: www.parallax.com/dl/docs/cols/nv/vol7/col/NV136.pdf
I think you guys have nailed it for me.
many, many thanks!
Rayman's code combined with the aforementioned Nuts and Volts article provided what I needed to get started. But certainly I'm sure a lot of beginners would appreciate somebody taking the time to post a very basic code example in the OBEX, especially code that is well commented and explains things step by step. The Nuts and Volts article uses various tricks that beginners might not understand (making reference to a technique in C for example) and Rayman's code also uses a few simple tricks that I had to look up, so I'm sure a basic building block of code would be a welcome addition. Go for it!
thanks,
Mark